Discuss Scratch

Matruxo
Scratcher
2 posts

Can somebody teach me sine and cosine on Scratch?

I don't know a lot of math, so I would love to learn about sine and cosine If you really know about math PLEASE teach me, thanks.
gdfsgdfsgdfg
Scratcher
1000+ posts

Can somebody teach me sine and cosine on Scratch?

ok:
https://en.m.wikipedia.org/wiki/Sine_and_cosine


1000th post also use -forbidden- or highlight and ctrl (optional on some browsers) + shift + down arrow for more of my siggy


We have the craps ®

I gotta go touch sum grass

If it causes issues make it optional - gdfsgdfsgdfg

Do some research before replying to my posts - gdfsgdfsgdfg

curse you 60 sec rule

glory to Gdfsg Land

gdfsgdfsgdfg returns

Ocular(don’t look at my old posts plz)
PostPercent

kumquats? nah
my siggy is built with titani- *gets eaten*

Gdfsg Radio Station:
https://scratch.mit.edu/projects/1000736602

Are you sleeping you tall cat (project):
https://scratch.mit.edu/projects/1002042247/

The only suggestions I fully support are:
https://scratch.mit.edu/projects/924995948/

Don’t force me to get proof
get it yourself

my favorite topic is this (due to comedic purposes):
https://scratch.mit.edu/discuss/topic/709979/

my favorite post is this (it’s deleted but I got it from ocular):
https://ocular.jeffalo.net/post/7517300

Grand borrowing cars IV intro and loading (template):
https://scratch.mit.edu/projects/972295666/

Guess the game by its mission name:
https://scratch.mit.edu/discuss/topic/750145/

GBC (GTA) topic:
https://scratch.mit.edu/discuss/topic/751981/

BF (Battlefield) topic:
https://scratch.mit.edu/discuss/topic/753243/

still don’t have the popularity lol (atleast I reached 100 followers)

Skill issue

reject
Embrace :)
Matruxo
Scratcher
2 posts

Can somebody teach me sine and cosine on Scratch?

I didn't understand even 0.01% of what you just sent me
AAchiefs15
Scratcher
100+ posts

Can somebody teach me sine and cosine on Scratch?

sine and cosine are complex subjects that involves learning many other math concepts for it to make sense. it's probably best that you learn these concepts in school so it makes sense when you learn it in your geometry class

or just take a khan academy course or something

Last edited by AAchiefs15 (March 26, 2024 18:50:00)


xavier worthy
gdfsgdfsgdfg
Scratcher
1000+ posts

Can somebody teach me sine and cosine on Scratch?

Matruxo wrote:

I didn't understand even 0.01% of what you just sent me
its a wikipedia article


1000th post also use -forbidden- or highlight and ctrl (optional on some browsers) + shift + down arrow for more of my siggy


We have the craps ®

I gotta go touch sum grass

If it causes issues make it optional - gdfsgdfsgdfg

Do some research before replying to my posts - gdfsgdfsgdfg

curse you 60 sec rule

glory to Gdfsg Land

gdfsgdfsgdfg returns

Ocular(don’t look at my old posts plz)
PostPercent

kumquats? nah
my siggy is built with titani- *gets eaten*

Gdfsg Radio Station:
https://scratch.mit.edu/projects/1000736602

Are you sleeping you tall cat (project):
https://scratch.mit.edu/projects/1002042247/

The only suggestions I fully support are:
https://scratch.mit.edu/projects/924995948/

Don’t force me to get proof
get it yourself

my favorite topic is this (due to comedic purposes):
https://scratch.mit.edu/discuss/topic/709979/

my favorite post is this (it’s deleted but I got it from ocular):
https://ocular.jeffalo.net/post/7517300

Grand borrowing cars IV intro and loading (template):
https://scratch.mit.edu/projects/972295666/

Guess the game by its mission name:
https://scratch.mit.edu/discuss/topic/750145/

GBC (GTA) topic:
https://scratch.mit.edu/discuss/topic/751981/

