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


Animation renderings are shown using versions of Matplotlib v3.0.2 with S3Dlib v1.1.0.

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 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

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