- plot-tessellation/animation tessellation path title filenameprocedure
Plot the tessellation as an animation fit for YouTube.
- The tessellation to plot
- A list of nodes
- Title for the animation
- A filename for the movie (ending in e.g. `.avi')
(define (plot-tessellation/animation tessellation path title filename) (let ((directory (create-temporary-directory))) (let iter ((path path) (i (- (length path) 1))) (if (null? path) (let* ((frames (cdr (sort (glob (make-pathname directory "*")) string<?))) (final-frame (last frames)) (epilogue (make-list 10 final-frame))) (let ((frame-list (create-temporary-file))) (with-output-to-file frame-list (lambda () (for-each write-line (append frames epilogue)))) (run (mencoder ,(format "mf://@~a" frame-list) -mf fps=4 -o ,filename -ovc lavc)))) (let ((filename (animation-filename directory i))) (format #t "~a~%" filename) (plot-tessellation tessellation path title filename) (iter (cdr path) (- i 1)))))))