s3dlib.surface.CubicSurface

class s3dlib.surface.CubicSurface(rez=0, name=None, **kwargs)[source]

Bases: s3dlib.surface.Surface3DCollection

Cubic 3D surface in Cartesian coordinates with rectangular faces.

Methods are inherited from the Surface3DCollection.

Create a cubic surface of 2 x 2 x 2 units.

Parameters:
  • rez (integer, optional, default: 0) – Number of recursive subdivisions of the rectangulated base faces. Rez values range from 0 to 7.
  • name (string, optional, default: None.) – Descriptive identifier for the geometry.
Raises:

ValueError – If rez is not an integer in range 0 to 7.

Other Parameters:
 

**kwargs – All other parameters are passed on to ‘s3dlib.surface.Surface3DCollection’.

domain(xlim, ylim=None, zlim=None)[source]

Set the domain of the cubic surface.

Used for setting the min,max values of the base cube.

Note: this CubicSurface method uses an alternative list of arguments from the base class domain method. Using the xlim arg abbreviates setting identical domains for all three axes.

Parameters:
  • xlim (a number, list or array, default: 1) – The domain of the function evaluation. For a number, n, the x,y,z axes domains will be [-n,n]. For a 1-dimensional 2-element list, [a,b] will be assigned the domain for all 3 axes. Using a list of list (array), as [ [a,b],[c,d],[e,f] ], the domain is assigned individually for each of the three coordinate axes. Must be a 2D array if ylim or zlim is set.
  • zlim (ylim,) – Set the ylim and/or zlim.
Returns:

self (CubicSurface object)