(bind-func draw_scatterplot
(let ((npoints 50)
(points:float* (zalloc (* 2 npoints)))
(i 0))
(lambda (bounds:Rect*)
(dotimes (i npoints)
(pset! points (* i 2) (+ (* (cos (* .00000064 (convert (* i 2 (now))))) .5) .5))
;; (pset! points (+ 1 (* i 2)) (/ (convert i) (convert npoints)))
(pset! points (+ 1 (* i 2)) (+ .5 (% (* 3.2 (cos (* 0.0000003 (convert (* (now) i) float)))) .5))))
(dv_draw_scatter_points vg bounds points npoints (+ (* (cos (* .0000053 (convert (now)))) 3.) 5.))
;; (dv_draw_axis_labels_2D vg bounds points npoints points npoints)
(dv_draw_axes_2D vg bounds)
(dv_draw_title vg bounds "Scatterplot")
void)))