Math question

computerex

Addon Developer
Addon Developer
Joined
Oct 16, 2007
Messages
1,282
Reaction score
17
Points
0
Location
Florida
Hey guys. Sorry if I sound stupid, but we haven't learnt this stuff yet in school. My question is:

Right_triangle.PNG


Does c = a/cos(θ1)

Is there any other way to calculate the measure of c if you only have the measure of θ 1 and the measure of a?
 

Bj

Addon Developer
Addon Developer
Donator
Joined
Oct 16, 2007
Messages
1,886
Reaction score
11
Points
0
Location
USA-WA
Website
www.orbiter-forum.com
Hey guys. Sorry if I sound stupid, but we haven't learnt this stuff yet in school. My question is:

Right_triangle.PNG


Does c = a/cos(θ1)

Is there any other way to calculate the measure of c if you only have the measure of θ 1 and the measure of a?

Well, their is several ways;

Let A,B,C = angles
let a,b,c = sides

angle a is opposite side A (so reffering to your picture (theta)1 is angle b)

240px-TrigonometryTriangle.svg.png


So, we can use;
sin(Opposite/Hypotenuse) = angle
cos(Adjacent/Hypotenuse) = angle
tan(Opposite/Adjacent) = angle

or use the same sin, cos, and tan as above only inversed and it will return a distance instead of angle

sin-1(Opposite/Hypotenuse) = length
cos-1(Adjacent/Hypotenuse) = length
tan-1(Opposite/Adjacent) = length
 
Last edited:

computerex

Addon Developer
Addon Developer
Joined
Oct 16, 2007
Messages
1,282
Reaction score
17
Points
0
Location
Florida
Is the way I provided correct or not? Forgive me, but I have just started 9th grade. :(
 

Bj

Addon Developer
Addon Developer
Donator
Joined
Oct 16, 2007
Messages
1,886
Reaction score
11
Points
0
Location
USA-WA
Website
www.orbiter-forum.com
Right_triangle.PNG


Does c = a/cos(θ1)

Is there any other way to calculate the measure of c if you only have the measure of θ 1 and the measure of a?

Oh, and another way to look at it;
A trigonometric figure (figure with 3 angles) has 3 angles that add to 180

so in the above diagram, you know that at least one angle is 90(degrees)
so 180-90= θ1

So now instead of, say using the sin(b/c)=θ1 you can use cos(a/c)=θ2
 
Last edited:

Bj

Addon Developer
Addon Developer
Donator
Joined
Oct 16, 2007
Messages
1,886
Reaction score
11
Points
0
Location
USA-WA
Website
www.orbiter-forum.com
Is the way I provided correct or not? Forgive me, but I have just started 9th grade. :(

No, not quite, Its ok, everyone has to learn this at some point or another, and as you'll find out, directly relates to orbiter :)

ok Iam not sure if you have seen this or not...

a = angle
A = side

(a/sin(A)) = (b/sin(B)) = (c/sin(B))

Right_triangle.PNG

so in your question you have a 90 degree angle and the angle of θ1 and (a)

so (θ1/sine(B)) = θ2/sin(A))

as of a second ago, we didnot know what θ2 was, but remember a triangle has a sum of 180 degrees for all the angles total so we take;

180-θ1-90=θ2

so;
(180-θ1-90)/(sin(A)) = distance c

does that help?
 

computerex

Addon Developer
Addon Developer
Joined
Oct 16, 2007
Messages
1,282
Reaction score
17
Points
0
Location
Florida
This is for an add-on that simulates dust kicking up because of the hover engines. That's why I need to be able to figure out the distance from the engines to the ground in a straight line. The easy way is to :

y offset = Altitude*-1

But this is a cheap hack, and only renders the dust completely on the ground when the hover engines are pointing straight down. It won't model the dust correctly if the hover engines were say at an angle of 60 degrees.

DSCH.png


That's why I need to know c.
 

computerex

Addon Developer
Addon Developer
Joined
Oct 16, 2007
Messages
1,282
Reaction score
17
Points
0
Location
Florida
Thanks, I'll give it a try right away. BTW, are there are online tutorial sites for Trig.? I am just done with the first quarter of Geometry honors.
 
  • Like
Reactions: Bj

Bj

Addon Developer
Addon Developer
Donator
Joined
Oct 16, 2007
Messages
1,886
Reaction score
11
Points
0
Location
USA-WA
Website
www.orbiter-forum.com
That's why I need to know c.

I see, well I have little programming experience so I will have no idea how you did that graphically.;)

I have a question though, if your only in 9th grade, you don't know trig (no offense (I mean, hey, who does know trig in 9th grade? ;))) but how can you know C++ or some other programming languages?
 

computerex

Addon Developer
Addon Developer
Joined
Oct 16, 2007
Messages
1,282
Reaction score
17
Points
0
Location
Florida
I find programming very simple, logical algorithms are easy for me. It's the math involved in Orbiter add-ons that is my limit.

