pattern:planar?
List of: Scheme Extensions
Subjects: Patterns
Contents: Kernel

Action: Determines whether or not a pattern is parallel to a given plane.

Filename: kern/kern_scm/pattern_scm.cxx

Syntax: (pattern:planar? pat {face | {root-point normal}})

Arg Types: pat pattern

face face

root-point position

normal gvector

Returns: boolean

Description: This extension returns #t if a pattern lies on the plane. Otherwise, it returns #f.


pat specifies a pattern.


face specifies a plane.


root-point specifies a point on the plane.


normal specifies the normal to the plane.

Example: ; pattern:planar?

; define root position for test

(define root (position 0 0 3))

;; root

; make a linear pattern in the xy plane

(define x-vec (gvector 10 0 0))

;; x-vec

(define y-vec (gvector 10 10 0))

;; y-vec

(define pat (pattern:linear x-vec 3 y-vec 5))

;; pat

; Is it planar with respect to a normal in the

; x direction?

(pattern:planar? pat root


(gvector:cross x-vec y-vec))

;; #t

; make a circular pattern in the xy plane

(define center (position 5 6 3))

;; center

(define normal (gvector 0 0 1))

;; normal

(set! pat (pattern:elliptical center normal 5))

;; #[pattern

;; trans-vec: "DOMAIN(X*VEC(10,0,0)+X2*VEC

;; (10,10,0),0,2,0,4)"

;; x-vec: "null_law"

;; y-vec: "null_law"

;; z-vec: "null_law"

;; scale: "null_law"

;; keep: "null_law"

;; no list]

; Is it planar with respect to a normal in the

; z direction?

(pattern:planar? pat root normal)

;; #t
PDF/KERN/14SCI.PDF
HTM/DATA/KERN/KERN/14SCI/0076.HTM