From 42a4b3bd8d7c4d3659ebd06bfa22410c78cfb0ab Mon Sep 17 00:00:00 2001 From: Charles Comstock Date: Wed, 7 Aug 2024 23:52:47 -0500 Subject: [PATCH] add another line opposite --- src/shimmers/sketches/infographics.cljs | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/shimmers/sketches/infographics.cljs b/src/shimmers/sketches/infographics.cljs index 4be4687d..f8f8df9e 100644 --- a/src/shimmers/sketches/infographics.cljs +++ b/src/shimmers/sketches/infographics.cljs @@ -51,10 +51,17 @@ (let [p (rp/sample-point-inside (g/scale-size bounds 0.75)) rp (g/map-point bounds p) a-circle (gc/circle p (* 0.7 (g/dist p (g/closest-point bounds p)))) - line (clip/line-through-point bounds p (angle-from-quadrant rp))] + isec-lines (lines bounds a-circle) + angle (g/heading (first isec-lines)) + line (clip/line-through-point bounds p (angle-from-quadrant rp)) + parallel (clip/line-through-point bounds + (if (tm/delta= angle 0) (gv/vec2 (- width (:x p)) (* 0.5 height)) + (gv/vec2 (* width 0.5) (- height (:y p)))) + angle) + ] (concat [(vary-meta a-circle assoc :stroke-width 2.0)] - (lines bounds a-circle) - [line]))) + isec-lines + [line parallel]))) (defn scene [{:keys [scene-id]}] (csvg/svg-timed {:id scene-id