Coding Challenge #7: Solar System in Processing - Part 1 (2D)

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



Duration: 30:47
232,950 views
3,011


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







Tags:
coding challenge
processing
solar generator
solar system
java
processing tutorial
tutorial
creative coding
daniel shiffman
processing 3
object oriented programming
programming
challenge
solar
oop
object oriented
nature of code
daniel shiffman processing
programming challenge
pvector
processing (programming language)
transformations
pushMatrix
popMatrix
transformations processing
rotation processing