gusl: (Default)
[personal profile] gusl
I'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.

(no subject)

Date: 2010-02-12 06:29 pm (UTC)
From: [identity profile] psifenix.livejournal.com
I would think any sort of algorithm to plot these would have to use some kind of approximation technique as the existence of such parametrizations for genus g>0 (in short anything more complicated than a conic section) is doubtful: They don't exist over Q, and if they existed over R then it is conceivable we could identify Q points from looking hard at the expression and using height arguments to prove existence or nonexistence of rational in finite time (maybe). No such algorithm is known for curves of positive genus, or even g=1.

(no subject)

Date: 2010-02-12 06:35 pm (UTC)
From: [identity profile] psifenix.livejournal.com
The extrapolation technique sounds about right (did you add that? I just woke up...). I'm by no means an expert though!

(no subject)

Date: 2010-02-13 07:34 am (UTC)
From: [identity profile] gustavolacerda.livejournal.com
Thanks. Yeah, I guess I updated the post to add my idea.

(no subject)

Date: 2010-02-14 12:38 am (UTC)
From: [identity profile] elsumis.livejournal.com
From what I've seen of isosurfaces and isocurves (say, solving f(x,y)=0), the standard method is boring: just evaluate f(x,y) over a grid, then find the edges where it crosses zero.

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.

February 2020

S M T W T F S
      1
2345678
9101112131415
16171819202122
23242526272829

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags