> Random thought: why are all of the control panels touch screens in Star Trek Next Gen.? If they want the Enterprise to go faster then does the helmsman "scroll up" really fast? So unrealistic.
> I made another version that buffers the states of the particles and both versions
appear to run smoothly on time steps of 5e-7 seconds or larger (on my laptop).
MDN Web Docs says the
requestAnimationFrame method provides a smoother and more efficient way for animating by calling the animation frame when the
system is ready to paint the frame. Because the frame rate is variable, one program computes a variable number of
Euler steps when it is ready to draw a new frame, and the other constantly puts the particle states in a buffer.
I thought it would be a good idea to buffer the states of the particles -- if the browser is busy then the program won't have
to compute Euler steps, it will only have to redraw the canvas. I should do a proper benchmark to compare the two, but for now
my guess is that buffering does not help because requestAnimationFrame() will perform it's call back at a time that is also convenient
for the browser to compute Euler steps and redraw the canvas.
Since I uploaded both programs I updated the non-buffered version. I made the code more readable and the code style more consistent. I did a few things to make more efficient loops, like multiplying by fractional numbers instead of dividing by large constants, and by exponentiating a number to the -0.5 power to find the inverse root instead of dividing one by the square root of that number.
> Images of 500 fractals composed into one animation. This was programmed in Cuda C on my Nvidia GPU. Each frame in the original .gif is one megapixel. Parallelizing the program by simultaneously computing the colors of many pixels at once made it much faster. See the full size gif.
> LEDs (light emitting diodes) are unlike some other light sources because they cannot be dimmed; they can only be ON or OFF. One way to create the illusion of dimming an LED is to rapidly pulse the light on and off and vary the proportion of time it is ON. This concept is called pulse-width modulation and it exists in all kinds of electronics.
> I programmed a microcontroller to create PWM waves and fade LEDs in a way that makes some interesting patterns. Each LED pulses sinusoidally at a different frequency and several neat patterns emerge. I spent a lot of time thinking and experimenting to make this project work and be an awesome demo of my OOP skillz, and because the MCU I used has only 6 hardware PWM pins. My goal for this website was to share some of the things I learned along the way. Microcontrollers seem like something worth sharing because of their utility, and because they are fun. They allow you to control sensors, motors, lights, etc. and make machines interact with their physical environment. But, as I prepare for the fall semester I don't have as much time for websites, so this will do for now.
> Richard Feynman was a theoretical physicist, member of the Manhattan Project, professor, and super genius. This video I found on YouTube was recorded during a lecture of his at Cornell University. My science teachers seldom talk about people and HOW they figured things out, but that's one of the most interesting parts of learning physics. I like to know how someone figured something out, especially when it contradicts beliefs people have had since forever.
> Today NASA launched the Parker Solar Probe. The probe will provide the closest observations of a star in history. Its mission will take it into the outer atmosphere of the sun, the Corona, and make its closest approach in approximately 7 years. The probe will also become the fastest object ever made by humans. Scientists proposed a similar mission in 1958 (the same year NASA was formed) but the necessary technologies did not yet exist.