Cosine!

Your browser needs java to view projects. Click here to install Java.

user_icon Canthiar shared it 2 years, 6 months ago
991 views, 1 tagger, 7 people love it, 164 downloads, in 7 galleries
Add to my favorites?
Flag as inappropriate?

Comments

You need to be logged in to post comments

Add a Comment

 
DrSuper DrSuper 3 months, 3 weeks ago

cool Checkout the graphing calculator Gallery.

Scaper Scaper 8 months ago

A cosine is mathamatical equation, you can find in scratch under the number tab.

Canthiar Canthiar 7 months, 3 weeks ago

At the time that this was written there was no cosine function in Scratch.

Masterock Masterock 1 year, 9 months ago

well, I know what cosine is but I didn't know why Pi was needed and that was a very easy understandable explanation.

HopeD HopeD 1 year, 11 months ago

What's a cosine?

Canthiar Canthiar 2 years, 1 month ago

Because the Taylor series expansion works on 0-pi instead of 0-180. Pi is the ratio of a circle's circumference to it's diameter. If you want to find the distance along the edge of a circle you will find the angle to that spot from the beginning of the circle , convert it to radians(0-pi) and multiply it by the radius.

Oldschooler2 Oldschooler2 2 years, 1 month ago

I understand but why does the "do cosine" sprite need to have the value of pi in the equation to calculate the cosine based on the angle?

Canthiar Canthiar 2 years, 1 month ago

Sine and cosine, along with tangent, are functions based on the relationship of the sides of a right triangle with the angle of one of the non-right angle corners.

MESclan MESclan 2 years, 1 month ago

whats a cosine?

Canthiar Canthiar 2 years, 1 month ago

It's based on the relation ship between the sides of the triangle as they change size. If you own a protractor you can look at the angle on the outer edge. The triangle is formed by drawing a line down from the circular edge to the bottom, then from that point to center of the protractor and then back to the angle on the edge. If you measure the length of the lines that you drew then the ratio of the line on the bottom to the sloped line is the cos of the angle.

Oldschooler2 Oldschooler2 2 years, 1 month ago

REALLY: WHY DOES THIS DRAW A CURVED SLOPE IF COSINE IS BASED ON RIGHT TRIANGLES? Sorry for the outburst.

Oldschooler2 Oldschooler2 2 years, 2 months ago

So if cosine is based on triangles, why does this draw a curved slope? I just don't understand that.

Canthiar Canthiar 2 years, 3 months ago

Sine and cosine, along with tangent, are functions based on the relationship of the sides of a right triangle with the angle of one of the non-right angle corners.

Llamalover Llamalover 2 years, 3 months ago

What are cos and sin and the things like that?

sdk01 sdk01 2 years, 4 months ago

WOWIE!

JonnyX JonnyX 2 years, 5 months ago

Interesting :D

Canthiar Canthiar 2 years, 5 months ago

Scratch doesn't come with trig functions. This program shows you that it is possible to write your own using a Taylor-series expansion. It's an instructional program for people who want to be able to use cos in their programs. roberth and kevin_karplus have programs that calculate sin and cos in a different way based on a program that jay wrote.

fbrd fbrd 1 year, 4 months ago

Scratch 1.2.1 comes with sine cosine and tangent (but not secant cosecant or cotangent.)

Canthiar Canthiar 2 years, 5 months ago

Scratch doesn't come with trig functions. This program shows you that it is possible to write your own using a Taylor-series expansion. It's an instructional program for people who want to be able to use cos in the programs. roberth and kevin_karplus have programs that calculate sin and cos in a different way based on a program that jay wrote.

Kittycatmeow Kittycatmeow 2 years, 5 months ago

I don't get it!

MyRedNeptune MyRedNeptune 2 years, 6 months ago

Wow!

Canthiar Canthiar 2 years, 6 months ago

Sine can be done in a similar manner with the sin Taylor series. Right now it's really slow because it's using a [ broadcast and wait ] to call the cosine function and the cosine function is doing two [ repeat until ] commands which all kill performance.

fandebiao fandebiao 2 years, 6 months ago

cool

Please Wait...