#lang racket (require (planet wcy/mpost-wrapper)) (provide main) (define (main) (define (i-of-360 i n) (/ (* 360 i ) n)) (let* ((u '0.5cm) (P* (for/list ((i (in-range 5))) (rotate (i-of-360 i 5) (op* u 'down)))) (P `(,@P* ,(car P*))) (Q* (for/list ((Pi (in-list P)) (Pi+1 (in-list (cdr P)))) (op* 3 (mediation 0.5 Pi Pi+1)))) (Q `(,@Q* ,(car Q*))) (R* (for/list ((Qi (in-list Q)) (Qi+1 (in-list (cdr Q))) (Pi+1 (in-list (cdr P)))) (op* 1/3 (op+ Qi Qi+1 Pi+1)))) (R `(,@R* ,(car R*))) (S (map (curry op* 1.5) Q))) (for ((Pi (in-list P)) (Pi+1 (in-list (cdr P))) (Qi (in-list Q)) (Qi+1 (in-list (cdr Q))) (Ri (in-list R)) (Si (in-list S)) (Si+1 (in-list (cdr S)))) (draw (op-- Pi Pi+1)) (draw (op-- Pi+1 Ri)) (draw (op-- Qi Ri)) (draw (op-- Ri Qi+1)) (draw (op-- Qi Si)) (draw (op-- Si Si+1)) )))