Alice Community Trigonometry problems

 Trigonometry problems
 Niteshifter Guest   Status: Posts: n/a 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°.
 rankhornjp Guest   Status: Posts: n/a 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. Last edited by rankhornjp; 03-19-2010 at 10:08 AM.
 Niteshifter Guest   Status: Posts: n/a 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. Last edited by Niteshifter; 03-19-2010 at 02:13 PM.
 Niteshifter Guest   Status: Posts: n/a 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.

 Thread Tools Display Modes Linear Mode

 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 Rules
 Forum Jump User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home Announcements     Community News and Announcements Alice 3     How Do I?     Works In Progress     Share Your World     Share Custom Classes     Bugs and Trouble Shooting     Suggestion Box Alice 2     How do I...?     Works-In-Progress     Share Worlds     Share Objects     Bugs and Troubleshooting     Suggestion Box Educators     Teaching with Alice     Teaching Using Alice 3     Teaching Using Alice 2     CS Principles and Alice     AP CSA and Intro to Java and Alice     Workshops General Discussion     Questions and Comments     The Lounge