Register
 
DesignCAD 2019 and DesignCAD 3D Max 2019 now available for sale!
https://www.turbocad.com/designcad/ OR
https://www.imsidesign.com/products/designcad

Implicit function graphing
Read 362 times
* 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.

Logged
--Jack


August 06, 2019, 06:47:48 PM
#1
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

Logged
DesignCAD user since 1987


August 07, 2019, 08:23:04 AM
#2
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

Logged
DesignCAD user since 1987


* August 07, 2019, 10:26:19 AM
#3
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!

Logged
--Jack


August 07, 2019, 09:35:35 PM
#4
Jack,

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

Phil

Logged
DesignCAD user since 1987


* August 26, 2019, 09:33:04 PM
#5
You're very kind, and WRONG!  I am getting old.  Upper 80s is old!, and I feel each and every year of it.  But life slithers on, and I'm not going to fight it.  You guys and gals are sweet.

Logged
--Jack


August 26, 2019, 11:25:08 PM
#6
Jack,

My mother would never admit that she was getting old. When she turned 100 we threw a big birthday party for her, and then she told me that she would have to concede that she was getting old. She was still living at home, doing all of her cooking, housework, grocery shopping and yard work.

She died two months shy of 107.

Phil

Logged
DesignCAD user since 1987