Action:
|
Evaluates an edge or a curve at the specified parameter.
|
|
Filename:
|
kern/kern_scm/crv_scm.cxx
|
|
Syntax:
|
(curve:eval-pos edge-or-curve parameter)
|
|
Arg Types:
|
edge-or-curve
|
curve | edge
|
|
parameter
|
real
|
|
Returns:
|
position
|
|
Errors:
|
EDGE with no
CURVE
|
|
Description:
|
The parameterization of all curves is normalized to lie in the interval 0 to 1, therefore, evaluating at
parameter=0 indicates the start point of the curve.
|
|
|
edge-or-curve specifies an edge or a curve.
|
|
|
parameter specifies the position on the curve to evaluate. If the specified parameter lies outside the range 0 to 1, this extension returns an extrapolated position. A spline can only reliably be evaluated for parametric values from 0 to 1; if
parameter is outside of this range for a spline edge, the returned value is meaningless.
|
|
Example:
|
; curve:eval-pos
|
|
; Create a circular edge.
|
|
(define edge1
|
|
|
(edge:circular
|
|
|
(position 0 0 0) 38 0 100))
|
|
;; edge1
|
|
; Evaluate the edge at a specific parameter.
|
|
(curve:eval-pos edge1 0.75)
|
|
;; #[position 9.83512371389579 36.7051813989846 0]
|