1 ;"plottest.scm" test charplot.scm
2 ;Copyright (C) 1992 Aubrey Jaffer
4 ;Permission to copy this software, to redistribute it, and to use it
5 ;for any purpose is granted, subject to the following restrictions and
8 ;1. Any copy made of this software must include this copyright notice
11 ;2. I have made no warrantee or representation that the operation of
12 ;this software will be error-free, and I am under no obligation to
13 ;provide any services, by way of maintenance, update, or otherwise.
15 ;3. In conjunction with products arising from the use of this
16 ;material, there shall be no use of my name in any advertising,
17 ;promotional, or sales literature without prior written consent in
25 (do ((x -1.0 (+ x 0.05)))
27 (let* ((a (/ (- 2 x) (+ 2 x))))
29 (let* ((y (* x (sqrt a))))
30 (set! l (cons (cons x y) l))
31 (set! l (cons (cons x (- y)) l))))))
34 (plot! strophoid "x" "y") (newline)
39 (do ((i (- l 1) (- i 1)))
41 (vector-set! v i (cons i 0)))
43 (r (random l) (random l)))
44 ((zero? i) (vector->list v))
45 (set-cdr! (vector-ref v r) (+ 1 (cdr (vector-ref v r)))))))
47 (plot! unif "n" "occur")