Permalink
Browse files

No more lattice

  • Loading branch information...
pavpanchekha committed Sep 1, 2014
1 parent f97d2f9 commit ac37d6ec566c0eb216cfb951be83ba0345d9af0a
Showing with 2 additions and 10 deletions.
  1. +2 −10 casio/points.rkt
View
@@ -51,16 +51,8 @@
(define ((point-factory selector) num dim)
(if (= dim 0)
'(())
(let* ([num-ticks (round (expt num (/ 1 dim)))]
[rest-num (/ num num-ticks)]
[pos-ticks (ceiling (/ num-ticks 2))]
[neg-ticks (- num-ticks pos-ticks)]
[first (append (reverse (map - (selector neg-ticks)))
(selector pos-ticks))])
(sort (apply append
(for/list ([rest ((point-factory selector) rest-num (- dim 1))])
(map (λ (x) (cons x rest)) first)))
< #:key car))))
(let ([points (build-list dim (λ (_) (selector num)))])
(sort (flip-lists (map shuffle points)) < #:key car))))
(define (make-period-points num periods)
(let ([points-per-dim (floor (exp (/ (log num) (length periods))))])

0 comments on commit ac37d6e

Please sign in to comment.