 So you've been using Scratch for a little while and you're pretty comfy with the operator blocks But then there's that gnarly one that has all the drop-down options. What on earth do they mean? Well in this tutorial look at the Scratch sign cause in 10 options of that drop-down menu and what they mean Stick around to the end as well And I'll show you how can use these blocks to make a game come in your way in just a sec Hey, welcome to the sign cause intent tutorial This tutorial is going to work best with people who already have a good understanding of lists and have some basic understanding of trigonometry Specifically so Catoa if you don't go check the card in the top right hand corner right now That's going to link you to a Khan Academy video on the unit circle And I strongly encourage you to watch it if you have no idea what I'm talking about It's a bit of a journey trigonometry and if you're just starting out be persistent. You'll get there Our focus is finding out which values we can put into the sign cause intent functions as well as the inverse functions of a sign A cause and a tan we're going to do that creating a worked example like you're seeing on the screen right now We'll get to that in part two I think it's great using a worked example so you guys get some familiarity with the values Okay, let's first start with the sign cause and tan functions. What values can you put inside of here? We're going to jump across the unit circle to check it out I'm here in the wonderful website Geo Gebra, and we've got a unit circle here How do we know this is a unit circle? The unit circle has a radius of one all the way around values that go inside the sign cause and tan functions They're angles and you can see that here on the screen as I move this slider I'm changing the angle here of this right angle triangle and it goes all the way up to 360 degrees one complete rotation or revolution of our unit circle now I've just reset our angle back to zero degrees and There is no angle here on our triangle You can see here our values causes equal to one and sign is equal to zero So if we put the zero degree value inside of our trig functions, these are the results we'll get So let's jump back over a stretch and check it out Okay, so if I put in the number zero here for our zero angle the sign of a zero degree angle is going to be zero So if I click this and boom, that's what we get here. Let's put the same angle in here for cause What do you think we'll get? That's right. We get one We're gonna skip over tan just for a moment and instead we'll enter in some different angles here So we're gonna enter in a 30 degree angle and let's check out the return values for the sign of 30 degrees We get the value zero point five and for the cause of 30 degrees. We get zero point eight I'm gonna round that up to eight seven. Okay, let's head back over to the unit circle Now I'm back over here at the unit circle and you can see I've updated the angle to 30 degrees You can see that the cause value is zero point eight seven and the sign value is zero point five Now remember our unit circle has a radius of one So here's zero and on the outer edge is one and it makes sense this red line here It's on our x-axis and it's about 87 percent of the way all the way to one, isn't it? There's about 13 percent difference. The same goes for the sign value now Sign kind of refers to the y-axis. So remember our radius our full radius is one So all the values between zero and one and our sign is about halfway up that so about 50% of the way So the big takeaway from this that cause refers to the x-axis and sign refers to the y-axis And this is true for all angles that start their rotation from the x-axis like we're doing here Now the way that I like to remember that is through this little memory device here I'm not cozy and cozy looks like cause why but we're not cause why we're crossing instead And I've matched that up with the C's of crossing and cause and the X for crossing So cause is crossing or going a cross the x-axis. You can remember that then sine y is just the opposite All right now that we've got some understanding that sine means y and cause means crossing across the x-axis Tan is just the slope of our radius here So to measure the slope of this line here, we just use the formula rise over run where rise is y going up for rising and Run is like running across the x-axis and we can represent that formula in scratch by duplicating our sine and cause blocks here And we can get the division operator block and remember it's rise Which is the y-axis meaning sine the sine value over the run, which is the x value now If I click that we get this long number here Just remember 0.577 now if I type in 30 here to tan to align all of our angles here And I press it look at that we get the same value I'm just gonna reset our angle here back to zero degrees You'll see that's when causes equal to one and the height is equal to nothing So that's making sense now as I increase the values here You can see the x-axis reducing and the y-axis values increasing get all the way to 90 degrees Where the x-value causes zero now and the y-value is at its maximum If we continue that you can see that the x-value is actually going negative now and the y-value is getting smaller And when we go beneath the x-axis, that's when y is less than zero and it becomes negative You can see we're starting to get some negative sine values What we're gonna do now is head over to scratch and code up all these angles so we can return all the values of our sine, cause and tan functions What I'd like you to do is open up scratch open a new project and head over to the backdrops And I'd like you to add in here the background the XY grid We're gonna create a new variable actually we'll just rename this one and we're gonna call it angle We're going to when the green flag is clicked going to set angle to zero degrees Then we're going to repeat for a full revolution of our circle So a full revolution is at 360 and then we want to change our angle by one So you can see here as I click the green flag our angle is incrementing Now we're going to make three lists we're going to create sine values, cause values and tan values So you can see here we've got those three lists and the thing I like to do before we start mutating those lists Is just to delete all of those values we're going to delete all the values of cause All the values of sine and all the values of tan Recall that the sine, cause and tan functions they all take an angle So what we'll do is we're going to add to sine values the sine of the current angle We'll grab our angle variable So remember the angle is incrementing from zero to 360 We're going to have 360 values in here Which means we'll record all the values of the sine of this angle We'll do the same thing for cause and tan I just duplicated but remember to change the list that you're inserting those values into Lastly we just need to click green flag and get all about values here Now the list item number could refer to the angle but you can see here it's slightly off Cause remember for a zero degree angle the y value should be zero And the colors should be one To get around that you can just set the starting angle to one You can see at the beginning when the angle is one this is the value of sine, cause and tan I strongly encourage you to look through these lists now and check out the range of their values So when I scroll down here and I know when I get to 90 degrees Sine's going to be one and then it reverses The opposite happens because it sort of starts at one and then it decreases all the way down When the angle's 90 to a value of zero And tan does something even more funky that we'll see with the graph when it gets to 90 It ends up at this infinity value See if you can figure out what the maximum value of sine is And the minimum value of sine is And do the same for cause and tan So remember the sine, cause and tan functions take an angle And the sine and cost functions return values between negative one and one And tan returns values between negative infinity and infinity They pass through negative one, zero and one Before we start drawing I just want to quickly talk about the inverse functions For the sake of being pedantic The A here stands for arc It's arc sine, arc cause and arc tan But I'm just going to call them a sine, a cause and a tan So if the sine, cause and tan functions take an angle And return a value between negative one and one for the large part The sine and cause at least Then these inverse functions they just do the opposite So we click on this function here We get 0.5 which is the return value of sine of 30 So if we input 0.5 into the a sine function We should get an angle of 30 And we do Try the same thing for cause and tan in the inverse functions So a cause and a tan The inverse functions just take that value between negative one and one For a sine and a cause And negative infinity to infinity for a tan But you can't actually type infinity into the a tan block These inverse trig functions they're super useful to calculate The direction of any sprite And you'll see that if you work through the game of this trig series That's probably a nice place to park this tutorial In part two we're going to go ahead and graph these trig functions On the stage right here using some sprites I was going to combine it with this one but it got a little long So we're going to chop it up But now you know which values to put into the trig functions And the inverse trig functions I strongly encourage you to revisit the unit circle link below in the description And also go check out the Khan Academy videos If you're a bit fuzzy on trigonometry Remember it's a journey but you've got this Alright it's time for a surfing scratches shout out This one's been a little while I'm making And it goes out to bananas underscore 20 Who requested a more advanced operator box tutorial Thanks for your request bananas underscore 20 As that gave me a little wriggle on to make this tutorial Do you want a scratch shout out? There's a few ways that you can go about it The first one is remix one of my projects And show me what you did to it Show me how you adjusted to it and share it with me The second way is to make a video request on my scratch profile Or on one of my videos If I catch it and I make the video I'm going to give you a shout out The third way is to join the surfing scratcher shout out studio Yeah a bit of a mouthful All the guidelines are over there There's a link in the description And the last way is to join the highest tier of my Patreon page Link below in the description Hope you enjoyed this scratch sign cause intent tutorial I'm off to go find a wave I'll catch you in the next one