Volume animation #1

I thought I would start off simpler than my initial ideas and figure out how to animate something using a sine function. I’m going to try and animate an audio output level, the animation that is on a stereo usually I think showing the volume outputs. Here’s my first interesting result/development:

Although it’s the wrong way around and I want it to draw from the bottom up it’s a good start and grows and shrinks according to a sine wave which is what I intended. The code isn’t actually very different from the template we were provided with for the last exercise, simply changing one of the constraints in the for loop to one which changes over time according to the framecount.

def thefunction(x):
return abs((height-15) * math.sin(6.28 * x))

About FlightOfGrey

Student at Victoria University, Wellington, NZ. Studying Computer Science and Design. Currently exploring Java, C, Python and learning as much as possible about code and combining this with elegant design.
This entry was posted in Design Course Work, MDDN242 - Computer Graphics Production and tagged , , . Bookmark the permalink.

Leave a comment