Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
22
Task/Archimedean-spiral/Racket/archimedean-spiral.rkt
Normal file
22
Task/Archimedean-spiral/Racket/archimedean-spiral.rkt
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
#lang racket/base
|
||||
(require plot
|
||||
racket/math)
|
||||
|
||||
;; x and y bounds set to centralise the circle
|
||||
(define (archemedian-spiral-renderer2d a b θ/τ-max
|
||||
#:samples (samples (line-samples)))
|
||||
(define (f θ) (+ a (* b θ)))
|
||||
(define max-dim (+ a (* θ/τ-max 2 pi b)))
|
||||
(polar f
|
||||
0 (* θ/τ-max 2 pi)
|
||||
#:x-min (- max-dim)
|
||||
#:x-max max-dim
|
||||
#:y-min (- max-dim)
|
||||
#:y-max max-dim
|
||||
#:samples samples))
|
||||
|
||||
(plot (list (archemedian-spiral-renderer2d 0.0 24 4)))
|
||||
|
||||
;; writes to a file so hopefully, I can post it to RC...
|
||||
(plot-file (list (archemedian-spiral-renderer2d 0.0 24 4))
|
||||
"images/archemidian-spiral-racket.png")
|
||||
Loading…
Add table
Add a link
Reference in a new issue