Discussion
Loading...

Post

Log in
  • About
  • Code of conduct
  • Privacy
  • Users
  • Instances
  • About Bonfire
Jack Rusher
Jack Rusher
@jack@berlin.social  ·  activity timestamp 2 weeks ago

I’m not sure how this #Clojure program could be shorter without losing generality. 🤔

(ns vga3d-01
(:require [common :refer [make-sketch hypercube-edges tau draw-line *current-frame* *num-frames*]]
[com. rusher.geometer.vgad :refer [point rotor rotate unit-x unit-y orthographic-project]]))
(def edges (hypercube-edges 3 200 point))
(defn draw []
(let [r (rotor [0 1 1] (* *current-frame* (/ tau *num-frames*)))] (doseq [pq (mapv (partial mapv #(-> (rotate % r)
(orthographic-project unit-x unit-y)))
edges) ]
(draw-line pq))))
(def sketch (make-sketch draw))
(ns vga3d-01 (:require [common :refer [make-sketch hypercube-edges tau draw-line *current-frame* *num-frames*]] [com. rusher.geometer.vgad :refer [point rotor rotate unit-x unit-y orthographic-project]])) (def edges (hypercube-edges 3 200 point)) (defn draw [] (let [r (rotor [0 1 1] (* *current-frame* (/ tau *num-frames*)))] (doseq [pq (mapv (partial mapv #(-> (rotate % r) (orthographic-project unit-x unit-y))) edges) ] (draw-line pq)))) (def sketch (make-sketch draw))
(ns vga3d-01 (:require [common :refer [make-sketch hypercube-edges tau draw-line *current-frame* *num-frames*]] [com. rusher.geometer.vgad :refer [point rotor rotate unit-x unit-y orthographic-project]])) (def edges (hypercube-edges 3 200 point)) (defn draw [] (let [r (rotor [0 1 1] (* *current-frame* (/ tau *num-frames*)))] (doseq [pq (mapv (partial mapv #(-> (rotate % r) (orthographic-project unit-x unit-y))) edges) ] (draw-line pq)))) (def sketch (make-sketch draw))
  • Copy link
  • Flag this post
  • Block
Jack Rusher
Jack Rusher
@jack@berlin.social replied  ·  activity timestamp 2 weeks ago

Every geometry library needs an orthographic projection cube example, right?

Your browser does not support the video tag.
This video cannot be previewed
Open original
Sorry, no caption provided by author
  • Copy link
  • Flag this comment
  • Block
Jack Rusher
Jack Rusher
@jack@berlin.social replied  ·  activity timestamp 2 weeks ago

I’m not sure how this #Clojure program could be shorter without losing generality. 🤔

(ns vga3d-01
(:require [common :refer [make-sketch hypercube-edges tau draw-line *current-frame* *num-frames*]]
[com. rusher.geometer.vgad :refer [point rotor rotate unit-x unit-y orthographic-project]]))
(def edges (hypercube-edges 3 200 point))
(defn draw []
(let [r (rotor [0 1 1] (* *current-frame* (/ tau *num-frames*)))] (doseq [pq (mapv (partial mapv #(-> (rotate % r)
(orthographic-project unit-x unit-y)))
edges) ]
(draw-line pq))))
(def sketch (make-sketch draw))
(ns vga3d-01 (:require [common :refer [make-sketch hypercube-edges tau draw-line *current-frame* *num-frames*]] [com. rusher.geometer.vgad :refer [point rotor rotate unit-x unit-y orthographic-project]])) (def edges (hypercube-edges 3 200 point)) (defn draw [] (let [r (rotor [0 1 1] (* *current-frame* (/ tau *num-frames*)))] (doseq [pq (mapv (partial mapv #(-> (rotate % r) (orthographic-project unit-x unit-y))) edges) ] (draw-line pq)))) (def sketch (make-sketch draw))
(ns vga3d-01 (:require [common :refer [make-sketch hypercube-edges tau draw-line *current-frame* *num-frames*]] [com. rusher.geometer.vgad :refer [point rotor rotate unit-x unit-y orthographic-project]])) (def edges (hypercube-edges 3 200 point)) (defn draw [] (let [r (rotor [0 1 1] (* *current-frame* (/ tau *num-frames*)))] (doseq [pq (mapv (partial mapv #(-> (rotate % r) (orthographic-project unit-x unit-y))) edges) ] (draw-line pq)))) (def sketch (make-sketch draw))
  • Copy link
  • Flag this comment
  • Block
Jack Rusher
Jack Rusher
@jack@berlin.social replied  ·  activity timestamp 2 weeks ago

Using CGA (conformal geometric algebra) to find the circumcircle that fits three moving points…

https://en.wikipedia.org/wiki/Conformal_geometric_algebra

#geometer

Your browser does not support the video tag.
This video cannot be previewed
Open original
Sorry, no caption provided by author

Conformal geometric algebra - Wikipedia

  • Copy link
  • Flag this comment
  • Block
Jack Rusher
Jack Rusher
@jack@berlin.social replied  ·  activity timestamp 2 weeks ago

Using PGA2D (2D Plane-based Geometric Algebra) to explore wallpaper groups. (Still making examples for this library 😆.)

https://en.wikipedia.org/wiki/Plane-based_geometric_algebra

#geometer

Your browser does not support the video tag.
This video cannot be previewed
Open original
Sorry, no caption provided by author

Plane-based geometric algebra - Wikipedia

  • Copy link
  • Flag this comment
  • Block

bonfire.cafe

A space for Bonfire maintainers and contributors to communicate

bonfire.cafe: About · Code of conduct · Privacy · Users · Instances
Bonfire social · 1.0.2-alpha.7 no JS en
Automatic federation enabled
Log in
  • Explore
  • About
  • Members
  • Code of Conduct