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

#1 2013-02-26 01:32:26

redazalea
New Scratcher
Registered: 2012-10-11
Posts: 2

Example of projects using cosine law?

I understand the math concept, but have no idea how it works in Scratch.

PLEASE HELP I WILL BE ETERNALLY GRATEFUL!!!

Thank you!

Offline

 

#2 2013-02-26 02:58:30

kayybee
Scratcher
Registered: 2009-12-07
Posts: 1000+

Re: Example of projects using cosine law?

I'm not exactly sure as I haven't learned the law of cosine yet (or any of the applicable trig for that matter) but apparently you can use it with three sides to find an angle (or all of them) which can help you draw triangles I guess?

So if you had a 4-7-9 triangle you could use the law of cosines to find two angles and use the pen to draw it. Does that make sense?

Offline

 

#3 2013-02-26 03:53:23

shadowmouse
New Scratcher
Registered: 2013-02-03
Posts: 100+

Re: Example of projects using cosine law?

You can use it if you're using x and y velocities in your project to find out what direction the sprite has actuallt moved in (because it moves across then up, forming two sides of a right angled triangle). This is very useful for projects that emulate real life and for bouncing e.t.c.

Offline

 

#4 2013-02-26 12:18:08

firedrake969_test
Scratcher
Registered: 2012-08-08
Posts: 500+

Re: Example of projects using cosine law?

I haven't gotten to that trig yet, but you don't really need to use it for anything.  What shadow said can be done using the distance block.  I think kayybee sums it up nicely.


Alt of Firedrake969.

Offline

 

#5 2013-02-26 21:29:14

kayybee
Scratcher
Registered: 2009-12-07
Posts: 1000+

Re: Example of projects using cosine law?

shadowmouse wrote:

You can use it if you're using x and y velocities in your project to find out what direction the sprite has actuallt moved in (because it moves across then up, forming two sides of a right angled triangle). This is very useful for projects that emulate real life and for bouncing e.t.c.

I think you're using the cosine function, not the cosine law.

Offline

 

#6 2013-02-26 21:35:00

Firedrake969
Scratcher
Registered: 2011-11-24
Posts: 1000+

Re: Example of projects using cosine law?

Just learned about it.

You can make ANY triangle, and then take the side lengths, and then find the angles out.


Click the sign.
https://s3.amazonaws.com/eterna/eterna2/logo2.png

Offline

 

#7 2013-02-26 22:04:00

piguillaud
Scratcher
Registered: 2010-06-19
Posts: 100+

Re: Example of projects using cosine law?

the project was initially for firedrake, but here is an example using trig http://scratch.mit.edu/projects/piguillaud_test/3115630

Offline

 

Board footer