Changed module technique from <module_name>- to <module_name>: which
conforms with chicken "egg" standard. Got rid of ##csi#run for relinking the Scheme interpreter as no longer needed. Changed all documentation to reflect both changes. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@4411 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
704e2ac719
commit
3def239916
20 changed files with 681 additions and 682 deletions
|
|
@ -18,20 +18,20 @@
|
|||
(define nxpoints 60)
|
||||
(define nypoints 60)
|
||||
|
||||
(define cmap (gifplot-new-ColorMap "cmap"))
|
||||
(define frame (gifplot-new-FrameBuffer 500 500))
|
||||
(gifplot-FrameBuffer-clear frame (gifplot-BLACK))
|
||||
(define cmap (gifplot:new-ColorMap "cmap"))
|
||||
(define frame (gifplot:new-FrameBuffer 500 500))
|
||||
(gifplot:FrameBuffer-clear frame (gifplot:BLACK))
|
||||
|
||||
(define p3 (gifplot-new-Plot3D frame xmin ymin zmin xmax ymax zmax))
|
||||
(gifplot-Plot3D-lookat p3 (* 2 (- zmax zmin)))
|
||||
(gifplot-Plot3D-autoperspective p3 40.0)
|
||||
(gifplot-Plot3D-rotu p3 60.0)
|
||||
(gifplot-Plot3D-rotr p3 30.0)
|
||||
(gifplot-Plot3D-rotd p3 10.0)
|
||||
(define p3 (gifplot:new-Plot3D frame xmin ymin zmin xmax ymax zmax))
|
||||
(gifplot:Plot3D-lookat p3 (* 2 (- zmax zmin)))
|
||||
(gifplot:Plot3D-autoperspective p3 40.0)
|
||||
(gifplot:Plot3D-rotu p3 60.0)
|
||||
(gifplot:Plot3D-rotr p3 30.0)
|
||||
(gifplot:Plot3D-rotd p3 10.0)
|
||||
|
||||
(define (drawsolid)
|
||||
(gifplot-Plot3D-clear p3 (gifplot-BLACK))
|
||||
(gifplot-Plot3D-start p3)
|
||||
(gifplot:Plot3D-clear p3 (gifplot:BLACK))
|
||||
(gifplot:Plot3D-start p3)
|
||||
(let ((dx (/ (- xmax xmin) nxpoints))
|
||||
(dy (/ (- ymax ymin) nypoints))
|
||||
(cscale (/ 240 (- zmax zmin))))
|
||||
|
|
@ -51,14 +51,14 @@
|
|||
(c4 (* cscale (- z4 zmin)))
|
||||
(cc (/ (+ c1 c2 c3 c4) 4))
|
||||
(c (inexact->exact (round (max (min cc 239) 0)))))
|
||||
(gifplot-Plot3D-solidquad p3 x y z1 (+ x dx) y z2 (+ x dx) (+ y dy)
|
||||
(gifplot:Plot3D-solidquad p3 x y z1 (+ x dx) y z2 (+ x dx) (+ y dy)
|
||||
z3 x (+ y dy) z4
|
||||
(gifplot-int->Pixel (+ c 16))))
|
||||
(gifplot:int->Pixel (+ c 16))))
|
||||
(y-loop (+ y dy) (+ j 1)))))
|
||||
(x-loop (+ x dx) (+ i 1)))))))
|
||||
|
||||
(display "Making a nice 3D plot...\n")
|
||||
(drawsolid)
|
||||
|
||||
(gifplot-FrameBuffer-writeGIF frame cmap "image.gif")
|
||||
(gifplot:FrameBuffer-writeGIF frame cmap "image.gif")
|
||||
(display "Wrote image.gif\n")
|
||||
|
|
|
|||
|
|
@ -2,26 +2,26 @@
|
|||
|
||||
(display "Drawing some basic shapes\n")
|
||||
|
||||
(define cmap (simple-new-ColorMap #f))
|
||||
(define f (simple-new-FrameBuffer 400 400))
|
||||
(define cmap (simple:new-ColorMap #f))
|
||||
(define f (simple:new-FrameBuffer 400 400))
|
||||
|
||||
;; Clear the picture
|
||||
(simple-FrameBuffer-clear f (simple-BLACK))
|
||||
(simple:FrameBuffer-clear f (simple:BLACK))
|
||||
|
||||
;; Make a red box
|
||||
(simple-FrameBuffer-box f 40 40 200 200 (simple-RED))
|
||||
(simple:FrameBuffer-box f 40 40 200 200 (simple:RED))
|
||||
|
||||
;; Make a blue circle
|
||||
(simple-FrameBuffer-circle f 200 200 40 (simple-BLUE))
|
||||
(simple:FrameBuffer-circle f 200 200 40 (simple:BLUE))
|
||||
|
||||
;; Make green line
|
||||
(simple-FrameBuffer-line f 10 390 390 200 (simple-GREEN))
|
||||
(simple:FrameBuffer-line f 10 390 390 200 (simple:GREEN))
|
||||
|
||||
;; Write an image out to disk
|
||||
|
||||
(simple-FrameBuffer-writeGIF f cmap "image.gif")
|
||||
(simple:FrameBuffer-writeGIF f cmap "image.gif")
|
||||
(display "Wrote image.gif\n")
|
||||
|
||||
(simple-delete-FrameBuffer f)
|
||||
(simple-delete-ColorMap cmap)
|
||||
(simple:delete-FrameBuffer f)
|
||||
(simple:delete-ColorMap cmap)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue