DEV Community

Discussion on: Help build the Metaverse by Developing VR Websites

Collapse
 
liorbd profile image
Lior Ben-David • Edited

Hi mnitish0,

So the algebra/Trig here isn't actually necessary for the VR, it's more some baseline geometry that you can use to rotate a point. In general, this kind of geometry is learned in an Algebra2/Trig course. I'd recommend Kahn Academy if you don't have the chance to take it in school: khanacademy.org/math/algebra2/x2ec...

As for what's actually going on here, you can imagine that every point in a circle is given by the coordinates: x = cos(angle), y = sin(angle). If we then increment the angle(Done on line 66), we can rotate the point about a circle.

Collapse
 
mnitish0 profile image
mnitish0

Thanks a lot @liorbd ,
I will have a look and will ask if I need help. One thing in your comment that really helps is x is cos angle and y is sine. I never know that and now I am able to think why they put those values in code. Appreciate the way you comment. (Useful) 😊
Thanks