T.R | Title | User | Personal Name | Date | Lines |
---|
853.1 | not the most general answer | ZFC::DERAMO | Take my advice, I'm not using it | Fri Apr 01 1988 12:23 | 11 |
| For an ellipse "centered" at (x0,y0) with minor and major axes
parallel to the x and y axis,
x - x0 = a cos(fi)
y - y0 = b sin(fi)
If a = b = r then you have a circle of radius r.
Note that this is not a complete answer to your question.
Dan
|
853.2 | check this out | ZFC::DERAMO | Take my advice, I'm not using it | Sat Apr 02 1988 00:18 | 10 |
| Could the answer be as simple as this?
x = x0 + a cos (fi - theta)
y = y0 + b sin (fi - theta)
where fi [phi?] is the parameter, theta the [constant] angle between
the axes of the ellipse and the x and y axes, and a and b are positive
constants.
Dan
|
853.3 | some conics | CADM::ROTH | If you plant ice you'll harvest wind | Mon Apr 04 1988 17:29 | 32 |
| To get an ellipse in general position, just make an affine transformation
of a circle at the origin:
| x0 | | cos(theta) -sin(theta) | | a*cos(phi) |
| | + | | * | |
| y0 | | sin(theta) cos(theta) | | b*sin(phi) |
Put hyperbolic functions in the right column vector to get an hyperbola.
To plot an ellipse (approximated as a polyline, say) it is not
recommended to use the above parameterization, since it gives a poor
distribution of points on the curve. It's better represent the curve
as an affinely symmetric n-gon with a recurrance like this:
| x[k+1] | | a b | | x[k] |
| | = | | * | |
| y[k+1] | | c d | | y[k] |
This gives the curve centered at the origin at an arbitrary rotation.
Add in (x0,y0) to translate it where you want. You have to set up the
ABCD matrix properly but it's simple.
There also exist rational parameterizations of all the conic sections
but they require more than one chart to cover the curve. But they
carry the advantage that you can continuously vary a parameter, giving
a pencil of conics that ranges from a hyperbola, thru a parabola, to an
ellipse...
This representation can also be drawn efficiently using a subdivision
algorithm for Bezier curves.
- Jim
|
853.4 | | GORP::MARCOTTE | George Marcotte SWS Santa Clara | Tue Apr 05 1988 11:17 | 4 |
| It seems so simple.... non use of the math muscle makes it atrophied
Thanks for all the suggestions/answers.
|