Coding Challenge #113: 4D Hypercube (aka "Tesseract")

Subscribers:
1,740,000
Published on ● Video Link: https://www.youtube.com/watch?v=XE3YDVdQSPo



Duration: 43:53
245,053 views
5,934


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







Tags:
programming
daniel shiffman
tutorial
coding
the coding train
nature of code
processing
matrix math
matrix multiplication
math 3d rendering
math 3d
projection map
projection matrix
processing 3d
orthographic
orthographic projection
orthographic drawing
orthographic view
3d perspective
rotation matrix
4d hypercube
hypercube
tesseract
4d in 3d
4 dimension
four-dimensional space
4 dimensions
higher dimensions
fourth dimension
4th dimension