Sine and Cosine

Ask any questions you may have here.

Sine and Cosine

Postby GiraRay » 2 April 2017, 16:28

I've seen the new sine and cosine trigger functions but I have no idea how they work, how to calculate sin and cos or how to use the trigger functions. Can someone explain in detail?
User avatar
GiraRay
Registered user
 
Posts: 143
Joined: 25 June 2015, 16:26

Re: Sine and Cosine

Postby mrblake213 » 3 April 2017, 01:47

It's two of the Six Trigonometric functions
http://math2.org/math/algebra/functions/sincos/

You'll learn it some day in Highschool algebra.
Image
User avatar
mrblake213
Registered user
 
Posts: 452
Joined: 16 July 2013, 10:25
Location: Philippines

Re: Sine and Cosine

Postby GiraRay » 3 April 2017, 07:10

mrblake213 wrote:It's two of the Six Trigonometric functions
http://math2.org/math/algebra/functions/sincos/

You'll learn it some day in Highschool algebra.



How would I use them in PB2?
http://plazmaburst2.com/?s=9&a=&m=giraray-riddle1&id=826345
User avatar
GiraRay
Registered user
 
Posts: 143
Joined: 25 June 2015, 16:26

Re: Sine and Cosine

Postby darkstar 1 » 3 April 2017, 10:41

Idk how he did it, but Eric Gurt used sine functions in his solar and test map. Probably for the circular movements.
http://www.plazmaburst2.com/?s=9&a=&m=eric%20gurt-test_vars&id=791412
http://www.plazmaburst2.com/?s=9&a=&m=eric%20gurt-test_vars_solar&id=792160
http://www.plazmaburst2.com/?s=2&map=darkstar%201-pixels
User avatar
darkstar 1
Registered user
 
Posts: 769
Joined: 13 September 2014, 13:20
Location: Here... or there :|

Re: Sine and Cosine

Postby GiraRay » 3 April 2017, 14:52

Jesus christ. I don't have the slightest idea of how that works haha. Being confused for 10 minutes straight is not fun.
http://plazmaburst2.com/?s=9&a=&m=giraray-riddle1&id=826345
User avatar
GiraRay
Registered user
 
Posts: 143
Joined: 25 June 2015, 16:26

Re: Sine and Cosine

Postby Eric Gurt » 3 April 2017, 18:59

Sin basically converts value into other value in a way where resulting value will move from -1 to +1 if original value will change slowly enough.

Full cycle is value of PI * 2. Cos is similar to sin but with offset.

Together sin & cos can be used to receive projections of rotation. If you multiply results of sin and cos by some value - you will get coordinates of point moving around zero coordinates at specified distance.

Sin & cos make more sense in geometry but in case of maps you can think of them in simpler way.
Work it harder
Make it better
Do it faster
Makes us stronger
More than ever hour
After our work is never over.
User avatar
Eric Gurt
PB2 Developer
 
Posts: 151
Joined: 14 July 2013, 16:46
Location: dn.ua

Re: Sine and Cosine

Postby GiraRay » 3 April 2017, 20:04

Eric Gurt wrote:Sin basically converts value into other value in a way where resulting value will move from -1 to +1 if original value will change slowly enough.

Full cycle is value of PI * 2. Cos is similar to sin but with offset.

Together sin & cos can be used to receive projections of rotation. If you multiply results of sin and cos by some value - you will get coordinates of point moving around zero coordinates at specified distance.

Sin & cos make more sense in geometry but in case of maps you can think of them in simpler way.


I think I'll just leave sin and cos alone until I get into high school. I don't think they would like to be bothered. :nope:
http://plazmaburst2.com/?s=9&a=&m=giraray-riddle1&id=826345
User avatar
GiraRay
Registered user
 
Posts: 143
Joined: 25 June 2015, 16:26

Re: Sine and Cosine

Postby Eric Gurt » 3 April 2017, 21:32

I used to know developers who learn this stuff way earlier before schools start telling about these. Sin/cos are quite simple once you see them in action.
Work it harder
Make it better
Do it faster
Makes us stronger
More than ever hour
After our work is never over.
User avatar
Eric Gurt
PB2 Developer
 
Posts: 151
Joined: 14 July 2013, 16:46
Location: dn.ua

Re: Sine and Cosine

Postby darkstar 1 » 20 April 2017, 20:40

Oh, went through some of my images saved on imgur and found this back: http://i.imgur.com/s2rYVfk.png
Forgot how I did it and deleted the actual map, but with sin and cos I was able to make a graph like this.

(Edit: Managed to recreate it, in case you're interested: http://www.plazmaburst2.com/?s=9&a=&m=darkstar%201-graph&id=810654)
http://www.plazmaburst2.com/?s=2&map=darkstar%201-pixels
User avatar
darkstar 1
Registered user
 
Posts: 769
Joined: 13 September 2014, 13:20
Location: Here... or there :|

Re: Sine and Cosine

Postby GiraRay » 21 April 2017, 20:36

darkstar 1 wrote:Oh, went through some of my images saved on imgur and found this back: http://i.imgur.com/s2rYVfk.png
Forgot how I did it and deleted the actual map, but with sin and cos I was able to make a graph like this.

(Edit: Managed to recreate it, in case you're interested: http://www.plazmaburst2.com/?s=9&a=&m=darkstar%201-graph&id=810654)


I do not understand a thing in there, but I will figure it out soon. Thanks a lot!
http://plazmaburst2.com/?s=9&a=&m=giraray-riddle1&id=826345
User avatar
GiraRay
Registered user
 
Posts: 143
Joined: 25 June 2015, 16:26

Re: Sine and Cosine

Postby KARL SERG » 22 April 2017, 18:44

I suppose it should simulate the cos and sin function pattern Trajectories. I initially thought it had to do with the trigonometric Circle, but now it seems that it will serve as some kind of projectile or actual pattern for decorations and whatnot.

At least, this is what I get from it.
User avatar
KARL SERG
Registered user
 
Posts: 514
Joined: 17 July 2013, 12:01
Location: Romanian Oligarchic Republic

Re: Sine and Cosine

Postby Max teabag » 17 May 2017, 17:40

wow eric cool that you've made a solar system. I have to program that right now as a school assigment. Maybe I'll try to make on in PB2 so I will better understand it haha
Max Teabag
User avatar
Max teabag
Registered user
 
Posts: 76
Joined: 15 July 2013, 13:41


Return to Questions

Who is online

Users browsing this forum: No registered users