2009/11/13 PackRat <[email protected]>:
> ...... What I'm wanting is the cosine as
> the degree angle at the point in the very center of an ellipse varies
> from 0 degrees to 360 degrees (and the degree line intersects the curve
> of the ellipse), just as you would going from 0 to 360 degrees at the
> center of a circle, the degree line intersecting the circle (as
> indicated in the sample code I included in my original query). I hope
> this clarifies what I'm seeking. Thanks!
Harvey,
An ellipse with its major and minor axes parallel to the axes
of the coordinate system, and centred at the coordinate system's
origin has the equations
x = a (cos t)
y = b (sin t)
where a and b are the lengths of the ellipse's semi-axes and t
is an angle parameter taking any value within [0,2pi).
A ray from the centre towards a point (x,y) on the ellipse will
therefore make an angle u with the positive horizontal direction
such that
cos u = x/d = (a (cos t))/d
sin u = y/d = (b (sin t))/d
where d = x^2 + y^2 = (a (cos t))^2 + (b (sin t))^2
is the length of the position vector of (x,y).
I.e., if t is the angle parameter that characterizes a point
as in the ellipse equations, then u is the actual angle of
the position vector of the same point.
Is that what you are interested in?
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm