Action:
|
Evaluates a position on a parametric surface.
|
|
Filename:
|
kern/kern_scm/surf_scm.cxx
|
|
Syntax:
|
(surface:eval srf su sv [level])
|
|
Arg Types:
|
srf
|
surface
|
|
su
|
real
|
|
sv
|
real
|
|
level
|
integer
|
|
Returns:
|
real ...
|
|
Description:
|
This extension finds the position on a parametric surface with the given parameter values and optionally calculates the first and second derivatives.
|
|
|
srf specifies the surface to evaluate.
|
|
|
su specifies the
u parameter value.
|
|
|
sv specifies the
v parameter value.
|
|
|
level specifies the depth of evaluation, and it has the following valid values:
|
|
|
0
|
= turns the position
|
|
1
|
= Returns the position and the first derivative (xu,
xv)
|
|
2
|
= Returns the position, and the first and second derivatives (xuu,
xuv,
xvv)
|
|
Example:
|
; surface:eval
|
|
; Create a planar face.
|
|
(define face1
|
|
|
(face:plane (position 0 0 0) 30 40))
|
|
;; face1
|
|
; Evaluate the position of a point
|
|
; on the planar surface.
|
|
(surface:eval (surface:from-face face1) 15 15 0)
|
|
;; (#[position 15 15 0])
|
|
; Create a conical surface.
|
|
(define cone1
|
|
|
(face:cone (position 0 0 0) (position 0 50 0)
|
|
|
30 20 0 180))
|
|
;; cone1
|
|
; Evaluate the position and the first derivative
|
|
; of a point on the conical surface.
|
|
(surface:eval (surface:from-face cone1) 0.5 0.5 1)
|
|
;; (#[position 23.7458553521721 14.7087101353638
|
|
;; -12.9724199023621] #[gvector -5.16324300907818
|
|
;; 29.4174202707276 2.82069251152796]
|
|
;; #[gvector -12.9724199023621 0
|
|
;; -23.7458553521721])
|