2024-10-18 10:23:46 -05:00
|
|
|
(use-modules (graphgif))
|
2024-10-11 16:48:42 -05:00
|
|
|
|
2024-10-16 13:48:22 -05:00
|
|
|
(define red (create-color 1 0 0))
|
|
|
|
|
2024-10-11 16:48:42 -05:00
|
|
|
(define my-graph
|
2024-10-16 13:48:22 -05:00
|
|
|
`(((10 . 10) (1))
|
|
|
|
((30 . 20) () ,red)))
|
2024-10-11 16:48:42 -05:00
|
|
|
|
|
|
|
(define more-complex-graph
|
2024-10-16 13:48:22 -05:00
|
|
|
`(((10 . 10) ())
|
|
|
|
((40 . 10) (0))
|
|
|
|
((25 . 25) (0 1))
|
|
|
|
((10 . 40) (0 2 4))
|
|
|
|
((40 . 40) (1 2 3))))
|
2024-10-11 16:48:42 -05:00
|
|
|
|
2024-10-18 10:23:46 -05:00
|
|
|
(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"))
|