examples/columns.ss
#lang scheme
(require vscheme/autocad)
(require vscheme/utils)


(define (cut-cone base-c base-r top-r height)
  (make-cut-cone base-c base-r (+z base-c height) top-r))
;;  (command "._CONE" base-c base-r
;;           "_Top" top-r height))


(define (shaft p height base-r top-r)
  (cut-cone p base-r top-r height))

(define (capital p height base-r top-r)
  (display* "Making a cut-cone: " p "," height "," base-r "," top-r)
  (cut-cone p base-r top-r height))

(define (abacus p height length)
  (make-box p length length height))
;  (make-box* (+xyz p (/ length -2.0) (/ length -2.0) 0)
;             (+xyz p (/ length  2.0) (/ length  2.0) height)))

(define (doric-column p
                      shaft-h shaft-base-r
                      capital-h capital-base-r
                      abacus-h abacus-l)
  (unite
   (shaft p shaft-h shaft-base-r capital-base-r)
   (capital (+z p shaft-h) capital-h capital-base-r (/ abacus-l 2.0))
   (abacus (+z p (+ shaft-h capital-h)) abacus-h abacus-l)))


(define columns
  (time
   (unite
    (doric-column (xyz 0 0 0) 9 0.5 0.4 0.3 0.3 1.0)
    (doric-column (xyz 3 0 0) 7 0.5 0.4 0.6 0.6 1.6) 
    (doric-column (xyz 6 0 0) 9 0.7 0.5 0.3 0.2 1.2) 
    (doric-column (xyz 9 0 0) 8 0.4 0.3 0.2 0.3 1.0) 
    (doric-column (xyz 12 0 0) 5 0.5 0.4 0.3 0.1 1.0) 
    (doric-column (xyz 15 0 0) 6 0.8 0.3 0.2 0.4 1.4))))

;(zoom-2d-top)
;(erase-all)
;(draw columns)
;(zoom-3d-conceptual)