# What are Sine and Cosine

#1

Hi! I’m afraid I don’t quite understand sin and cosine. It’ll seems very complicated, can someone teach me how? Thanks

14 Likes
#2

I don’t understand it either, but maybe @CodeHelp could help.

10 Likes
#3

This is an old topic explaining sin and cos and it’s using the old Hopscotch version, but it is still really helpful:

7 Likes
#4

Mmmmmm… Maybe look it up on Google or something? Well, to make a circle with sin and cosine you just do this (you should also ask some other more educated people for help too):
let r = [what you want the radius of your circle to be]
let x = [the x where you want your circle to be]
let y = [the y where you want your circle to be]
Then, make a 7 = 7 block or just a repeat forever inside a game starts.
When 7 = 7
Set Position x ( r * cos(self(rotation)) + x) y (r*cos(self(rotation)) + x)
} End
Here’s a screenshot if your a visual learner like me:

Here’s a link to the project: https://c.gethopscotch.com/p/zu990mz78

4 Likes
#5

You beat me to it.

6 Likes
#6

Thank you @William04GamerA! That’s really helpful! Here’s a question- do you have any game ideas?

7 Likes
#7

Try making a dodging game where the enemies move in sine/cosine waves!

8 Likes
#8

What @CreationsOfaNoob suggested is a really good idea! You can also take a look here for lots of ideas:

3 Likes
#9

Come join the Party! Yayyy

3 Likes
#10

Could someone help me as well? I also want to know a lot of math blocks.

1 Like
#11

Sine and cosine is blocks were you can do so objects are going around things.

In The first space you are going to write how far away from the point the object should be. In the second space you’ll insert a variable who’s increasing itself every time. (The speed).
And the last space is for were the point should be.

Cos, is for X/Widht. So put cos in the set pos. X.
Sine, is for Y/Height. So put sine in the set pos. Y.

2 Likes