Animations

Animations can be created by frame varying geometry, color, and orientation. As demonstrated in most of these examples, code development is primarily the frame sequence algorithms, whereas minimal development is needed for surface creation using S3Dlib.

The following examples were constructed using Matplotlib FuncAnimation . Final conversion to animated png file format used ezGIF with the temporary frame files generated by the writer in the call to anin.save.

Rotation visualizations

A surface may be perceived as rotating either by:

  • Method 0: changing the viewing direction, or

  • Method 1: changing the viewing and lighting directions, or

  • Method 2: only rotational transforms of the surface with a constant lighting direction.

These can produce identical ‘stationary viewer’ results. Method 2 is used if additional objects in the visualization need to be stationary. A ‘stationary object’ will be perceived when only the viewing direction is changed, leaving the lighting direction unchanged. For methods 1 and 2, the object needs to change geometry and color per frame. This requires the ‘old’ object to be removed from the axes, then the ‘new’ objects added to the axes for each frame.

Method 1 - axis view controlling color../_images/static_bases.png

Platonic Solids

Method 2 - stationary moon../_images/static_earth_moon.png

Moon with Rotating Earth

Method 0 - Stationary object with rotation of the view../_images/static_retinal_scan.png

Retinal Scan

Method 2 - stationary background axis planes../_images/static_lab_rot.png

Lab Color Space

Method 2 - stationary background axis planes../_images/static_cmap_rot.png

Cmap in Lab Space

Method 2 - object rotation about the Y-axis.../_images/static_wturbine.png

Wind Turbine

Method 1 - axis view controlling shading and highlighting../_images/static_pycube.png

Python Cube


Method 1 - axis view controlling surface color
../_images/static_fig_8_knot.png
Dual Surface Face Color

Parametric Surface Transforms

The following are examples of transformations between two 3D surfaces via a single parameter.


Parametric changes between a catenoid to helicoid surface.
../_images/static_cat2heli.png
Catenoid to Helicoid
Visualization of (θ,Z) → (x,y,z)../_images/static_klein.png

Cylinder to Klein Bottle

Parametric changes between the Boy and Roman surface spherical contours.../_images/static_boy2roman_contours.png

Boy to Roman Contour Animation

Surface transformations among RGB, Lab and HSV color spaces.../_images/static_rgb_lab_hsv.png

RGB to Lab to HSV

Function Parameters

Single or multiple function parameters defining surface geometry are varied during the sequence of animation frames.

Geometric surface animation producing a vibrating cylinder.../_images/static_tube_disp.png

Time Sequence Animation

Rotations of a hypercube.../_images/static_hypercube.png

Hypercube Animation

Transition of planar contours on a surface.../_images/static_conic.png

Conic Sections


Continuous changes in multiple surface parameters.
../_images/static_dini.png
Dini Surface Animation
Animation of a complex number taken to a whole or fractional power.../_images/static_complex.png

Complex Number to a Power

Animation using colormap transparency to 'hide' a section of the geometry.../_images/static_loop_cmap.png

Colormap Frame Animation

Internal Volume Visualizations

Visualization of volume interiors are produced by combinations of sequentially mapping multiple surfaces and also sequentially clipping and translating surfaces.


Annimated slices through a sphere.
../_images/static_inner_earth.png
Earth Interior
Producing a 3D solid object slicing perception in RGB color space.../_images/static_rgb_cube.png

RGB Mapping

Producing a 3D solid object slicing perception in HSV color space.../_images/static_hsv_cylinder.png

HSV Mapping