|
Action:
|
Gets a single vector from the starting or ending tangent vector list, in
v, of a spline surface.
|
|
|
Filename:
|
cstr/cstr_scm/sgrd_scm.cxx
|
|
|
Syntax:
|
(splgrid:v-tanvec-item grid index start-or-end)
|
|
|
Arg Types:
|
grid
|
splgrid
|
|
index
|
integer
|
|
start-or-end
|
boolean
|
|
|
Returns:
|
gvector
|
|
|
Description:
|
Gets a single vector from the starting or ending tangent vector list, in
v, of a spline surface. The argument
index specifies the list index. The argument
start-or-end is
#t to specify start, or
#f to specify the end list. This extension returns the unitized tangent
gvector.
|
|
|
grid is an input grid.
|
|
|
index specifies the list index.
|
|
|
start-or-end is
#t to specify start, or
#f to specify the end list. This extension returns the unitized tangent
gvector.
|
|
|
Example:
|
; splgrid:v-tanvec-item
|
|
; Define a spline grid.
|
|
(define grid1 (splgrid))
|
|
;; grid1
|
|
; Define a list of points.
|
|
(define points1 (list
|
|
|
(position -50 -50 0) (position 0 -50 50)
|
|
|
(position 50 -50 0) (position -50 0 50)
|
|
|
(position 0 0 100) (position 50 0 50)
|
|
|
(position -50 50 0) (position 0 50 50)
|
|
|
(position 50 50 0)))
|
|
;; points1
|
|
; Set a list of points that define the splgrid.
|
|
(define gridlist
|
|
|
(splgrid:set-point-list grid1 points1 3 3))
|
|
;; gridlist
|
|
; Get number of points in u of a spline grid.
|
|
(splgrid:u-points grid1)
|
|
;; 3
|
|
; Define a list of start vectors.
|
|
(define startvecs (list (gvector 1 0 1)
|
|
|
(gvector 1 0 1) (gvector 1 0 1)))
|
|
;; startvecs
|
|
; Set the starting tangent vectors
|
|
; of the spline surface.
|
|
(define gridlist2
|
|
|
(splgrid:set-v-tanvec-list grid1 startvecs #t))
|
|
;; gridlist2
|
|
; To view what was entered.
|
|
(splgrid:print grid1)
|
|
; Num_u 3, Num_v 3
|
|
; Tolerance: 0.000001
|
|
; Grid Array:
|
|
;
|
-50.000000
|
|
-50.000000
|
|
0.000000
|
|
;
|
0.000000
|
|
-50.000000
|
|
50.000000
|
|
;
|
50.000000
|
|
-50.000000
|
|
0.000000
|
|
;
|
-50.000000
|
|
0.000000
|
|
50.000000
|
|
;
|
0.000000
|
|
0.000000
|
|
100.000000
|
|
;
|
50.000000
|
|
0.000000
|
|
50.000000
|
|
;
|
-50.000000
|
|
50.000000
|
|
0.000000
|
|
;
|
0.000000
|
|
50.000000
|
|
50.000000
|
|
;
|
50.000000
|
|
50.000000
|
|
0.000000
|
|
; Tangent Vectors u-start:
|
|
; Vector list has not been established
|
|
; Tangent Vectors u-end:
|
|
; Vector list has not been established
|
|
; Tangent Vectors v-start:
|
|
;
|
0.707107
|
|
0.000000
|
|
0.707107
|
|
;
|
0.707107
|
|
0.000000
|
|
0.707107
|
|
;
|
0.707107
|
|
0.000000
|
|
0.707107
|
|
; Tangent Vectors v-end:
|
|
; Vector list has not been established
|
|
;; #[splgrid 40211ac0]
|
|
; Get a spline grid's v tangent vector.
|
|
(splgrid:v-tanvec-item grid1 1 #t)
|
|
;; #[gvector 0.707106781186547 0 0.707106781186547]
|