Implicit Equation Grapher

Mathematics, Programming — Alex @ 10:00 pm

For a while now, I’ve been thinking about plotting implicit equations in the back of my head. Mathematica’s method still eludes me—all you do is specify the equation, and the range of x,y values to consider—; the only way I can think of involves finding at least one solution to the equation, and then following the gradient of the function in a way that keeps the value as close to 0 as possible. Besides the obvious drawback of requiring a seed, this technique also diverges from the actual curve, because after the first value, all the points considered to be on the curve are actually not. So it is possible, if you have a convoluted enough expression, that what you end up with looks nothing like the actual curve.

To pass the time today while at a graduation ceremony, I took along a book with me, and I was surprised to see that it had almost the exact same technique I was thinking of for graphing implicit equations, except being on paper, it was more detailed. Supposedly this was gleaned from a research paper; therefore at least some other people who have considered this problem have run into the same dead-end.

Amusingly— considering that using this technique requires having a closed form expression for the gradient—, this was an exercise at the end of the chapter:

Develop a menu-driven, interactive graphics program to draw planar curves that are specified implicitly. Use the method developed in Section 2.3.2. Provide several examples of implicit functions to be drawn.

Interpreting that liberally, that requires the program to parse and calculate derivatives for arbitrary expressions. Of course, you could always take the easy way out and just hardcode in the examples.

Possibly relevant posts:

0 Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a comment

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License.
(c) 2008 ChapterZero | powered by WordPress with Barecity