Transforms

Transforms are snippets that can be attached to events (resize, mouse_scroll, etc.) and inserted into other shader code using hooks.

  • transform-pvm.py
    This example shows a simple Projection/Model/View transform that is equivalent to the deprecated GL API (1.0).
  • transform-pan-zoom.py
    The panzoom transform allow to translate and scale an object in the window space coordinate (2D).
  • transform-trackball.py
    The trackball transform simulates a virtual trackball (3D) that can rotate around the origin using intuitive mouse gestures.
  • transform-ortho.py
    This examples shows and orthographic projection where coordinates are manipulated in pixels.
  • transform-rotate.py
    This example shows a simple rotating quad using the Rotate transform.
  • transform-linear-scale.py
    Simple linear scale that maps point from a domain to a given range.
  • transform-power-scale.py
    Power scales are similar to linear scales, except there’s an exponential transform that is applied to the input domain value before the output range value is computed.
  • transform-log-scale.py
    Log scales are similar to linear scales, except there’s a logarithmic transform that is applied to the input domain value before the output range value is computed.
  • transform-lin-log-scale.py
    This example show how to use different scales on x, y, or z.
  • transform-polar.py
    Simple polar projection.
  • transform-log-polar.py
    Simple composition of a polar projection and a log scale on the radius.