next up previous
Next: 23.2 demo1.l Up: 23 eus/sampleデモプログラム Previous: 23 eus/sampleデモプログラム

23.1 demo0.l

demo0.lは,立体を陰線処理表示する例である.

;;;
;;; example 
;;;
(setq a (make-cube 500 300 250 :pos #f(0 0 150)))
(send a :color 'red)

(setq b (make-cylinder 80 400 :pos #f(100 250 0)))
(send b :color 'yellow)

(setq c (make-cube 1000 1000 20 :pos #f(0 0 -10.1)))
(send c :color 'green)

(setq d (make-cube 100 100 50))
(setq d2 (make-cube 40 100 50))
(send d2 :translate #f(0 0 50))
(send d :+ d2)
(send d :rotate #d70 :z)
(send d :locate #f(300 300 25) :world)
(send d :color 'blue)

(setq e (make-icosahedron 80))
(send e :locate #f(400 0 80))

(send-all (list a b c d e) :worldcoords)

(defun geo::default-viewsurface (&rest args)
   (send* (instantiate x::xwindow)  :create args))
(load "view")
(hid (list a b c d e))
(warn "~%try (cls), (draw (list a b c d))~%~%")


generated through LaTeX2HTML. M.Inaba 平成18年5月7日