Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:add data generators
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | master | trunk
Files: files | file ages | folders
SHA3-256: 5c105a6ad68c40561545ca617e470b9a878e16235f1a0955b7cdbdae8ccacb41
User & Date: jack 2025-04-22 19:14:55
Context
2025-04-23
19:42
faceting: maintain one dataset per each layer check-in: f99a9f8825 user: jack tags: master, trunk
2025-04-22
19:14
add data generators check-in: 5c105a6ad6 user: jack tags: master, trunk
18:35
designate package and exported symbols with strings check-in: 2cefd20783 user: jack tags: master, trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to Demo/test-data.lisp.

︙︙
73
74
75
76
77
78
79








































80
81
82
83
84
85
                    for y from -20 by 20
                    for z from -40 by 10
                    for q from +280 by 5
                    collect (list x y c:+red+)
                    collect (list x (- z) c:+blue+)
                    collect (list x q c:+dark-green+))))
    (list* '("x" "y" "ink") data)))









































#+ (or)
(i::doseq (elt (i::data-array
                (stat-data (i::<stat-count>)
                           (i::bind-data '(:x "dialect") +data/lisps+))))
  (format *debug-io* "~16a: ~4d~%" (i::x elt) (i::y elt)))







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>






73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
                    for y from -20 by 20
                    for z from -40 by 10
                    for q from +280 by 5
                    collect (list x y c:+red+)
                    collect (list x (- z) c:+blue+)
                    collect (list x q c:+dark-green+))))
    (list* '("x" "y" "ink") data)))

(define-modify-macro maxf (&rest args) max)
(define-modify-macro minf (&rest args) min)

(defun make-position-generator (x1 y1 x2 y2 dx dy)
  (assert (< x1 x2))
  (assert (< y1 y2))
  (assert (> dx 0))
  (assert (> dy 0))
  (let ((x x1) (y y1)
        direction)
    (flet ((move-e ()
             (incf x dx)
             (minf x x2))
           (move-w ()
             (decf x dx)
             (maxf x x1))
           (move-s ()
             (incf y dy)
             (minf y y2))
           (move-n ()
             (decf y dy)
             (maxf y y1)))
      (lambda ()
        (cond ((and (= x x1) (= y y1)) (setf direction #'move-e))
              ((and (= x x2) (= y y1)) (setf direction #'move-s))
              ((and (= x x2) (= y y2)) (setf direction #'move-w))
              ((and (= x x1) (= y y2)) (setf direction #'move-n)))
        (funcall direction)
        (list x y)))))

(defun make-sinus-generator (x1 x2 height dx)
  (assert (< x1 x2))
  (assert (> dx 0))
  (let ((x x1))
    (lambda ()
      (incf x dx)
      (when (> x x2)
        (setf x x1))
      (list x (* height (sin (/ x 20)))))))

#+ (or)
(i::doseq (elt (i::data-array
                (stat-data (i::<stat-count>)
                           (i::bind-data '(:x "dialect") +data/lisps+))))
  (format *debug-io* "~16a: ~4d~%" (i::x elt) (i::y elt)))