plotting algebraic curves
Feb. 12th, 2010 10:14 amI'm wondering if there are functions in R for plotting algebraic curves... like isotherms in a heatmap.
This is not something I've ever needed to do before, in any language.
I don't want to be solving n-th degree equations (finding all solutions!) just to make a plot. Is there a standard trick for parameterizing the points on the curve?
I can imagine a combination of numerical search that returns points close to the boundary of the set, and once you have two points within epsilon of the boundary, using extrapolation to guide the search for the next point on the boundary.
This is not something I've ever needed to do before, in any language.
I don't want to be solving n-th degree equations (finding all solutions!) just to make a plot. Is there a standard trick for parameterizing the points on the curve?
I can imagine a combination of numerical search that returns points close to the boundary of the set, and once you have two points within epsilon of the boundary, using extrapolation to guide the search for the next point on the boundary.
(no subject)
Date: 2010-02-12 06:29 pm (UTC)(no subject)
Date: 2010-02-12 06:35 pm (UTC)(no subject)
Date: 2010-02-13 07:34 am (UTC)(no subject)
Date: 2010-02-14 12:38 am (UTC)http://documents.wolfram.com/v5/Add-onsLinks/StandardPackages/Graphics/ImplicitPlot.html
If you're confident that the solution is just one planar isocurve and the function is nice (its gradient is easily computed and nonzero everywhere on the isocurve), I would guess that this would work?
1. Start at some point (x,y) near the isocurve.
2. Compute f(x,y) and its gradient, and do some iterations of 2D Newton's method to seek the curve to satisfactory accuracy.
3. Move a small step, perpendicular to the gradient.
4. Goto 2.