Action:
|
Evaluates a the principal curvatures and directions at the given uv on the surface
|
|
Filename:
|
kern/kern_scm/surf_scm.cxx
|
|
Syntax:
|
(surface:eval-curvatures srf su sv )
|
|
Arg Types:
|
srf
|
surface
|
|
su
|
real
|
|
sv
|
real
|
|
Returns:
|
real ...
|
|
Description:
|
This extension finds the two principal curvatures of the surface at the given parameter values. It also returns the directions of the principal curvatures.
|
|
|
srf specifies the surface to evaluate.
|
|
|
su specifies the
u parameter value.
|
|
|
sv specifies the
v parameter value.
|
|
Limitations:
|
This extension does not take account of surface discontinuities, so that evaluating the curvatures at such points may be unreliable, as no attempt is made to compute sided curvatures
|
|
Example:
|
;surface:eval-curvatures
|
|
;; Create the surface
|
|
(solid:wiggle 50 50 50 "anti")
|
|
;; #[entity 1 1]
|
|
;; (ray:queue 258.188 -312.023 293.684 -0.537024 0.628851 -0.562273 1)
|
|
(define f (pick-face))
|
|
;; f
|
|
(surface:eval-curvatures (surface:from-face f) .5 .5)
|
|
;; (0.067385584485619 #[gvector -0.576407926659592
|
|
;; -0.281960099592504 -0.766976143254649]
|
|
;; 0.120983661175455 #[gvector -0.595361733728196
|
|
;; 0.787806079907338 0.157816306106784])
|