►V Reference
On this page:
move-to
move-to-request?
move-along-path
move-along-path-request?
orient-along-path
orient-along-path-request?
rotate-to
rotate-to-request?
rotate-by
rotate-by-request?
scale-to
scale-to-request?
scale-by
scale-by-request?
apply-affine
apply-affine-request?
apply-matrix
56.1.1 Robust Pointwise Maps
9.3

56.1 Moving, rotating, and scaling🔗ℹ

Choose absolute endpoints or changes relative to the current state.

procedure

(move-to target destination) → move-to-request?

  target : (or/c visual? symbol?)
  destination : vec2?
Creates an absolute translation request. At the end of its play clip, the target’s reference position is destination. Identity, geometry, style, rotation, scale, opacity, drawing order, and group child order are preserved.

procedure

(move-to-request? value) → boolean?

  value : any/c
Returns #t when value is a request created by move-to.

procedure

(move-along-path target 
  path 
  [#:start start 
  #:end end 
  #:normal-offset normal-offset]) 
 → move-along-path-request?
  target : (or/c visual? symbol?)
  path : (or/c path-geometry? path-visual? derived-visual? symbol?)
  start : (real-in 0 1) = 0
  end : (real-in 0 1) = 1
  normal-offset : finite-real? = 0
Creates a translation request that places target on path by total arc length. start and end are independent finite fractions in the closed unit interval. The default traverses from the beginning to the end; a larger start than end traverses the same route in reverse. Other easing procedures remap this arc-length fraction in the same way that they remap ordinary translation progress. Under linear, equal time intervals cover equal total arc length.

normal-offset adds a signed displacement perpendicular to the selected route point. A positive value lies to the left of the actual traversal direction; reverse traversal therefore reverses the normal. Zero preserves the route point exactly and does not require tangent sampling. On a sharp polyline corner the offset is segment-local, so the offset trajectory can jump between the adjacent offset edge lines. Smooth cubic routes give smooth normal motion wherever their tangent is continuous.

When path is a path-geometry? value, its points are interpreted directly in target’s containing coordinate system. When it is a path Visual, derived Visual definition, or symbol identity, scene-play resolves the current top-level Visual from the prepared clip-start state by stable identity. A derived definition is evaluated against that exact state first; the concrete result must be a path Visual. The path Visual’s current affine transform is then applied to its local path points before the resulting world-space route is measured. Passing an earlier Visual value therefore selects the current scene value rather than capturing stale coordinates.

The compiled route is a snapshot for that play clip. Simultaneously moving, scaling, rotating, or morphing the path Visual does not dynamically deform the motion route. A path Visual route is world-space after resolution and cannot be used to drive a frame-space target. Raw path geometry may drive a frame-space target because it is already interpreted in that target’s containing coordinate system.

Motion requires a positive finite route with exactly one positive-length subpath. Compound drawings with multiple positive-length subpaths are valid path geometry but are rejected here so the target cannot silently teleport across a gap. Closed single-subpath routes are allowed, including their implicit closing edge.

The request changes the ordinary translation animation component. It conflicts with same-target move-to or another move-along-path, but may run with disjoint rotation, scale, opacity, path-geometry, formula-part, and camera components. Sampling places the target at the selected route point plus any requested normal offset even when its prior reference position differs; put the target at that complete start position before the clip when a continuous clip boundary is required.

procedure

(move-along-path-request? value) → boolean?

  value : any/c
Returns #t when value is a request created by move-along-path.

procedure

(orient-along-path target 
  path 
  [#:start start 
  #:end end 
  #:rotation-offset rotation-offset]) 
 → orient-along-path-request?
  target : (or/c visual? symbol?)
  path : (or/c path-geometry? path-visual? derived-visual? symbol?)
  start : (real-in 0 1) = 0
  end : (real-in 0 1) = 1
  rotation-offset : finite-real? = 0
Creates a rotation request that points target’s local positive x axis along the tangent of path at the current total-arc-length fraction. The target must implement gen:affine-visual. start and end use the same partial and reverse traversal semantics as move-along-path. Reverse traversal negates the stored forward tangent, so the Visual points in the actual direction of motion. rotation-offset is a constant angle in radians added after tangent alignment.

Path source resolution, clip-start snapshot semantics, transformed path Visual handling, frame/world coordinate rules, positive finite length requirements, and single-positive-subpath continuity requirements are the same as for move-along-path. Tangents are provided by path-geometry-tangent-at.

The request changes only the ordinary rotation animation component. It may run simultaneously with same-target move-along-path, scale, opacity, and disjoint components, but conflicts with same-target rotate-to, rotate-by, or another orient-along-path. The rotation at a sample is derived directly from the sampled tangent rather than interpolated between endpoint angles, so bends and curved routes are followed geometrically.

procedure

(orient-along-path-request? value) → boolean?

  value : any/c
Returns #t when value is a request created by orient-along-path.

procedure

(rotate-to target angle) → rotate-to-request?

  target : (or/c visual? symbol?)
  angle : finite-real?
Creates an absolute rotation request. angle is the requested final counter-clockwise rotation in radians. The target must implement gen:affine-visual. Identity, geometry, style, position, scale, opacity, drawing order, and group child order are preserved.

procedure

(rotate-to-request? value) → boolean?

  value : any/c
Returns #t when value is a request created by rotate-to.

procedure

(rotate-by target delta) → rotate-by-request?

  target : (or/c visual? symbol?)
  delta : finite-real?
Creates a relative rotation request. The final rotation is the rotation at the start of the clip plus delta. Positive values rotate counter-clockwise. The target must be an affine Visual. Identity, geometry, style, position, scale, opacity, drawing order, and group child order are preserved.

procedure

(rotate-by-request? value) → boolean?

  value : any/c
Returns #t when value is a request created by rotate-by.

procedure

(scale-to target scale) → scale-to-request?

  target : (or/c visual? symbol?)
  scale : scale-factor?
Creates an absolute scale request. The final x and y scale factors are the normalized form of scale. The target must be an affine Visual. Identity, geometry, style, position, rotation, opacity, drawing order, and group child order are preserved.

A built-in group accepts only a uniform endpoint. scene-play rejects a request whose normalized x and y factors differ. For every affine target, compilation also checks that visual-with-scale returns an affine Visual, preserves identity, and installs the requested endpoint exactly. These checks occur before timeline sampling.

procedure

(scale-to-request? value) → boolean?

  value : any/c
Returns #t when value is a request created by scale-to.

procedure

(scale-by target factor) → scale-by-request?

  target : (or/c visual? symbol?)
  factor : scale-factor?
Creates a relative scale request. The start scale is multiplied componentwise by factor. The target must be an affine Visual. Identity, geometry, style, position, rotation, opacity, drawing order, and group child order are preserved.

For a built-in group, the computed endpoint must remain uniform. scene-play rejects a relative factor that produces unequal x and y components. For every affine target, compilation checks the resulting endpoint through the same visual-with-scale protocol rules as scale-to.

procedure

(scale-by-request? value) → boolean?

  value : any/c
Returns #t when value is a request created by scale-by.

procedure

(apply-affine target map) → apply-affine-request?

  target : (or/c visual? symbol? visual-path?)
  map : affine2?
Creates a general affine-map request. At each sampled interior time, the identity-to-map entry-wise interpolation is applied after target’s current outer affine map. The map therefore acts in world coordinates; it can express shears, reflections, arbitrary linear maps, and translation in one request.

The target may be a top-level world Visual or an ordinary nested visual-path?. A nested request is rebased through enclosing semantic affine maps so its requested map still has world-coordinate meaning. The enclosing map must be invertible; derived Visuals and frame-space overlays are still rejected during scene compilation. The resulting endpoint is an affine-map-visual?, so a later apply-affine composes maps without rasterizing the prior result. Existing movement, rotation, and scale requests conflict with apply-affine for the same target during an overlapping interval.

procedure

(apply-affine-request? value) → boolean?

  value : any/c
Returns #t when value is a request made by apply-affine.

procedure

(apply-matrix target matrix) → apply-affine-request?

  target : (or/c visual? symbol? visual-path?)
  matrix : linear2?
Convenience form of apply-affine for a translation-free linear map about the world origin.

56.1.1 Robust Pointwise Maps🔗ℹ

Pointwise mapping is the nonlinear counterpart of affine mapping. It acts on world-space points and samples a path before mapping it, so a line under a nonlinear map becomes a visible curve rather than a chord joining two transformed endpoints. The exact caller Visual is retained at clip time zero. Adaptive refinement checks the deviation of a mapped midpoint from its mapped chord, while a failed map sample can split the result into separate subpaths.