[Golist] OT trig
Cadete B7
cadete at bigote7.com
Sun Jul 27 12:47:33 PDT 2008
reposting the solution, which i'm embarrassed not to have realized
myself, was pulled from a math forum response... i'm using this to
create a series of tweens at initialization (so i can't use sceneX and
the like) which will orient planes back to a 1:1 aspect ratio and
screen center while being nested within other DisplayObject3D's that
have an axis rotation and z-depth...
Let us call the given central angle as theta.
Let us call the given radius of the circle as r.
Let call the upper "?" as x, and the lower "?" as y.
Let us call the hypotenuse of the legs x and y as z.
So the whole vertical line from the center of the circle up to the
bottom of y is (r+z).
In the large right triangle, whose hypotenuse is (r+z):
cos(theta) = r / (r+z)
So,
(r+z)cos(theta) = r
(r+z) = r / cos(theta) = r*sec(theta)
z = r*sec(theta) -r
z = r*[sec(theta) -1] -------**
In the smaller right triangle, whose hypotenuse is z:
Since r and y are parallel ...they are both perpendicular to the same
green line...then the angle between y and z is equal to theta.
Then,
sin(theta) = x / z
So,
x = z*sin(theta)
x = r[sec(theta) -1]*sin(theta) ------------answer.
cos(theta) = y / z
y = z*cos(theta)
y = r[sec(theta) -1]*cos(theta) --------answer.
------------------
EDIT:
Or, x = r[1 /cos(theta) -1] sin(theta) = r[sin(theta)/cos(theta) -
sin(theta)] = r[tan(theta) -sin(theta)]
And, y = r[cos(theta) /cos(theta) -cos(theta)] = r[1 -cos(theta)].
- Wilbur
On Jul 26, 2008, at 10:59 PM, cadete at bigote7.com wrote:
> i was wondering if anyone could lend me a little trig help... given
> the radius and theta, what would the two lengths indicated by
> question marks be? exsecant? thanks.
>
> link to diagram...
> http://wilbcorp.com/links/trig.jpg
>
> _______________________________________________
> GoList mailing list
> GoList at goasap.org
> http://goasap.org/mailman/listinfo/golist_goasap.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://goasap.org/pipermail/golist_goasap.org/attachments/20080727/c4927894/attachment.html
More information about the GoList
mailing list