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 ani.save.
Note
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.
Parametric Surface Transforms¶
The following are examples of transformations between two 3D surfaces via a single parameter.
Function Parameters¶
Single or multiple function parameters defining surface geometry are varied during the sequence of animation frames.
Internal Volume Visualizations¶
Visualization of volume interiors are produced by combinations of sequentially mapping multiple surfaces and also sequentially clipping and translating surfaces.