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
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
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.
Offline
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
Just learned about it.
You can make ANY triangle, and then take the side lengths, and then find the angles out.
Offline
the project was initially for firedrake, but here is an example using trig http://scratch.mit.edu/projects/piguillaud_test/3115630
Offline