 ; Yet another pattern drawer.
 ; Copyright 1993 by Rocket Software
 ; Why it is still not possible to purchase snakeskin textured floppies?
 (DEFUN C:STR (/ circ aa pa rad divs ang incang plist num)
  (setvar "cmdecho" 0)
  (command "undo" "M")
  (setq circ (entsel "Select a circle or <Return> to pick points: "))
  (if (and circ
          (setq circ (entget (car circ)))
          (or (= (cdr (assoc 0 circ)) "CIRCLE")
              (= (cdr (assoc 0 circ)) "ARC")))
      (progn
          (setq pa (cdr (assoc 10 circ)))
          (setq rad (cdr (assoc 40 circ)))
          (setq divs (getint "\nNumber of points: "))
          (setq ang 0)
          (setq incang (/ (* 2 pi) divs))
          (repeat divs
                 (setq aa (polar pa ang rad))
                 (setq ang (+ ang incang))
                 (setq plist (append plist (list aa)))))
      (progn
           (write-line "\nSelect points: ")
           (while (setq aa (getpoint))
                  (setq plist (append plist (list aa))))))
  (setq cycles (getint (strcat "Number of cycles <"
                               (itoa (length plist)) ">: ")))
  (if (null cycles) (setq cycles (length plist)))
  (setq plist (append (list ()) plist))
  (repeat cycles
         (setq plist (cdr plist))
         (setq num 1)
         (setq pa (car plist))
         (while (setq aa (nth num plist))
                (command "line" pa aa "")
                (setq num (1+ num))))
 (princ))