This was written in C++ using OpenGL and uses Loop subdivision on an icosahedron to generate an approximation to the sphere. The sphere is then distorted into an ellipsoid by finding what the phi and rho angles of each vertex would be if the vertex existed in the standard spherical coordinate representation of the sphere (the latitude/longitude representation). Then the appropriate transformation is applied to the vertex based on this information.
The “exploded view” of the ellipsoid occurs by scaling the triangles inward and outward along their normal vector, which has already been calculated for lighting purposes. These normal vectors are also used to add depth to the scene, as when the triangles turn into triangular prisms.
The black “mesh” background is simply a scaled copy of the triangles used to draw the ellipsoid, except lines are used to connect these vertices instead of making polygons (triangles) out of them.
where the functions f1, f2, f3, g1, g2, and g3 can all be independently randomized to one of sine, cosine, or tangent. The parameters “a” and “b” are scalars, and “a” is typically constantly incremented or decremented during the execution of the program. This constitutes the bulk of the motion that is observed, aside from simple rotation. The parameter “b” could just have easily been chosen to be continuously incremented, but with little effect due to the commutativity of multiplication and the resultant symmetry in each of the parametric space curve functions.
Numeric differentiation is used to wrap a circle around the previously described space curve, by using an approximation to the symmetric derivative to determine the Frenet frame at various points on the curve. This approximation to the derivative is achieved by using the symmetric variant of the standard difference quotient, with a tiny “h” value (“h” being the denominator in the difference quotient). The normal and binormal vectors are used at each sampled point on the space curve as a local 2d coordinate system for plotting the circle which wraps around the curve.
Modular arithmetic is used to selectively cull polygons from the resultant tube structure, by treating the tube as topologically equivalent to a grid of polygons. For example, if the integer indices of a given polygon in this grid are (e,f), then the program only draws this polygon if (e*f) % m = 0 where the integer m can be varied during program execution (and initializes to 1).
There is a color-cycling algorithm of my own devising, and Gouraud shading is used to smooth the lighting.
In this video, I am controlling many of the aforementioned parameters in realtime, using the keyboard.
C++ and openFrameworks. A feedback loop is created in software by capturing the current frame from a webcam, scaling it down (preserving the aspect ratio), and redrawing it centered on the screen. This is done every frame. Additional feedback is introduced into the system by aiming the webcam at the computer monitor. Unpredictable color and pattern arrangements result.
Written in C++ using OpenGL. It is a helical tunnel inside which the camera is always centered. The camera itself doesn’t move through the tunnel – it simply moves in a circle so that it stays in the tunnel as the tunnel moves past it. When a given “ring” of polygons (like a “band” of the tunnel) reaches a certain point behind the camera, it disappears and is reattached to the tunnel on its leading edge.
Other aspects that can be altered include the number of “lobes” of the tunnel (controlled by varying the parameters in a rose curve equation), the diameter of the tunnel, and how tightly it is corkscrewed into a helix shape. The tunnel can rotate. I also play with the FOV settings in this video.
This is an application note I wrote that describes the purpose and details of mass flow compensation (and the computer that performs it). Mass flow compensation is an industrial technique used to standardize gas flow, usually natural gas or pressurized steam.
I did this using a PLC to control a stepper motor. I manually converted the Super Mario Brothers sheet music into frequency and millisecond values, then coded it in ladder logic to drive the high-speed pulsed output of a PLC. Enjoy!