Package: graphene

Function graphene:point3d-interpolate

Lambda List

graphene:point3d-interpolate (a b factor result)

Arguments

a -- a graphene:point3d-t instance
b -- a graphene:point3d-t instance
factor -- a number coerced to a double float with the linear interpolation factor
result -- a graphene:point3d-t instance for the interpolated point

Return Value

The graphene:point3d-t instance with the interpolated point.

Details

Linearly interpolates the coordinates of a and b using the given factor.

Examples

(graphene:with-point3ds ((a 0 0 0) (b 1 2 3) result)
  (graphene:point3d-interpolate a b 0.5 result)
  (values (graphene:point3d-x result)
          (graphene:point3d-y result)
          (graphene:point3d-z result)))
=> 0.5
=> 1.0
=> 1.5    
 

See also

2023-9-22