I just don't get why my way doesn't work. If:

c6476d8a29b700572c0a64a3ea1fad42.png


then why can't you just use simple algebra to find c in cos (theta)1 ?

IE. c = a/cos(θ1)
 

Bj

Addon Developer
Addon Developer
Donator
Joined
Oct 16, 2007
Messages
1,886
Reaction score
11
Points
0
Location
USA-WA
Website
www.orbiter-forum.com
I find programming very simple, logical algorithms are easy for me. It's the math involved in Orbiter add-ons that is my limit.

I just don't get why my way doesn't work. If:

c6476d8a29b700572c0a64a3ea1fad42.png


then why can't you just use simple algebra to find c in cos (theta)1 ?

IE. c = a/cos(θ1)


Ahh I see, I think you are doing your algebra wrong, for the sake of simplicity lets let
Right_triangle.PNG


A = θ1 = 45
B = θ2 = 45
C = 90
a = 5
b = 5
c = (5^2 + 5^2)^.5

on my ti 83+ it shows that
5/cos(45) = 9.5179...
and that does not = (5^2 + 5^2)^.5 = srt(50) = 7.071...

Im not sure what you are doing algebraically; but in a minute ill figure whats wrong...
 

Bj

Addon Developer
Addon Developer
Donator
Joined
Oct 16, 2007
Messages
1,886
Reaction score
11
Points
0
Location
USA-WA
Website
www.orbiter-forum.com
:edited:

Hang on, im getting alittle mixed up as well, see I am in calculus and (doing calculus homework) with all this jumping back and forth its getting me dizzy, :lol:;)
 

computerex

Addon Developer
Addon Developer
Joined
Oct 16, 2007
Messages
1,282
Reaction score
17
Points
0
Location
Florida
Hmm. It seems it's not working, even using your way. This is what I am doing to get the offset for the y axis. The smoke trail should start at the ground.

(180-ang-90)/(sin(alt));

jofs.jpg
 

computerex

Addon Developer
Addon Developer
Joined
Oct 16, 2007
Messages
1,282
Reaction score
17
Points
0
Location
Florida
A = θ1 = 45
B = θ2 = 45
C = 90
a = 5
b = 5
c = (5^2 + 5^2)^.5

on my ti 83+ it shows that
5/cos(45) = 9.5179...
and that does not = (5^2 + 5^2)^.5 = srt(50) = 7.071...

Im not sure what you are doing algebraically; but in a minute ill figure whats wrong...


Well:

cos(θ1) = a/c
So simply adjust the equation to get:
a/cos(θ1)=c
or c = a/cos(θ1)

Example with simple numbers:

2 = 6/x
So you do 6/2 to get 3, which fits in the equation. Same case above...
 

Bj

Addon Developer
Addon Developer
Donator
Joined
Oct 16, 2007
Messages
1,886
Reaction score
11
Points
0
Location
USA-WA
Website
www.orbiter-forum.com
Nice picture, and mod :) :cheers:

but I see where I went wrong; :sorry:

a = angle
A = side

(a/sin(A)) = (b/sin(B)) = (c/sin(B))

I have these reversed, its supposed to be SIDE/sin(angle)

so (lets try this again :( ;))

c/sin(90) = b/sin(θ1)

Right_triangle.PNG



Im having a problem with my calc, just for giggles I typed in sin of 90, it should be 1 right? but my calc says .89399???? :blink::huh:

ill figure whats wrong with this :censored: thing
:lol:
 

Bj

Addon Developer
Addon Developer
Donator
Joined
Oct 16, 2007
Messages
1,886
Reaction score
11
Points
0
Location
USA-WA
Website
www.orbiter-forum.com
:coffee:

:shout:


:weird:


:suicide:

MAN, I feel like an idiot; yes your c = a/cos(θ1) works fine its this stupid calculator, well actually me, see, I had it set on radian instead of degree, and that screwed it up, so

:sorry:

sorry about all the trouble if it screwed you up or anything,
Next time ill make sure im doing it right before posting :)
:cheers:
 

computerex

Addon Developer
Addon Developer
Joined
Oct 16, 2007
Messages
1,282
Reaction score
17
Points
0
Location
Florida
Lol no problem. :rofl:
You just gave me a start though because I thought that I was incapable of doing even simple algebra!
 

Bj

Addon Developer
Addon Developer
Donator
Joined
Oct 16, 2007
Messages
1,886
Reaction score
11
Points
0
Location
USA-WA
Website
www.orbiter-forum.com
Im going to download that mod right away, looks cool :speakcool:

and can you send your .cpp files with it, i want to see what you did
 

computerex

Addon Developer
Addon Developer
Joined
Oct 16, 2007
Messages
1,282
Reaction score
17
Points
0
Location
Florida
Im going to download that mod right away, looks cool :speakcool:

and can you send your .cpp files with it, i want to see what you did

It's not released yet. I am probably gonna do it tomorrow along with the updated version of spotlights. I always release the source code along with the add-on.
 
Top