Tangent Tutorial


#21

I tried playing around with it and most of the time it didn't do anything! What block do I use it with (set pos, move Forward etc,) and is it used with a number or a value?

@t1_hopscotch and @ThinBuffalo


#22

I'm not sure. I have barely used it.

Ask t1 or ThinBuffalo


#23

I'll try, even though my understanding of arctan is pretty minimal for now.


#24

You are teh cow master.


#25

Moo?


#26

It's not moo.

You have to say it with feeling

MOO MOO MOOOOOOOO


#27

Moo.

(((((LGBOT.)))))


#28

I know what sin, cow, and tan are but what about inverse? arcsin, arccow, and arctan? (Yes I said cow)


#29

I don't actually know of many uses of tangent, but you can graph it using Set Position like I showed earlier :smiley: Like sine and cosine, tangent takes a value and produces different numbers depending on what that value is so you can use it with a value. It's not limited to just that though but I haven't really come across other uses yet either.



Hi @Periwinkle_Dolphin! :smiley: Great question, so you see like in the graphs I did for sine, cosine and tangent, I mentioned that they return different values depending on what number you put in. For example, this is a sine graph:

You can see some examples like sin(0°) gives 0, sin(30°) = 1/2, sin(90°) = 1 and so on. Not all numbers aren't nice and neat like that, for example, sin(36.86...°) = 3/5 but those are just examples :slight_smile:

Inverse sine is the opposite — if you know that the sine of an angle gives a number, what will that angle be? Say that you know sin(x) = 1 for example. Inverse sin(1) will tell you what x will be, which will be 90 degrees from the graph.

Looking at the graph, if you want to find the sine of something you look along the x-axis and then see what value the curve is at — like for sin(30°), you go to 30° then you see on the purple curve, it is equal to 1/2:

If you want to find the inverse sine of 1/2, you go to 1/2 on the y-axis then look what the degrees value for it is:

Except that since the graph repeats, there are actually lots of values: here the graph shows 30° and 150° since sin(30°) and sin(150°) both give 1/2. Inverse sine will give the number that is in the range from -90° to 90° I think. It is just something to keep in mind and you can use Check Ifs to deal with it like ThinBuffalo showed :smiley:


#30

@t1_hopscotch

You said "I think". Just to confirm - You are correct. And it's because of the statement you made right before that. Since sine(30°) and sin(150°) both equal 1/2, taking the asin(1/2) can only give one of the two answers (30°). For angles not -90<theta<90, we have to apply some additional logic.

Great job, btw, on all the images :smile:


#31

Hi @ThinBuffalo! :smiley::smile: Oh I see now, thank you very much. I hadn't actually tried arcsin(1/2) in Hopscotch to see what it would give so I wasn't quite sure if the range would be between -90° and 90° here too like on a calculator, but now I know it does thanks to you :smile:

Thank you, I haven't really had a chance to talk much with you yet but I really love seeing you around sharing what you've learnt with everyone and helping lots of people :blush: For example with the polar coordinates, I just started learning about it in school recently and it's lovely to see you explaining how it can be used in Hopscotch (never would have thought about that!) along with making heaps of other things accessible to lots more people too. I think it's wonderful and it keeps me inspired.


#32

That's awesome @t1_hopscotch :smile: I'll respond more in my general topic so as to not go off on a tangent here :wink:


#33

Yeah, I agree! Your not the

But..
You're the Sin and Cos master! xD


#34

Lol.
Just scroll through the topic... two genii posting outtanding posts. :0

(@Caramel_Puffin look)


#35

Revive because this is useful :smiley: Anyone using tangent in current projects?


#36

I use inverse tangent
But this really helps, thanks!