BF (Battlefield) topic:
https://scratch.mit.edu/discuss/topic/753243/

still don’t have the popularity lol (atleast I reached 100 followers)

Skill issue

reject
Embrace :)
Za-Chary
Scratcher
1000+ posts

Can somebody teach me sine and cosine on Scratch?

gdfsgdfsgdfg wrote:

Matruxo wrote:

I didn't understand even 0.01% of what you just sent me
its a wikipedia article
Wikipedia articles are not exactly known for being accessible for beginners, in terms of mathematical concepts.

Last edited by Za-Chary (March 26, 2024 21:27:05)


This is my forum signature! On a forum post, it is okay for Scratchers to advertise in their forum signature. The signature is the stuff that shows up below the horizontal line on the post. It will show up on every post I make.

I was a Scratch Team member from May 10th 2019 to October 29th 2021.

my notebook | scratch team essay | accessibility essay
MythosLore
Scratcher
1000+ posts

Can somebody teach me sine and cosine on Scratch?

Do you know what a right triangle is?

actually working on a game so i'll be a bit less active on the forums
ajskateboarder
Scratcher
1000+ posts

Can somebody teach me sine and cosine on Scratch?

(I learned this last year so let's hope I can remember)

The main purpose of sine and cosine is to find unknown side lengths given some angle measure in degrees or radians (radians are a way to represent angles in terms of pi)

The outputs of sine and cosine usually fall on some spot on a unit circle, and can be used to form a triangle. The unit circle is split up into 4 quadrants like so:

2 | 1
——–
3 | 4

The output of sine gives the vertical length of the triangle and the output of cosine gives the horizontal length. For instance, the sine of 45 degrees and cosine of 45 degrees give 2√2, which should form a right triangle on the first quadrant

Sine and cosine (and tangent) can also be used to form repeating waves, which Scratchers use sometimes for cool effects

Last edited by ajskateboarder (March 27, 2024 00:28:11)

leahcimto
Scratcher
1000+ posts

Can somebody teach me sine and cosine on Scratch?

This is a right triangle. The red line is called the hypotenuse. It is opposite from the right angle (90 degrees).



In a simple explanation, sine, cosine, and tangent are each a ratio of sides in a right triangle.

A helpful name to remember each ratio is with the abbreviation, SOH CAH TOA. We'll go through each one.

———

SOH (Sine)

SOH stands for Sine = Opposite/Hypotenuse.

The opposite is the side across from the angle. For example, in the picture above, the opposite of angle C is line AB.

The hypotenuse is the side across from the right angle. For example, in the picture above, the hypotenuse of the triangle is line AC.

So, sin C = AB/AC
Substituting the values from the triangle,
sin C = 3/5

———

CAH (Cosine)

CAH stands for Cosine = Adjacent/Hypotenuse.

The adjacent is the side next to the angle, not including the hypotenuse (the hypotenuse is described as the hypotenuse). For example, the adjacent of angle C is line BC, because it is next to angle C.

The hypotenuse is the side across from the right angle. For example, in the picture above, the hypotenuse of the triangle is line AC.

So, sin C = BC/AC
Substituting the values from the triangle,
cos C = 4/5

———

TOA (Tangent)

TOA stands for Tangent = Opposite/Adjacent.

The opposite is the side across from the angle. For example, in the picture above, the opposite of angle C is line AB.

The adjacent is the side next to the angle, not including the hypotenuse (the hypotenuse is described as the hypotenuse). For example, the adjacent of angle C is line BC, because it is next to angle C.

So, tan C = AB/BC
Substituting the values from the triangle,
tan C = 3/4

———

So what can you do with these? Let's look at an example trig problem:


For this example, we will be trying to solve for side AC. Let AC be x.

We will use tan to find it and plug in what we know.

tan() = opposite / adjacent

Plug in the numbers from the problem
tan(35) = 8 / x

Multiplying both sides by x, we get
x tan(35) = 8

Dividing both sides by tan(35), we get
x = 8/tan(35)

Now, put 8/tan(35) in a calculator.
The answer is approx. 11.42518405

———

Hope this helps. Again, this not an extensive explanation and doesn't really show how to use it on Scratch.

Edit: corrected “SOH stands for Sine = Opposite/Adjacent.” to “SOH stands for Sine = Opposite/Hypotenuse.”

Last edited by leahcimto (March 27, 2024 22:51:19)

Vaibhs11
Scratcher
1000+ posts

Can somebody teach me sine and cosine on Scratch?

⬆️⬆️⬆️ leahcimto's explanation above is as good as it gets ⬆️⬆️⬆️
I do want to add a few things to it:

The functions are not only affiliated with right triangles, but circles too. In Scratch, we mainly use these functions for stuff related to circles and arcs.


Imagine you have a circle [with radius 1] and have picked a specific point in the circle.
You also have an angle ‘α’ which is the angle from 0° of the circle to your point.
Sine and cosine can be used to find the x and y position of your point in the circle.

In the image given above,
cos α would be the x position of the point
sin α would be the y position of the point

Let's say the radius is 1cm angle α is 30°.
That means the x position of the dot = cos 30° = around 0.866cm
and the y position of the dot = sin 30° = 0.5cm

If you have a circle whose radius is bigger than 1, then just multiply the radius with the result.
for example, if radius is 3, you can just do 3 × sin 30°

Remember that since Scratch's angles are 90° off, in Scratch, sin corresponds to x position and cos to y position.

Using all that, we can make a script to draw a circle using pen:

pen down
set [i v] to [0]
repeat (360)
set x to (([sin v] of (i)) * (radius::#666)) // In scratch, sin corresponds to x position
set y to (([cos v] of (i)) * (radius::#666)) // In scratch, cos corresponds to y position
change [i v] by (1)
end

In that script, we have a variable ‘i’ which we treat as the angle. The variable ‘i’ is iterated from 0 to 360, 360 being the number of degrees in a circle. To figure out where our sprite needs to go next while drawing the circle, we use sin to find out the x position, and cos to find out the y position. Then we multiply the result with the radius.
Za-Chary
Scratcher
1000+ posts

Can somebody teach me sine and cosine on Scratch?

Probably the “easiest” explanation (depending on who you ask) is the following: below are graphs of sin(x) (red) and cos(x) (blue).

This doesn't actually explain what sine and cosine really are — see the two posts above mine for more detailed information — but at least it gives you a visualization of sine and cosine. For the purposes of using them on Scratch, this may be all that you need to know.




This is my forum signature! On a forum post, it is okay for Scratchers to advertise in their forum signature. The signature is the stuff that shows up below the horizontal line on the post. It will show up on every post I make.

I was a Scratch Team member from May 10th 2019 to October 29th 2021.

my notebook | scratch team essay | accessibility essay
leahcimto
Scratcher
1000+ posts

Can somebody teach me sine and cosine on Scratch?

Here's an example project using that does what @Za-Chary is showing.
lgrov44
Scratcher
500+ posts

Can somebody teach me sine and cosine on Scratch?

Draw a circle with radius 1 at the center of its plane and a line from the center outwards to infinity. Sin(x) is the height of the intersection from the center while Cos(x) is the width. X is the angle (defined by the originally drawn line and a line drawn from the center to directly right to infinity, it is the inside angle.) See image below.

See Source

Last edited by lgrov44 (March 28, 2024 22:04:09)


lgrov44, an Australian Scratcher whose most famous for his follows, followed by his activity, especially on Discussion Forums, and his follower count. Is also a remix chainer and school student. Identifies as bisexual.

My top 3 favourite people:
1. @Higgies (deleted) - First Follower, Thank you so much! (Wish you could see this…)
2. @Dubstepv1 (Banned/Moved) - Remix Chainer
3. @GIitchInTheMatrix (Moved to @GlitchedThrough) - Many small things.
Still looking for one of my first followers who are still active.

Powered by DjangoBB