Coding Challenge #25: Spherical Geometry

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



Duration: 26:35
163,204 views
2,815


In this coding challenge, I create a sphere in Processing using spherical coordinates and triangle strips. This is the 3rd part of a multi-part series on superformulas, superellipses and supershapes. Code: https://thecodingtrain.com/challenges/25-spherical-geometry

đŸ•šī¸ p5.js Web Editor Sketch: https://editor.p5js.org/codingtrain/sketches/qVs1hxtc

đŸŽĨ Previous video: https://youtu.be/BjoM9oKOAKY?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
đŸŽĨ Next video: https://youtu.be/akM4wMZIBWg?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
đŸŽĨ All videos: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH

References:
📝 Supershapes (Superformula): http://paulbourke.net/geometry/supershape/
đŸĨ 3D Supershapes: http://www.syedrezaali.com/3d-supershapes/
🗄 Spherical Coordinates System on Wikipedia: https://en.wikipedia.org/wiki/Spherical_coordinate_system
đŸŽĨ Peasycam: http://mrfeinberg.com/peasycam/

Videos:
đŸŽĨ My Video on Polar Coordinates: https://youtu.be/O5wjXoFrau4
đŸŽĨ Supershape track: https://thecodingtrain.com/tracks/supershapes
🔴 Livestream Archive: https://youtu.be/m8WhMeW8jj0

Related Coding Challenges:
🚂 #19 Superellipse: https://youtu.be/z86cx2A4_3E
🚂 #23 2D Supershapes: https://youtu.be/ksRoh-10lak
🚂 #26 3D Supershapes: https://youtu.be/akM4wMZIBWg
🚂 #112 3D Rendering with Rotation and Projection: https://youtu.be/p4Iz0XJY-Qk

Timestamps:
0:00 Introduction to the Coding Challenge
0:43 The 3D Processing primitive sphere()
1:48 Triangle strips
2:55 Latitude and longitude
4:11 Angle of rotation
5:53 The resolution of the sphere
7:20 Map the latitude and longitude to the points on the sphere
11:33 Add a PeasyCam object
13:28 Meshing the sphere
14:53 Add a 2D array to store the vertices
17:28 Add triangle strips
19:57 Adjust code to fix the gaps
21:00 Alternate colors to add strips
22:19 Add HSB mode to add rainbow colors
23:37 Add some randomness to animate a "jiggling" sphere
24:55 Bonus addendum: updated rainbow bands
26:30 Thanks for watching!

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://discord.gg/hPuGy2g
💖 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

#3dsupershape #sphericalgeometry #polarcoordinates #trianglestrips #3d #processing







Tags:
coding challenge
3d supershape
spherical geometry
education
mathematics (field of study)
spherical
tutorial
code
p5.js
processing
daniel shiffman
creative coding
processing tutorial
sphere
challenge
superformula
p3d
spherical coordinates
spherical system
coding
polar coordinates
reza ali
paul bourke
TRIANGLE_STRIP
triangle strips
processing beginShape
sphere geometry
3d
3D sphere tutorial
trigonometry