Author Topic: Implicit function graphing  (Read 65 times)

j-wetzel

  • Full Member
  • ***
  • Posts: 127
Implicit function graphing
« on: August 06, 2019, 04:29:39 PM »
I need to plot the graph of a relatively complicated implicitly defined function, say f(x,y) = 0, defined on the unit square [01,] x [0,1].  I might be able to write a macro that would generate the y value(s) numerically for a sequence of x values and then draw the graph, but it occurs to me that almost certainly someone has already faced the same problem and has written such a macro, so I'm asking.  A simple example of the sort of function I'm dealing with is, for example,  f(x,y) = x2 - 2y - sin(xy) = 0.
--Jack

Dr PR

  • Hero Member
  • *****
  • Posts: 5710
Re: Implicit function graphing
« Reply #1 on: August 06, 2019, 06:47:48 PM »
One way to generate graphs is to first program the equations in Excel, and generate a table of results.

A nice thing about this method is that you can generate a graph in Excel to see if you are getting what you want, and tweak the equations until you have the right data.

Then you can save the table as a Comma Separated Variable (CSV) file.

Change the file type to .xyz and import it into DesignCAD. You can import it as just a series of point marks, small circles, or with the points connected by lines or curves.

No macro necessary.

Phil
DesignCAD user since 1987

Dr PR

  • Hero Member
  • *****
  • Posts: 5710
Re: Implicit function graphing
« Reply #2 on: August 07, 2019, 08:23:04 AM »
If you just want to include the graph in a drawing, you can always generate the graph in another program - such as Excel - and save an image of the graph. Then you can import the image into your drawing.

Phil
DesignCAD user since 1987

j-wetzel

  • Full Member
  • ***
  • Posts: 127
Re: Implicit function graphing
« Reply #3 on: August 07, 2019, 10:26:19 AM »
Thanks for the suggestion, PR.  I should have thought of generating a table of points elsewhere and just importing them into DesignCad.  Gadzooks, I must be getting old!
--Jack

Dr PR

  • Hero Member
  • *****
  • Posts: 5710
Re: Implicit function graphing
« Reply #4 on: August 07, 2019, 09:35:35 PM »
Jack,

Getting old? You were just having a teen-age moment!

Phil
DesignCAD user since 1987