> What I'm wondering is, given a
> particular shape of double-napped cone (cone's angle is
> 180-2*sun_relative_declination, where sun_relative_declination is
> between 0 and 23.45 degrees), the distance between the points of the
> cones and the plane (the height the gnomon shadow-caster), and the angle
> of the plane through the cones (latitude), can I calculate the formula
> of the resulting hyperbola?

First we start with the equation of the cone when z axis is the axis
of rotation:

z^2 = cot(sun_relative_declination)^2 *(x^2 + y^2)

the above can be derived from the idea that we can run a cross-section
parallel to the x-y plane through an arbitrary point on the cone and
obtain a circle. The radius of the circle will be the absolute value
of the z coordinate (this is how far the point is away from the x-y
plane) times tangent of the angle between the z axis and the line
connecting the point on the cone to the origin. At the same time the
radius is the distance from the cone point to the z axis which is
sqrt(x^2+y^2) by Pythagorean theorem.

Now I think it is easier to rotate and translate the cone than to
rotate and translate the plane. I was not quite sure how you wanted to
position the plane relative to the cone, but I'll give you the basic
idea and equations to get you started.

To rotate by angle theta around the y axis we do a substitution based
on multiplying by this matrix:

cos(theta)  0 -sin(theta)
0                1  0
sin(theta)  0   cos(theta)

so you can do the substitution is

x = x_new * cos(theta) - z_new *sin(theta)
y = y_new
z = x_new * sin(theta)  + z_new * cos(theta)

Now there is a little technicality here to figure out which way you
are rotating. In this case instead of thinking you can just reverse
the sign of theta if you happen to get it wrong and it will rotate the
other way.

Then to do the translation you just add a translation vector like this:

x_new = x + a
y_new = y + b
z_new = z + c

To rotate around x you can use this matrix:

1  0 0
0 cos(theta) -sin(theta)
0 sin(theta) cos(theta)

Then once you've done the ugly algebra resulting from the
substitutions you set z to 0 and obtain the equation of the  x-y
cross-section of the cone which will be the hyperbola that you wanted
provided you rotated by the correct angle. You can also get an ellipse
depending on the angle of rotation. Either way - the resulting
equation allows you to plot it.


-- 
Sasha Pachev

Fast Running Blog.
http://fastrunningblog.com
Run. Blog. Improve. Repeat.

/*
PLUG: http://plug.org, #utah on irc.freenode.net
Unsubscribe: http://plug.org/mailman/options/plug
Don't fear the penguin.
*/

Reply via email to