Discuss Scratch

OrionDark7
Scratcher
26 posts

([sin v] of () ) block

Hi I don't know how to use the
([sin v] of (9))
block.

I would like to know how to use this block.

I don't care if it's a super long explanation just tell me.

Thank you.

OrionDark7

Check out my newest game, Road Rage, here!
powercon5
Scratcher
1000+ posts

([sin v] of () ) block

([sin v] of (9))
([cos v] of (9))
([tan v] of (9))
are all to do with trigonometry

sin = opposite / hypotenuse

cos = adjacent / hypotenuse

tan = opposite / adjacent

a way to remember that is soh cah toa

however for a guide here is a project done by scmb1* about it
https://scratch.mit.edu/projects/11488107/



Witty signature.





OrionDark7
Scratcher
26 posts

([sin v] of () ) block

powercon5 wrote:

([sin v] of (9))
([cos v] of (9))
([tan v] of (9))
are all to do with trigonometry

sin = opposite / hypotenuse

cos = adjacent / hypotenuse

tan = opposite / adjacent

a way to remember that is soh cah toa

however for a guide here is a project done by scmb1* about it
https://scratch.mit.edu/projects/11488107/
Could you explain it a little more I can't quite figure it out.

OrionDark7

Check out my newest game, Road Rage, here!
powercon5
Scratcher
1000+ posts

([sin v] of () ) block

OrionDark7 wrote:

powercon5 wrote:

([sin v] of (9))
([cos v] of (9))
([tan v] of (9))
are all to do with trigonometry

sin = opposite / hypotenuse

cos = adjacent / hypotenuse

tan = opposite / adjacent

a way to remember that is soh cah toa

however for a guide here is a project done by scmb1* about it
https://scratch.mit.edu/projects/11488107/
Could you explain it a little more I can't quite figure it out.
did you look at all of the project it is very helpful



Witty signature.





OrionDark7
Scratcher
26 posts

([sin v] of () ) block

powercon5 wrote:

OrionDark7 wrote:

powercon5 wrote:

([sin v] of (9))
([cos v] of (9))
([tan v] of (9))
are all to do with trigonometry

sin = opposite / hypotenuse

cos = adjacent / hypotenuse

tan = opposite / adjacent

a way to remember that is soh cah toa

however for a guide here is a project done by scmb1* about it
https://scratch.mit.edu/projects/11488107/
Could you explain it a little more I can't quite figure it out.
did you look at all of the project it is very helpful
Oh Oops I didn't see the link there I will check it out.

OrionDark7

Check out my newest game, Road Rage, here!
Ataxaos
Scratcher
500+ posts

([sin v] of () ) block

OrionDark7 wrote:

Oh Oops I didn't see the link there I will check it out.
It's 9th to 10th grade math. To extremely oversimplify it, it's has to do with the three sides of a triangle.
This website called "Math is Fun" explains it quite well, but doesn't go too deep so that it becomes rocket science.
If you're interested in math that's probably above your current grade in school, definitely check out the link!

hOI! If you enjoy endless dodging games, you might like “MEGALOVANIA” or “Dodge This”! :3

——MEGALOVANIA————–Dodge This—————–It's a Tutoriel——–
OrionDark7
Scratcher
26 posts

([sin v] of () ) block

Ataxaos wrote:

OrionDark7 wrote:

Oh Oops I didn't see the link there I will check it out.
It's 9th to 10th grade math. To extremely oversimplify it, it's has to do with the three sides of a triangle.
This website called "Math is Fun" explains it quite well, but doesn't go too deep so that it becomes rocket science.
If you're interested in math that's probably above your current grade in school, definitely check out the link!
Oh, I'm only in 6th Grade. I'll figure it out somehow.

OrionDark7

Check out my newest game, Road Rage, here!
MegaApuTurkUltra
Scratcher
1000+ posts

([sin v] of () ) block

OrionDark7 wrote:

Oh, I'm only in 6th Grade. I'll figure it out somehow.
You can still understand it. It's a pretty simple concept.

