vispy.visuals.transforms.nonlinear.
LogTransform
Bases: vispy.visuals.transforms.base_transform.BaseTransform
vispy.visuals.transforms.base_transform.BaseTransform
Transform perfoming logarithmic transformation on three axes.
Maps (x, y, z) => (log(base.x, x), log(base.y, y), log(base.z, z))
No transformation is applied for axes with base == 0.
If base < 0, then the inverse function is applied: x => base.x ** x
Base for the X, Y, Z axes.
Isometric
Linear
NonScaling
Orthogonal
base
base is a tuple (x, y, z) containing the log base that should be applied to each axis of the input vector. If any axis has a base <= 0, then that axis is not affected.
glsl_imap
glsl_map
imap
Return obj mapped through the inverse transformation.
array with shape (…, 2) or (…, 3)
map
Return obj mapped through the forward transformation.
shader_imap
see shader_map.
shader_map
Return a shader Function that accepts only a single vec4 argument and defines new attributes / uniforms supplying the Function with any static input.
Magnify1DTransform
Bases: vispy.visuals.transforms.nonlinear.MagnifyTransform
vispy.visuals.transforms.nonlinear.MagnifyTransform
A 1-dimensional analog of MagnifyTransform. This transform expands its input along the x-axis, around a center x value.
MagnifyTransform
Magnifying lens transform.
This transform causes a circular region to appear with larger scale around its center point.
Magnification factor. Objects around the transform’s center point will appear scaled by this amount relative to objects outside the circle.
Inner and outer radii of the “lens”. Objects inside the inner radius appear scaled, whereas objects outside the outer radius are unscaled, and the scale factor transitions smoothly between the two radii.
The center (x, y) point of the “lens”.
Notes
This transform works by segmenting its input coordinates into three regions–inner, outer, and transition. Coordinates in the inner region are multiplied by a constant scale factor around the center point, and coordinates in the transition region are scaled by a factor that transitions smoothly from the inner radius to the outer radius.
Smooth functions that are appropriate for the transition region also tend to be difficult to invert analytically, so this transform instead samples the function numerically to allow trivial inversion. In OpenGL, the sampling is implemented as a texture holding a lookup table.
center
The (x, y) center point of the transform.
mag
The scale factor used in the central region of the transform.
radii
The inner and outer radii of the circular area bounding the transform.
PolarTransform
Polar transform
Maps (theta, r, z) to (x, y, z), where x = r*cos(theta) and y = r*sin(theta).