Coding Challenge #7: Solar System in Processing - Part 1 (2D)
In this viewer submitted coding challenge, I make a 2D Solar System Generator in Processing. Code: https://thecodingtrain.com/challenges/7-solar-system-2d
πΉοΈ p5.js Web Editor Sketch: https://editor.p5js.org/codingtrain/sketches/IMJv_QwXy
π₯ Previous video: https://youtu.be/jxGS3fKPKJA?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
π₯ Next video: https://youtu.be/dncudkelNxw?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
π₯ All videos: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
Videos:
π Gravitational Attraction: https://thecodingtrain.com/tracks/the-nature-of-code-2/noc/2-forces/5-gravitational-attraction
π΄ Coding Train Live 34: https://youtu.be/r8QMcI5qxQM?t=5256s
Related Coding Challenges:
π #8 Solar System (3D): https://youtu.be/dncudkelNxw
π #9 Solar System (3D) with textures: https://youtu.be/FGAwi7wpU8c
π #61 Fractal Spirograph: https://youtu.be/0dwJ-bkJwDI
π #144 2D Black Hole Visualization: https://youtu.be/Iaz9TqYWUmA
Timestamps:
00:00 Introduction
01:39 Planet class
02:33 Polar Coordinates
04:01 Draw the body
05:42 Create the sun
06:54 Creating a tree-like structure
08:05 Create the planets
11:06 Error! Recursive null check
13:39 translate and rotate by distance and angle
15:06 Resetting transformations
17:21 Setting the angle (Error!)
20:50 Rotating the planets
24:11 Recursively create children planets
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
#solarsystem #transformations #processing