This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.
  • Index
  •  » FAQ
  •  » how do I use sin. cos, and tan?

#101 2011-03-11 12:35:59

FunnyProject
Scratcher
Registered: 2010-09-19
Posts: 2

Re: how do I use sin. cos, and tan?

I'm great at maths with things like  89364
                                              + 61839
                                                ______
                                               151203
                                                1111
But rubbish with cos, sin, e^ and all that other stuff. All of the descriptions so far are still a bit complicated, so I'm as stuck as someone who's been hit in sticky glue. Any help with what would happen if you did a certain thing with each mathematical function?
<change{ my life on scratch }by( about 1000000000

Offline

 

#102 2011-04-20 18:08:47

ty44
Scratcher
Registered: 2011-02-05
Posts: 57

Re: how do I use sin. cos, and tan?

<abs( 1 )>
How do you get red "abs" blocks in scratch?
smile


http://t3ak.roblox.com/07ffa69f8ced34c7220abf1a8008c1d1 Mario Kart OBSESSION!

Offline

 

#103 2011-04-20 18:11:54

Paddle2See
Scratch Team
Registered: 2007-10-27
Posts: 1000+

Re: how do I use sin. cos, and tan?

ty44 wrote:

<abs( 1 )>
How do you get red "abs" blocks in scratch?
smile

[/blocks]
The red blocks are obsolete blocks...meaning that they are no longer used in Scratch.  "abs" used to have it's own block...but then it became one of the functions you can get from the drop-down menu. You can maybe still find the old style in an older project.  But be careful - they might not work any more.


http://i39.tinypic.com/2nav6o7.gif

Offline

 

#104 2011-04-26 21:02:02

nextstorm
Scratcher
Registered: 2009-12-13
Posts: 1000+

Re: how do I use sin. cos, and tan?

dingdong wrote:

I'm probably the youngest "good" scratcher on this website, oh yeah I learned scrolling in steps from you, so thanx

Ahem.
*coughialsomakegoodprojectsijustneverbothertopostthemonthesitesbecauseidontfeellikeitandmostofthemarejusttestsandim1yearyoungerthanyoucough*
tongue


bye

Offline

 

#105 2011-04-26 21:03:58

12three
Scratcher
Registered: 2008-06-12
Posts: 1000+

Re: how do I use sin. cos, and tan?

nextstorm wrote:

dingdong wrote:

I'm probably the youngest "good" scratcher on this website, oh yeah I learned scrolling in steps from you, so thanx

Ahem.
*coughialsomakegoodprojectsijustneverbothertopostthemonthesitesbecauseidontfeellikeitandmostofthemarejusttestsandim1yearyoungerthanyoucough*
tongue

Dude, you signed up way after this post was made.

Offline

 

#106 2011-04-27 21:21:05

Pecola1
Scratcher
Registered: 2010-09-06
Posts: 1000+

Re: how do I use sin. cos, and tan?

dingdong wrote:

Moderator Summary:
Sine (sin), cosine (cos), and tangent (tan) are trigonometric functions. They are useful in projects concerning direction. To read more about trigonometry you can view the wikipedia article here.

If you have further, specific questions about these blocks you can ask on this topic.

I have been taught in my algebra class how to use these formulas, but my math teacher didn't mention how to use the formulas on just numbers. So how do I use this formula?
because I still don't understand how I scroll in steps
                    /                          \   /                \
<change X by I sin of direction * 1 I * I speed * -1 I>
                    \                           /  \                /
                    /                           \    /              \
<change Y by I cos of direction * 1 I * I speed *-1 I>
                    \                            /  \               /

Wait! Thats the same as:
                    /                          \   /                \
<change X by I sin of direction I * I speed * -1 I>
                    \                           /  \                /
                    /                      \   /              \
<change Y by I cos of direction I * I speed *-1 I>
                    \                       /  \               /

Because direction * 1 is the same as direction  tongue  am i the only one here who sees this? I am NOT good at math BTW I saw someone answer someone on this once though, so that how I figured it out.

Last edited by Pecola1 (2011-04-27 21:21:56)


If you are reading this, please read to the end, because if you don't you won't know what's at the end. Don't just skip to the end though otherwise you won't be able to read the middle, which is most important. Now you must be wondering why you just read all that, the reason is you may have not noticed something, read it again and see if you notice it this time  smile

Offline

 

#107 2011-05-16 11:51:20

valoran
New Scratcher
Registered: 2011-05-16
Posts: 4

Re: how do I use sin. cos, and tan?

Man, I still don't really understand how can cos and sin determine how much a piece can spin around it's axis. I know it has something to do with the x y graph but I don't understand how you can calculate a formula to spin an piece for a certain amount.  sad

Offline

 

#108 2011-05-17 23:00:54

CosmicProjectz
Scratcher
Registered: 2011-03-25
Posts: 100+

Re: how do I use sin. cos, and tan?

Aaaaahhhhhhh So Many Numbers Im So Confused Im In 4th Grade Only!!!!!!!!


http://img.ponibooru.org/images/f3/f384d262715801d48984773e36aea1ea Good show. http://images.cheezburger.com/completestore/2011/4/1/6ae7329f-716f-4d47-8c2c-67bd4054a165.jpg

Offline

 

#109 2011-05-17 23:02:42

CosmicProjectz
Scratcher
Registered: 2011-03-25
Posts: 100+

Re: how do I use sin. cos, and tan?

Just randomly experiment. It's what I do, and it works!  big_smile


http://img.ponibooru.org/images/f3/f384d262715801d48984773e36aea1ea Good show. http://images.cheezburger.com/completestore/2011/4/1/6ae7329f-716f-4d47-8c2c-67bd4054a165.jpg

Offline

 

#110 2011-05-17 23:04:19

CosmicProjectz
Scratcher
Registered: 2011-03-25
Posts: 100+

Re: how do I use sin. cos, and tan?

FunnyProject wrote:

I'm great at maths with things like  89364
                                              + 61839
                                                ______
                                               151203
                                                1111
But rubbish with cos, sin, e^ and all that other stuff. All of the descriptions so far are still a bit complicated, so I'm as stuck as someone who's been hit in sticky glue. Any help with what would happen if you did a certain thing with each mathematical function?
<change{ my life on scratch }by( about 1000000000

Dude, 89364 plus 121203 is SOOOOOO easy.


http://img.ponibooru.org/images/f3/f384d262715801d48984773e36aea1ea Good show. http://images.cheezburger.com/completestore/2011/4/1/6ae7329f-716f-4d47-8c2c-67bd4054a165.jpg

Offline

 

#111 2011-05-22 07:46:04

rdococ
Scratcher
Registered: 2009-10-11
Posts: 1000+

Re: how do I use sin. cos, and tan?

dingdong wrote:

I'm probably the youngest "good" scratcher on this website, oh yeah I learned scrolling in steps from you, so thanx

I'm even younger.

Offline

 

#112 2011-07-11 09:56:32

daychicken
Scratcher
Registered: 2010-04-23
Posts: 1

Re: how do I use sin. cos, and tan?

How do I change a 2D vector (X,Y) into a direction (D)?

Offline

 

#113 2011-10-20 23:23:33

TVflea
Scratcher
Registered: 2010-08-14
Posts: 1000+

Re: how do I use sin. cos, and tan?

daychicken wrote:

How do I change a 2D vector (X,Y) into a direction (D)?

[blocks]
<when green flag clicked>
<forever>
<set{ X  }to(  <direction>
<set{ Y  }to(  <direction>
<end>
[/blocks]
There you go

Last edited by TVflea (2011-10-20 23:23:46)


-iNetMaster-'s not dead, get used to it. ! big_smile .
http://is.gd/YrQzXX

Offline

 

#114 2011-10-21 12:22:29

kayybee
Scratcher
Registered: 2009-12-07
Posts: 1000+

Re: how do I use sin. cos, and tan?

daychicken wrote:

How do I change a 2D vector (X,Y) into a direction (D)?

Since TVFlea's answer had nothing to do with this, I'll answer it.

What you're looking for a is a script that changes two variables, the X and Y of a vector into a direction...

Not a script to go random directions forever.

I hope you mean that x=positive and y=0 being 0 degrees, and x=negative and y=0 being 180. If not, just subtract 90 or however many degrees you want.

http://i51.tinypic.com/1z4h83r.gif

Offline

 

#115 2012-03-29 19:34:08

mythbusteranimator
Scratcher
Registered: 2012-02-28
Posts: 1000+

Re: how do I use sin. cos, and tan?

I'm twelve and doing 9th grade math, so I did pre-trig two years ago and understand everything. But, I don't understand what use sine and cosine have in scratch. I've seen some games shooting cannonballs and that type of stuff, and I've seen sine and cosine when I download, but I do not get how I'd be able to create an arc.
[scratchblocks]
when I recieve (shoot)
forever 
change X by (sine) of X
change X by (cosine) of X


http://www.foxtrot.com/comics/2012-04-01-fdb37077.gif
clicky

Offline

 

#116 2012-03-31 22:21:53

jji7skyline
Scratcher
Registered: 2010-03-08
Posts: 1000+

Re: how do I use sin. cos, and tan?

You should use [scratchblocks]  tongue


I don't know why you say goodbye, I say hello!  big_smile

Offline

 

#117 2012-04-18 11:31:42

iTweak0r
Scratcher
Registered: 2011-07-30
Posts: 100+

Re: how do I use sin. cos, and tan?

Paddle2See wrote:

ty44 wrote:

<abs( 1 )>
How do you get red "abs" blocks in scratch?
smile

[/blocks]
The red blocks are obsolete blocks...meaning that they are no longer used in Scratch.  "abs" used to have it's own block...but then it became one of the functions you can get from the drop-down menu. You can maybe still find the old style in an older project.  But be careful - they might not work any more.

you should use the new block look (

when gf clicked
say ([abs v] of (-5))
) instead of the old one which looks like

<when green flag clicked>
<say> <abs( -1 )>

Last edited by iTweak0r (2012-04-18 11:33:33)


Make it in Scratch! because it's cooler when it's made in scratch
http://i.imgur.com/D4iqPHR.png

Offline

 

#118 2012-08-23 15:56:53

playzooki
Scratcher
Registered: 2012-02-07
Posts: 100+

Re: how do I use sin. cos, and tan?

dingdong wrote:

I'm probably the youngest "good" scratcher on this website, oh yeah I learned scrolling in steps from you, so thanx

HEY!  mad


I iz a sig. So there. CLICK ME ITS SO IMPORTANT!!!!

Offline

 

#119 2012-09-14 08:50:41

chongyian
Scratcher
Registered: 2012-05-08
Posts: 1000+

Re: how do I use sin. cos, and tan?

This is confusing.... i mean, the sin cos tan, not the explanation...

Offline

 

#120 2012-09-14 09:24:01

mythbusteranimator
Scratcher
Registered: 2012-02-28
Posts: 1000+

Re: how do I use sin. cos, and tan?

chongyian wrote:

This is confusing.... i mean, the sin cos tan, not the explanation...

It was hard for me to understand, but now i got it.


http://www.foxtrot.com/comics/2012-04-01-fdb37077.gif
clicky

Offline

 

#121 2012-09-27 18:19:04

legobob23o
Scratcher
Registered: 2012-06-22
Posts: 500+

Re: how do I use sin. cos, and tan?

Ooooooooooooo bumpeh!  smile  (I mean "Bump")

Offline

 

#122 2013-02-25 12:28:37

firedrake969_test
Scratcher
Registered: 2012-08-08
Posts: 500+

Re: how do I use sin. cos, and tan?

playzooki wrote:

dingdong wrote:

I'm probably the youngest "good" scratcher on this website, oh yeah I learned scrolling in steps from you, so thanx

HEY!  mad

No need to get into an argument.

Bump.


Alt of Firedrake969.

Offline

 
  • Index
  •  » FAQ
  •  » how do I use sin. cos, and tan?

Board footer