This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2010-10-30 21:45:27

recycle49
Scratcher
Registered: 2009-12-21
Posts: 1000+

Trig question

Okay when using sine i know it sine= o/h but how does scratch detiremen what the hopatonuse is and the oppsite lenghs are or the agesent angle for the matter? Im trying to make a art project and this is how im getting: It sets its lengh of the trringle to the varible or xpos, then calculates that not the givin based off setting all sides exsept one to that lengh number. this is what i need. I need to know what angle it is using to make it work. Can you help. Give me an exsample please. http://en.wikipedia.org/wiki/File:Trigo … iangle.svg
Btw im talking about rightangle triangles. Basecly how does scratch caluclate angels using sine?


"Every challenge must be met, every battle must be won, and every story will end." -Me
Recycle49 December 09 - November 11 Goodbye

Offline

 

#2 2010-10-30 21:56:37

16Skittles
Scratcher
Registered: 2009-08-26
Posts: 1000+

Re: Trig question

see my car for racing game project. It uses trig for scrolling. I'm looking for my formula now.  smile
edit: I used it knowing the hypotenuse...
so:
sin(direction)*hypotenuse=leg
sin(direction)=leg/hypotenuse
sin(direction)*leg=hypotenyse
and the same for the other only with cosine...

Last edited by 16Skittles (2010-10-30 22:19:03)


http://16skittles.tk/sig.png
Are you a student? Check out OnSchedule!

Offline

 

#3 2010-10-31 07:56:07

recycle49
Scratcher
Registered: 2009-12-21
Posts: 1000+

Re: Trig question

16Skittles wrote:

see my car for racing game project. It uses trig for scrolling. I'm looking for my formula now.  smile
edit: I used it knowing the hypotenuse...
so:
sin(direction)*hypotenuse=leg
sin(direction)=leg/hypotenuse
sin(direction)*leg=hypotenyse
and the same for the other only with cosine...

okay so you need varables to get the corect answer as if using a math problem on paper?


"Every challenge must be met, every battle must be won, and every story will end." -Me
Recycle49 December 09 - November 11 Goodbye

Offline

 

#4 2010-10-31 08:06:45

TheSuccessor
Scratcher
Registered: 2010-04-23
Posts: 1000+

Re: Trig question

With your wikipedia picture,
sine A     sine B      sine C
--------  =  --------  =  --------
   a            b            h

This is true for any triangle, right-angled or not.

Last edited by TheSuccessor (2010-10-31 08:07:30)


/* No comment */

Offline

 

#5 2010-10-31 08:26:13

recycle49
Scratcher
Registered: 2009-12-21
Posts: 1000+

Re: Trig question

TheSuccessor wrote:

With your wikipedia picture,
sine A     sine B      sine C
--------  =  --------  =  --------
   a            b            h

This is true for any triangle, right-angled or not.

thanks


"Every challenge must be met, every battle must be won, and every story will end." -Me
Recycle49 December 09 - November 11 Goodbye

Offline

 

#6 2010-10-31 10:14:09

nXIII
Community Moderator
Registered: 2009-04-21
Posts: 1000+

Re: Trig question

TheSuccessor wrote:

With your wikipedia picture,
sine A     sine B      sine C
--------  =  --------  =  --------
   a            b            h

This is true for any triangle, right-angled or not.

Yep, law of sines. You can also use the law of cosines:
a^2 = b^2 + c^2 - 2bc cos(A)
which means:
side one squared is equal to side two squared plus side three squared minus two times side two times side three times the cosine of the angle opposite side one.


nXIII

Offline

 

#7 2010-10-31 10:31:27

TheSuccessor
Scratcher
Registered: 2010-04-23
Posts: 1000+

Re: Trig question

nXIII wrote:

TheSuccessor wrote:

With your wikipedia picture,
sine A     sine B      sine C
--------  =  --------  =  --------
   a            b            h

This is true for any triangle, right-angled or not.

Yep, law of sines. You can also use the law of cosines:
a^2 = b^2 + c^2 - 2bc cos(A)
which means:
side one squared is equal to side two squared plus side three squared minus two times side two times side three times the cosine of the angle opposite side one.

I think the formula is easier to understand than your your explanation. I got lost.  tongue


/* No comment */

Offline

 

#8 2010-10-31 10:52:28

ScratchReallyROCKS
Scratcher
Registered: 2009-04-22
Posts: 1000+

Re: Trig question

It doesn't need to know the length of the opposite and hypotenuse. It just needs to know the angle.


http://imageshack.us/a/img694/3806/sigmad.png

Offline

 

#9 2010-10-31 11:09:39

recycle49
Scratcher
Registered: 2009-12-21
Posts: 1000+

Re: Trig question

ScratchReallyROCKS wrote:

It doesn't need to know the length of the opposite and hypotenuse. It just needs to know the angle.

oh so it measures the angle thanks


"Every challenge must be met, every battle must be won, and every story will end." -Me
Recycle49 December 09 - November 11 Goodbye

Offline

 

#10 2010-10-31 11:28:28

nXIII
Community Moderator
Registered: 2009-04-21
Posts: 1000+

Re: Trig question

TheSuccessor wrote:

nXIII wrote:

TheSuccessor wrote:

With your wikipedia picture,
sine A     sine B      sine C
--------  =  --------  =  --------
   a            b            h

This is true for any triangle, right-angled or not.

Yep, law of sines. You can also use the law of cosines:
a^2 = b^2 + c^2 - 2bc cos(A)
which means:
side one squared is equal to side two squared plus side three squared minus two times side two times side three times the cosine of the angle opposite side one.

I think the formula is easier to understand than your your explanation. I got lost. :P

That's probably true... let's just leave it at "a, b, and c are sides of the triangle and A is the angle opposite side a." Solve for whatever you want (for example A = asin((a^2 - b^2 - c^2)/2bc))

Last edited by nXIII (2010-10-31 11:28:38)


nXIII

Offline

 

Board footer