Coding Challenge #19: Superellipse
In this coding challenge, Iโm going to use superformulas to create a superellipse in p5.js. This is part 1 of a multi-part series on superformulas, superellipses and supershapes. Code: https://thecodingtrain.com/challenges/19-superellipse
๐น๏ธ p5.js Web Editor Sketch: https://editor.p5js.org/codingtrain/sketches/Hk-1AMTgN
๐ฅ Previous video: https://youtu.be/JcopTKXt8L8?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
๐ฅ Next video: https://youtu.be/jrk_lOg_pVA?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
๐ฅ All videos: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
References:
๐ Superellipse on Wikipedia: https://en.wikipedia.org/wiki/Superellipse
๐ Supershapes: http://paulbourke.net/geometry/supershape/
๐ Nature of Code class on Kadenze: https://www.kadenze.com/courses/the-nature-of-code/info
Videos:
๐ฅ Supershape track: https://thecodingtrain.com/tracks/supershapes
๐ด Coding Train Live 41: https://youtu.be/1Yo_AYzxA-o?t=7132s
Related Coding Challenges:
๐ #23 2D Supershapes: https://youtu.be/ksRoh-10lak
๐ #25 Spherical Geometry: https://youtu.be/RkuBWEkBrZA
๐ #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:56 Whiteboard discussion of polar coordinates
2:30 Into the code...drawing an ellipse using polar coordinates
4:38 Whiteboard discussion of the Superellipse formula
7:32 Implementing the Superellipse formula from Wikipedia
9:43 Explaining and implementing the sgn function
11:05 Testing the formula with different values
11:22 Creating a slider for the 'n' variable
12:14 What's next with superforumlas?
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
#supershapes #maths #p5js