See here we have a right triangle. We also have an angle labelled α (alpha), so we will use the variable α to represent the degree measure of the angle. In the diagram you also see sides labelled h, a, and b. We will use the variables h, a, and b to represent the length of those sides.
sin α = a/h
This is the definition of sine (noted “sin” because mathematicians are super lazy as you'll come to understand). It's true for any right triangle that sin α = a/h, or in English, the sine of any of the acute angles is equal to the length of the side opposite to that angle divided by the length of the hypotenuse (the longest side, which is always opposite the 90 degree angle).

For example, suppose α is 30 degrees. The sine of 30 degrees is 0.5. Well, it just so happens that every right triangle with a 30 degree angle has its hypotenuse twice as long as the side opposite the 30 degree angle.

Similarly, cosine (noted “cos”) is defined as (referring to the above picture)
cos α = b/h
And tangent (tan) is
tan α = a/b = (sin α)/(cos α)

So what is this useful for? Well, we can convert angles into side lengths! Suppose we want to move a sprite by 50 pixels at an angle of 30 degrees. Refer back to the triangle above. We have α = 30 degrees. The sprite starts at vertex A and moves to vertex B. And, the length of side h is 50 pixels. So, you'd have code like this:
change x by ((50)*([cos v] of (30)))
change y by ((50)*([sin v] of (30)))
Well, you could also do
point in direction (50)
move (50) steps
but that internally uses the same math as the first script.

So why does it work? Well, we have
sin α = a/h
cos α = b/h
which is
sin 30 = a/50
cos 30 = b/50
Where a is how much we have to change y by and b is how much we have to change x by. So, if we solve for a and b then we have
a = 50 * sin 30
b = 50 * cos 30
which is exactly what you see in the script.

I hope this makes sense, and I hope you learned something

$(".box-head")[0].textContent = "committing AT crimes since $whenever"
gamebeater187
Scratcher
1000+ posts

([sin v] of () ) block

OrionDark7 wrote:

Hi I don't know how to use the
([sin v] of (9))
block.

I would like to know how to use this block.

I don't care if it's a super long explanation just tell me.

Thank you.

this reports the sin of a number.

My 1000th post!
I haven't changed my logo since my 96th post on 2014. Now at 1000 posts, I changed my logo!
MegaApuTurkUltra
Scratcher
1000+ posts

([sin v] of () ) block

gamebeater187 wrote:

OrionDark7 wrote:

Hi I don't know how to use the
([sin v] of (9))
block.

I would like to know how to use this block.

I don't care if it's a super long explanation just tell me.

Thank you.

this reports the sin of a number.
</captain-obvious>

The OP needs help understanding what the block does, so an explanation or a link to one might be more helpful than repeating the name.

Last edited by MegaApuTurkUltra (Oct. 17, 2015 17:33:56)


$(".box-head")[0].textContent = "committing AT crimes since $whenever"
dgprogramer
Scratcher
30 posts

([sin v] of () ) block

sin= sin = opposite / hypotenuse

cos = adjacent / hypotenuse

tan = opposite / adjacent

It's just trigonometry. It's the same thing if that's what you were asking. If you're still confused, there are a ton of websites on the net that describe what sin, cos and tan are! Hope this helps!
codeman1044
Scratcher
1000+ posts

([sin v] of () ) block

Please don't necropost. This topic is from 2015.

Hello 60 second rule x2

This is my signature, which shows up every time I post and is automatic. To make a signature of your own, locate the “Change your signature” option in the bottom left of the Discussion Home.
I am nothing if not consistently inconsistent.
Snap! is a website that offers block coding like Scratch, but also offers the creation of your own blocks and writing JavaScript functions. The adventurous should consider checking it out!
Potentially useful tutorials and topic coverage
If you want to see a new tutorial added to this, feel free to leave a suggestion on my profile.
codeman1044
Scratcher
1000+ posts

([sin v] of () ) block

Please don't necropost.

This is my signature, which shows up every time I post and is automatic. To make a signature of your own, locate the “Change your signature” option in the bottom left of the Discussion Home.
I am nothing if not consistently inconsistent.
Snap! is a website that offers block coding like Scratch, but also offers the creation of your own blocks and writing JavaScript functions. The adventurous should consider checking it out!
Potentially useful tutorials and topic coverage
If you want to see a new tutorial added to this, feel free to leave a suggestion on my profile.
PenguinPower312
Scratcher
2 posts

([sin v] of () ) block

([sin v] of (9))

I would like to know what this block means because I really don't understand! Thanks !

Last edited by PenguinPower312 (Dec. 2, 2020 00:41:10)

DerpyHead0
Scratcher
1000+ posts

([sin v] of () ) block

PenguinPower312 wrote:

([sin v] of (9))

I would like to know what this block means because I really don't understand! Thanks !
please don't necropost, this thread is from 2015. you can just read the thread for answers, or create a new thread if you still have problems.

when I start as a clone
delete this clone
PenguinPower312
Scratcher
2 posts

([sin v] of () ) block

okkkkk
sinber2
Scratcher
1 post

([sin v] of () ) block

banana
deck26
Scratcher
1000+ posts

([sin v] of () ) block

sinber2 wrote:

banana
Please don't spam or necropost.
-ArtCode-
Scratcher
2 posts

([sin v] of () ) block

()
set pen color to [#8e187b]
Test

Powered by DjangoBB