+ 6

Using Maths to create graphics using Canvas

You can find many codes in SL rendering 3D Graphics without any library, only using Canvas. Some days ago I found a code here, I can't remember the name, the code uses Canvas to create a animation of water which was 3D and looks almost real. When I checked the code I found a canvas and the rest of the codes are only maths. He was using the value of sin, cos, I mean those trigonometric values only to generate those graphics. I can't understand how the math is working here, even I'm in school and good at math. There are so many codes here which uses canvas and maths to make graphics even 3D. I want to know which math related things should I learn to make such graphics? I read in school and trigonometry just got introduced in my course few days ago.

4th Mar 2019, 11:23 AM
Washiul Alam Sohan
Washiul Alam Sohan - avatar
1 Odpowiedź
+ 4
check a book by Daniel Shiffman about simulation in programming. it's free. and his YouTube channel " the coding train" he uses p5js. it will give you an idea. on khanacademy they reused his book. in a very structured way. check their course you find it very interesting. it's also free
4th Mar 2019, 12:11 PM
Bahhaⵣ
Bahhaⵣ - avatar