Alice Community

Alice Community (
-   How do I...? (
-   -   Trigonometry problems (

Niteshifter 03-18-2010 10:33 PM

Trigonometry problems
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.

rankhornjp 03-19-2010 10:03 AM

If 1 is a complete revolution. Couldn't you divide 1 by 360 (1/360)=.00277 then multiply that by the degrees? .00277*24.7=.068419 revolutions

.00277*90=.2493 (almost quarter turn)
.00277*180=.4986 (half turn)
.00277*270=.7479 (3/4 turn)
.00277*360=.9972(full turn)

Its not exact, but its pretty close.

Niteshifter 03-19-2010 02:00 PM

Tried it, and it was pretty close, but there was a huge space in between once he reached the top. I also tried doing (0.247 - 0.068), which was still quite off.

The answer should be about (1/9.75). Got the number from literally trial and error.

Niteshifter 03-19-2010 03:00 PM

Nevermind, the orientation and shape of the pyramid isn't an exact triangular shape, so it's going to be off on various places regardless of where it is.

All times are GMT -5. The time now is 09:11 AM.

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