|
Action:
|
Makes a law that returns a twisted vector field about a given path.
|
|
|
Derivation:
|
twist_path_law : multiple_law : law : ACIS_OBJECT : -
|
|
|
Syntax:
|
TWIST (my_vector_field, my_path_law, my_twist_law)
|
|
|
Description:
|
The
twist law takes in one value and returns a vector that is formed by rotating
my_vector_field about
my_path_law by an angle (in radians) given by
my_twist_law.
my_vector_field is a law that takes in one value and returns a vector.
my_path_law is a law that takes in one value and returns a position.
my_twist_law is a law that takes one value and returns one value. This is used for creating rail laws for sweeping with twist.
|
|
|
Example:
|
; law "TWIST"
|
|
; Create a law.
|
|
; This law produces a vector field that sweeps out a
|
|
; helix about the x-axis.
|
|
; The x-axis is the path. The starting vector field
|
|
; is a constant vector pointing in the z-direction.
|
|
; The twist vector is linear, y=x.
|
|
(define my_law (law "twist(vec(0,0,1),
|
|
|
vec(x,0,0),x)"))
|
|
;; my_law
|
|
; => #[law TWIST(VEC(0,0,1),VEC(X,0,0),X)"]
|
|
(law:eval-vector my_law 0)
|
|
;; #[gvector 0 0 1]
|
|
(law:eval-vector my_law 1)
|
|
;; #[gvector 0 -0.841470984807897 0.54030230586814]
|
|
(law:eval-vector my_law (law:eval "pi"))
|
|
;; #[gvector 0 -1.22464679914735e-16 -1]
|
|
; This is essentially pointing straight down.
|