Alice Community  

Go Back   Alice Community > Alice 2 > How do I...?

Thread Tools Display Modes
Prev Previous Post   Next Post Next
Trigonometry problems
Posts: n/a
Default Trigonometry problems - 03-18-2010, 10:33 PM

My assignment is basically to make a person scale a pyramid using the Pythagorean theorem, which for me is very easy and my teacher knows that I can do this stuff in about 5 min, so we're (me and my teacher) are both challenging ourselves to find a way so that the angle at which the person scales the pyramid is accurate (since the book just says to have the person turn forward 1/8 of a revolution).

I've gotten it partially finished, however I'm stuck at a spot. I've created a function that will return how far the person will turn using trigonometric methods. This is what I have so far (it's put into simple steps so that it's easy to follow):

Var is a number value
Py is the pyramid

Var = arctan(py.height/(py.width/2))
Var = 90 - Var
Var = Var/360
Return Var

What this does is return the degrees at which is between the edge of the bounding box and the slope of the pyramid, which is approx. 24.7. Now the problem I'm having is translating this to how far the person will turn forward because if I put that in as it is, the person will turn forward a whole 90.
Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Copyright ©2021, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.