Tag: Processing
A Processing Experiment
by anthonyScavarelli on May.10, 2010, under Processing
I always have found mathematics and physics interesting …
Source code: Elliptical Orbits
Built with Processing
The fact that abstract equations full of several variables when used in programming can lead to truly beautiful results has always fascinated me ( just try changing any value (x) with sin(x) or cos(x) for example ). In fact using these equations are absolutely necessary when simulating more “realistic” results. The experiment above was a simple experiment ( for an assignment at school ) in creating elliptical orbits using elliptical equations.
float radius = (a * ( 1 - sq(e)))/( 1 + e * cos( angle )); //elliptical equation
The above code coming from the equation obtained from Wolfram MathWorld 
where e refers to the “eccentricity” – a parameter that defines the “squished shape” of the ellipse ( a number between 0 and 1 ). An eccentricity of 0 will define a circle whereas an eccentricity of 1 will be so squished as to appear as a line. Go Ahead and play with the code linked above to experiment.
It’s fun to use equations to define motion. Instead of changing the position of an object linearly where each frame adds a discrete value such as one:
float position = position + 1;
changing it to ( for example ):
float position = position + position/sine(position) * 10.0;
can give a unique motion that can be both unexpected and perhaps interesting enough to be different ( I haven’t actually tried this yet haha). Not unlike an artist that sketches several different styles before settling on one in creating a new work it is important to treat this kind of programming as an art as well. Constantly try new things – one line of code can make a huge difference!
————————————————–
References
- Ellipse Mathematics! http://mathworld.wolfram.com/Ellipse.html
- Processing: http://processing.org/
It Has Been a While
by anthonyScavarelli on May.09, 2010, under MEL, Maya, Processing, openFrameworks
I originally intended this blog to be about Flash and Flash-related posts such as Flex and such; but lately I have not been working with Flash at all. I don’t want to get into the Flash problems debate but I found it was a lot of work to get even the simplest of programs running smoothly. In the meantime, I have worked some co-ops at Fuel Industries and Adobe and continued with my university studies in Interactive Multimedia and Design – one year left!
Actually, after taking a class that touched on using Arduino microprocessors and Processing to create interesting interactive pieces I think I have found a new way to quickly create experimental pieces that involve input that doesn’t necessarily use keyboard and mouse as input. Specifically I have been doing a lot of work with a C++ framework called openFrameworks to create music visualizers for concerts around town here in Ottawa. Over the next week or so I will be posting abut what I have been doing over the last few months – from using Maya MEL script to create a downtown city, to using processing to simulate elliptical orbits, to several openFrameworks projects that use sound to create, hopefully, interesting visuals.
Well I have to run to my girlfriend’s for mother’s day dinner but expect new posts soon!