graphgif/demo.scm
2024-10-18 10:23:46 -05:00

20 lines
447 B
Scheme

(use-modules (graphgif))
(define red (create-color 1 0 0))
(define my-graph
`(((10 . 10) (1))
((30 . 20) () ,red)))
(define more-complex-graph
`(((10 . 10) ())
((40 . 10) (0))
((25 . 25) (0 1))
((10 . 40) (0 2 4))
((40 . 40) (1 2 3))))
(let* ([graph1 (generate-web 10 10)]
[graph2 (list-copy graph1)])
(set-car! graph2 (append (car graph2) `(,red)))
(write-graphs-to-file (list graph1 graph2) "graph.gif"))