;;; Draw random points on the screen until any key is pressed. (not tested yet)
(defun point-cloud (/ p2 p2 d x) (ai_undo_push) (setq p1 (car (std-zoom-pts))) (setq p2 (cadr (std-zoom-pts))) (setq d (mapcar '- p2 p1)) (prompt "Drawing 2D-point cloud, Break with pick...") (while (not (or (member 6 (setq x (grread t))) (member 3 x)(member 2 x))) (command "_point" (mapcar '+ p1 (mapcar '* d (std-random-pt))))) (ai_undo_pop) )
;;; std-make-random-state, recall the previous sequence of random numbers
;;; Draw random points on the screen until any key is pressed.
(setq state (std-make-random-state nil)) (point-cloud) (if (getstring "again the same?") (progn (std-make-random-state state) (command "_U") (point-cloud)))
;;; randomize a list
(setq poem (std-read-file-strings "poem.txt")) (std-princ (std-strjoin (std-randomize poem) "\n"))
;;; draw some kind of fractal turtle in the box 0,0 1,1 (not tested yet)
(setq p1 '(0 0) d 1) (while (not (grread T))
;; turn either right or left
(setq p2 (polar p1 (std-random-elt (list (- PI) PI)) d))) (grdraw p1 p2 7) (setq p1 p2 d (* d 0.75)) )