View Full Version : Quick Trigonometry Question
Ordinathorreur
June 20th, 2005, 08:20 AM
I looked at the tutorials here on Kirupa, but I'm still having some trouble.
I have the value of the angle, and side A. Could someone help me with the formulas in AS to calculate sides B and C, or throw me a clear link so I can try to figure it out myself. See the pic for details
Thanks a bunch for taking the time to help.....
senocular
June 20th, 2005, 08:50 AM
This post can help.
http://www.kirupa.com/forum/showthread.php?t=12181
if you cant figure it out, I'll walk ya through it
kBisk
June 20th, 2005, 08:52 AM
degreeAngle = 30; // known angle CA in degrees
radianAngle = degreeAngle*(Math.PI/180); // converts known angle to radians
side_A = 5; // length or value or known side A
side_B = side_A*Math.sin(radianAngle); // calculates length or value of side B
side_C = side_A*Math.cos(radianAngle); // calculates length or value of side C
kBisk
June 20th, 2005, 08:58 AM
Check out senocular's thread... its impressive. I told you how to do it but he teaches you what you are actually doing...
Ordinathorreur
June 20th, 2005, 09:15 AM
I figured out that I don't actually need what I was asking for, in fact it's a lot more complicated. Looks like I will be spending the rest of the day breaking my brain. At least I will learn something. Thanks for your posts, that thread is already being very helpful.
Ordinathorreur
June 21st, 2005, 10:52 AM
Nooooooo! :worried:
What happened to Sens' thread! Where did it go! I need it!
senocular
June 21st, 2005, 11:35 AM
I put a backup of the thread here:
http://www.senocular.com/pub/kirupa/rotatevectorthread.html
Ordinathorreur
June 21st, 2005, 01:29 PM
Thanks for that. Me happy now. :thumb:
Ordinathorreur
June 21st, 2005, 05:46 PM
Allright, I'm on the verge of giving up. I have spent 2 days trying to get this working, but I am not succeeding
I am going to explain my problem.
Take a look at example.swf
The dotted lines are where I need the cam to be.
Click one of the boxes (only once, you will have to reload to see it again, i quickly modded my AS to give you an example)
As you can see in the first movement, it ligns up nicely, the dotted box is in the center of the screen, it's just slightly rotated. Then I rotate my main mc to compensate, but obviously it goes off screen. Not good. This is my problem.
Example2.swf shows the same movement, but done continuously. This is more like I want it to look. (you can click the boxes more often, but wait till the movement is over)
I have also included a .fla which I have commented quite nicely. Please take a look and help me out with my trig problems..... or this experiment is destined for the bin.
Here is the .fla (http://www.danieltodd.com/navigation.fla)
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.