Action:
|
Constructs a pattern with cylindrical symmetry.
|
|
Filename:
|
kern/kern_scm/pattern_scm.cxx
|
|
APIs:
|
api_cylindrical_pattern
|
|
Syntax:
|
(pattern:cylindrical {center normal | face}
|
|
|
num-angular [num-axial=0] [distance=0]
|
|
|
[alternating=#f])
|
|
Arg Types:
|
center
|
position
|
|
normal
|
gvector
|
|
face
|
face
|
|
num-angular
|
integer
|
|
num-axial
|
integer
|
|
distance
|
real
|
|
alternating
|
boolean
|
|
Returns:
|
pattern
|
|
|
center and
normal together specify the radius for the circular pattern.
|
|
|
face specifies a cylindrical face.
|
|
|
num-angular specifies the number of transverse elements in the pattern.
|
|
|
num-axial specifies the number of longitudinal elements in the pattern.
|
|
|
distance specifies the distance between the circular pattern layers.
|
|
|
If
alternating is
#t, adjacent layers are staggered in angle.
|
|
Example:
|
; pattern:cylindrical
|
|
; Create a cylindrical pattern using defaults only.
|
|
(define s (solid:sphere (position -15 -10 0) 3))
|
|
;; s
|
|
(define p (pattern:cylindrical (position -10 -10 -10)
|
|
|
(gvector 1 0 1) 5 10 5))
|
|
;; p
|
|
; Attach the defined pattern to the sphere.
|
|
(define attach (entity:pattern s p))
|
|
;; attach
|
|
; Create an alternating cylindrical pattern.
|
|
; Roll back 1 step and redefine the pattern.
|
|
(roll)
|
|
;; -1
|
|
(define p (pattern:cylindrical (position 0 0 0)
|
|
|
(gvector 0 0 1) 15 5 10 #t))
|
|
;; p
|
|
; Attach the defined pattern to the sphere.
|
|
(define attach (entity:pattern s p))
|
|
;; attach
|
|
; Create an alternating cylindrical pattern.
|
|
; Roll back 1 step and redefine the pattern.
|
|
(roll)
|
|
;; -1
|
|
(define p (pattern:cylindrical (position 0 0 0)
|
|
|
(gvector 1 1 0) 5 7 10))
|
|
;; p
|
|
; Attach the defined pattern to the sphere.
|
|
(define attach (entity:pattern s p))
|
|
;; attach
|