Average full article read:
Thanks to a mysterious combination of nature and nurture, I inherited two of my father’s most notorious traits: an obsession with Dairy Queen, and a fascination with outer space. The latter figured heavily into my formative years, while the former was curbed by – let’s call it parental prudence.
I was probably the only elementary school student who had seen both Cape Canaveral and HBO’s From the Earth to the Moon. The terms “Apollo missions,” “Buzz Aldrin,” and “lunar landing module” became as familiar and as comforting to me as “Little Einsteins” or “David and Goliath.” In high school, my dad made me watch The Martian and Apollo 13, both of which convinced me of the stress and the thrill associated with space travel.
Consequently, when my computer class began our senior year foray into Unity VR and Windows Mixed Reality, I already knew: I wanted to model the solar system. I wasn’t planning on a couple spheres sitting in a row but on accurately scaled, properly skinned planets, orbiting at the distances and at the rates they did in real life. Unfortunately, I had no idea how to make that vision a reality. Yet.
Creating the Sun and the planets in Maya, a 3D modeling program, was pretty easy. Devising the code for their orbits, however, made my humanities-loving brain want to run for the nearest poetry club. I would never describe myself as a math whiz or even as a coding nerd. The visual designs and the logical aspects of Computer Science have always appealed to me more than the gritty functions of C#.
Fortunately, I have the best Physics teacher in the solar system, maybe even the galaxy (shoutout to Mrs. Downing!). She explained that the planets’ orbital eccentricity is so small as to be inconsequential (translation: from a distance, they look like circles anyway).
Armed with this knowledge, a printout of the planets’ orbital radii (distances from the Sun), and basic trig, I got to calculating:
Since the planets and the Sun would all stay on the same y-plane, a planet’s position at any given moment would be defined by the Vector3 (rcosθ, 0, rsinθ). From there, it was simply a matter of defining the angle as a variable, “a,” that would increase by the planet’s velocity every update.
Obviously, that meant the planets moved much more quickly than normal, but since their relative velocities were still accurate (and since their “normal” took multiple Earth years per revolution, in some cases), I was okay with that. The moment I tested that code and saw the planets orbiting properly gave me the biggest rush of the project.
Our teachers had originally planned to spend about five weeks of class time on VR, but several “hurricane days” stretched our timeframe to seven weeks. Even after mustering the discipline to work steadily on my project for 45 minutes a day, regardless of energy or frustration levels, I still found myself pulling a couple hour-long stints during my free periods. The end result, though, left me thinking, “Whoa … did I really make that?”
I couldn’t believe I had surmounted so many obstacles, from simply coaxing light from the Sun to producing functional, moving buttons. Yet there the solar system was, right in front of me, looking even better, somehow, than I had imagined it.
My days with Windows Mixed Reality are far from over. Thanks to a new partnership with Microsoft UK, our class now has the opportunity to collaborate with their team as we develop VR “distractions” for young patients who undergo long, boring, and often frightening medical procedures, especially cancer treatments. Having learned the basics of Unity, my classmates and I can harness our skills in service to those who need them – the true goal, I believe, of all technology. As much as I’ve enjoyed my time in the solar system, I look forward to this next project even more.
(Big thanks to our Computer Science teachers, Mr. Renton and Mr. Bergman, for enabling our study of VR!)
We welcome your feedback
Let us know if you enjoyed this article and we'll share similar content