Archimedean Spirals

Game-U’s Voyager-level Game-Design: Coding Elective students were in their element this month, studying math, Archimedean spirals, trigonometry, and game design – and how they all fit together!
Instructor Jason and his students have been exploring both the LineRenderer component in Unity (used to draw free-floating lines in 3D space) and the Archimedean spiral (in this context, used for calculating the radial distance from the angle of rotation) for some time now! In order to properly construct the code for a game they’re working on, their programming needs the ability to stack balls along a track (see above picture). Those balls’ speed along the spiral is a function of both the angle and the radial distance; to calculate the change in angle from one ball to the next, some simple trigonometry is needed. Jason reviewed sine, cosine, and tangents, then had students link the knowledge back to the task at hand by coding a loop to position the line renderer’s vertices on the spiral.
This is an interesting application of trigonometry – one that uses all three common trig functions, and relates them to a previously unfamiliar domain (e.g., spirals). Math, coding, and spirals – all so connected!