Let there be light!
Originally posted on NC Museum of Natural Sciences Education Blog:
We have created light in the Visual World Investigate Lab…well kind of. Last night 13 visitors created a computer game to guide a beam of light through two dimensional space using mirrors and trigonometry (somewhere right now a high school math teacher is crying with joy) to light up a computer screen. Each person was given a partially completed program and instructions on how to create the game by adding in their own lines of code.
After about ten minutes of typing we had created a powerful seven lines of code and conquered the graphics window, displaying our own gaming window with an image of a 500 x 500 pixel grid. After creating the game window, we designed code that would allow us to place mirrors inside of the window. Each mirror required three inputs: an x position (horizontal location) and y position (vertical location) of the mirror and the angle…
View original 280 more words