For today’s Silverlight animation I am posting another experiment based Jamie Macdonald’s “In Line” animations from Flash Math creativity.
There are two things to note about this animation. First, the vertical oscillation of each ball is calculated using Sine and Cosine. One line of balls uses Sine, while the other line uses Cosine. This causes the lines to always be moving in opposite directions.
The second interesting thing in this animation is that I was able to animate the brightness of the ball color using a Sine wave. So far I am finding color manipulation a bit more tricky in Silverlight than in Flash. Actionscript provides a ColorTransform class that allows you to change the brightness of a color. With Silverlight there doesn’t seem to be a direct way to control brightness like that. You really have to just play around with the RGB values arbitrarily in order to color brightness.
Enjoy!
In Line Animation
In Line Animation Source Code
Edit: View Parth I.IV of the Silverlight Math Creativity series here.