Parametric Equations

A parametric equation is an equation that are mainly used to express point co-ordinates. The x and y values are expressed in terms of another independent variable; usually t. This independent variable is then usually expressed as a trigonometric function such as sine or cosine.

I have used parametric equations to create a 3D looking shape that traverses in and around the screen. When there is a beat it assigns the shape a random colour and alpha value meaning that it might not always be visible on the screen; this is a desired effect to draw the user’s eye when it is on the screen and hopefully stops the visualisation becoming predictable and boring.

A screenshot to show what the parametric equations are doing.

The parametric equations I have used are based on this video:

float x1(float t) { return sin(t/10 + PI/2) * 60; }

float y1(float t) { return cos(t/30) * 300 + cos(t/10) * 300; }

float x2(float t) { return sin(t/10) * 200 – sin(t) * 2 + sin(t/50) * 400; }

float y2(float t) { return cos(t/20) * 200 + cos(t/12) * 20 + cos(t/50) * 600; }

An example of what everything looks like together:

I have also added the blendMode() function with the “SCREEN” parameter. As shown by https://processing.org/reference/blendMode_.html, “SCREEN” “uses inverse values of the colours” when they overlap.

Leave a comment

Design a site like this with WordPress.com
Get started