Coding Challenge #113: 4D Hypercube (aka "Tesseract")
In this coding challenge, I visualize a 4D Hypercube (aka "Tesseract") in Processing (Java). Code: https://thecodingtrain.com/challenges/113-4d-hypercube-aka-tesseract
πΉοΈ p5.js Web Editor Sketch: https://editor.p5js.org/codingtrain/sketches/n0y8ntgWi
π₯ Previous video: https://youtu.be/p4Iz0XJY-Qk?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
π₯ Next video: https://youtu.be/67k3I2GxTH8?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
π₯ All videos: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
References:
π’ Matrix Multiplication: http://matrixmultiplication.xyz
π Rotation Matrix on Wikipedia: https://en.wikipedia.org/wiki/Rotation_matrix
π 3D Projection on Wikipedia: https://en.wikipedia.org/wiki/3D_projection
π Tesseract on Wikipedia: https://en.wikipedia.org/wiki/Tesseract
Videos:
π₯ Understanding 4D -- The Tesseract: https://youtu.be/iGO12Z5Lw8s
π 3D Rendering with Rotation and Projection: https://youtu.be/p4Iz0XJY-Qk
π Matrix Math: https://youtu.be/uSzGdfdOoG8
π Matrix Multiplication for 3D Rendering: https://youtu.be/tzsgS19RRc8
π΄ Coding Train Live 148.2: https://youtu.be/M_YNwb7UudI?t=1370s
Related Coding Challenges:
π #112 3D Rendering with Rotation and Projection: https://youtu.be/p4Iz0XJY-Qk
Timestamps:
0:00 Introducing today's topic: rendering a 4D hypercube
7:30 Create a P4Vector class
9:43 Extend the points array to have 16 points
13:06 Create the projection matrix
16:16 Stereographic projection
18:04 Connect the points
22:17 Add an offset to the connect function
26:26 Create rotation in the 4th dimension
29:49 Create a rotationXY matrix
36:52 Rotate around the w axis
40:23 We have now entered the 4th dimension!!
40:58 What dimension could you visualize?
Editing by Mathieu Blanchette
Animations by Jason Heglund
Music from Epidemic Sound
π Website: http://thecodingtrain.com/
πΎ Share Your Creation! https://thecodingtrain.com/guides/passenger-showcase-guide
π© Suggest Topics: https://github.com/CodingTrain/Suggestion-Box
π‘ GitHub: https://github.com/CodingTrain
π¬ Discord: https://thecodingtrain.com/discord
π Membership: http://youtube.com/thecodingtrain/join
π Store: https://standard.tv/codingtrain
ποΈ Twitter: https://twitter.com/thecodingtrain
πΈ Instagram: https://www.instagram.com/the.coding.train/
π₯ Coding Challenges: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
π₯ Intro to Programming: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6Zy51Q-x9tMWIv9cueOFTFA
π p5.js: https://p5js.org
π p5.js Web Editor: https://editor.p5js.org/
π Processing: https://processing.org
π Code of Conduct: https://github.com/CodingTrain/Code-of-Conduct
This description was auto-generated. If you see a problem, please open an issue: https://github.com/CodingTrain/thecodingtrain.com/issues/new
#3drendering #orthographicprojection #rotationmatrix #4dhypercube #tesseract #processing