SURFVEC
List of: Law Symbols
Subjects: Laws, SAT Save and Restore
Contents: Laws

Action: Makes a law that returns a parameter vector on a surface.

Derivation: surfvec_law : multiple_law : law : ACIS_OBJECT : -

Syntax: SURFVEC (my_surflaw, my_paralaw, my_veclaw)

Description: The surfvec returns a parameter vector on my_surflaw at my_paralaw that is tangent to my_veclaw. It also returns a new parameter value if the input parameter value is on a singularity.


For example, if my_surflaw is a sphere and the my_paralaw is at the North pole, then this law returns the parameter vector (-1, 0) and the parameter position (pi/2, v), where v indicates the direction my_veclaw is pointing in. Hence, surfvec returns an array of four values: the first two are the parameter vector, and the second two are the potentially new parameter position. The parameter position, except in the case of singularities, equals my_paralaw.

Example: ; law "SURFVEC"

; Create a surface to evaluate.

(define my_sphere (solid:sphere


(position 0 0 0) 10))

;; my_sphere

; => #[entity 2 1]

(define my_surflaw (law "surf(surf1)"


(car (entity:faces my_sphere))))

;; my_surflaw

; => #[law "SURF(SURF1)"]

(define my_sveclaw (law "surfvec(law1,


vec(x,y,z), vec(a4, a5))" my_surflaw))

;; my_sveclaw

; => [SURFVEC(SURF(SURF1),VEC(X,Y,Z), VEC(A4,A5))" ]

(law:eval my_sveclaw (list 0 0 1 0 0))

;; (1 0 0 0)

; The law created takes an xyz vector and a uv

; position on the surface. It returns a uv vector

; in the direction of the given xyz vector at the

; given uv position on the surface. It also returns

; as the last two arguments the uv positions. The uv

; position is echoed.

; Here is an example at the pole.

(law:eval my_sveclaw


(list 1 1 0 (law:eval "pi/2") 0))

;; (-1 0 1.5707963267949 0.785398163401155)

; At the pole, this response means that you have to

; turn v by pi/4 to get the correct vector.
PDF/LAW/08LAW.PDF
HTM/DATA/LAW/LAW/08LAW/0093.HTM