This is somewhat related to Actionscript, but not really, so I put it in Random.
Given a parametric curve in 2D (3D later), r(t) = [u(t), v(t)] a vector dependent on the variable t, how would it be possible to plot it?
1. The most obvious one would be point by point. Select a t and graph a point at the corresponding coordinate, then connect it to the next point.
This seems rather dumb doesn’t it? It’s like guess and check, for a plot. It also takes a (relatively) long time for complex equations.
2. Since Actionscript supports the .moveTo() function, I think that’ll work better. If you don’t know it, it has 4 parameters: x and y of the next point, and x and y of a control point. The control point is the intersection point of the tangents of the current point and the next point.
But mathematically speaking, how is it possible to translate a parametric curve to that format? The only way I can think of is still taking points on the curve, find their tangents/intersections, and connect them. That’ll require fewer points for the same precision, but it still doesn’t seem systematic.
Simple example:
Plot r(t) = [ t^2, 1-t ] with {0 <= t <= 5}
Seems like I’d still have to take a few points, say t = 0, 1, 2, 3, 4, and 5, then get each corresponding (x,y) value and graph it. Is there no other way?