Flocking Quadtrees

Learn how to make a flocking simulation using Quadtrees and Clojurescript. It's a revisit of last weeks post about Functional Quadtrees.

🤔🎨 Ah, yes, yet another attempt to make data structures "fun" by shoehorning them into #Clojure. Who wouldn't want to spend their weekend navigating a "functional" #quadtree demo that ironically leaves mobile users clicking aimlessly? 📱🔍
https://lbjgruppen.com/en/posts/functional-quadtree-clojure #dataStructures #functionalProgramming #UXdesign #HackerNews #HackerNews #ngated
Functional Quadtrees

A Quadtree is a tree data structure, which is useful for giving more focus/detail to certain regions of your data, while saving resources elsewhere. I could only find a couple tutorials/guides and both were imperative, so I figured it'd be fun to do a functional version in Clojure which runs in the browser.

🌘 函數式 Quadtree:Clojure 實現與瀏覽器視覺化
➤ 以函數式思維在 Clojure 中構建動態細節的空間分割樹
https://lbjgruppen.com/en/posts/functional-quadtree-clojure
本文介紹如何使用 Clojure 建構一個函數式的 Quadtree 資料結構,並在瀏覽器中實現互動式視覺化。作者說明瞭傳統的命令式方法需要手動管理節點更新,而函數式方法則透過遞迴重建整個樹狀結構,以達到簡潔且易於維護的目標。文中詳細闡述了節點的定義、判斷分割的邏輯,以及如何利用 Clojure 的 `prewalk` 函數來進行樹狀結構的遍歷和轉換。此外,文章也探討瞭如何透過 ClojureScript 的原子 (atom) 和 `add-watch` 機制,將 Quadtree 的變更即時反映在瀏覽器的 Canvas 視覺化上,並分享了使用雜湊函數為節點生成固定顏色的技巧,以避免畫面閃爍。
+ 太棒了!一直想找函數式處理空間分割的範例,這篇寫得非常清晰
#程式設計 #Clojure #Quadtree #函數式程式設計 #瀏覽器
Functional Quadtrees

A Quadtree is a tree data structure, which is useful for giving more focus/detail to certain regions of your data, while saving resources elsewhere. I could only find a couple tutorials/guides and both were imperative, so I figured it'd be fun to do a functional version in Clojure which runs in the browser.

Coal Town / quadtree division and 1bit texture placement

#bitmap #quadtree #texture #grit #vectorart #artgénératif #noiretblanc

Today might be the day where I implement a quadTree for the first time. I have never needed it before but I do think I need it now, as the frame rate went way down when I added very basic collision detection to my mini-game-engine.

But I'll have to wait an see if I actually get to have the time to do it today. 🤞

#gamedev #miniEngine #quadtree

TIC-80 Showcase #510 - Fractal Beach

YouTube

MassivePoints 0.12.0 is released.

* Fixed boundary coordinate precision on calculation for splitting.
* Fixed the globe bound.
* Added coordinate points validation process on sample code.
* Added more xml comments.

#dotnet #gis #quadtree

https://github.com/kekyo/MassivePoints

GitHub - kekyo/MassivePoints: .NET implementation of modified QuadTree, perform faster range searches from very large number of multi-dimensional coordinates, with in-memory and database offloading.

.NET implementation of modified QuadTree, perform faster range searches from very large number of multi-dimensional coordinates, with in-memory and database offloading. - kekyo/MassivePoints

GitHub

MassivePoints 0.10.0 is released.

* Split session interface between updatable and readable.
* Supported multi-dimensional coordinate points. (1D, 2D, 3D and more)

#dotnet #gis #quadtree

https://github.com/kekyo/MassivePoints

GitHub - kekyo/MassivePoints: .NET implementation of modified QuadTree, perform faster range searches from very large number of multi-dimensional coordinates, with in-memory and database offloading.

.NET implementation of modified QuadTree, perform faster range searches from very large number of multi-dimensional coordinates, with in-memory and database offloading. - kekyo/MassivePoints

GitHub

MassivePoints 0.9.0 is released.

* Added bulk insert features.
* Improved concurrency.
* Implemented index shrinking.

#dotnet #gis #quadtree

https://github.com/kekyo/MassivePoints

GitHub - kekyo/MassivePoints: .NET implementation of modified QuadTree, perform faster range searches from very large number of multi-dimensional coordinates, with in-memory and database offloading.

.NET implementation of modified QuadTree, perform faster range searches from very large number of multi-dimensional coordinates, with in-memory and database offloading. - kekyo/MassivePoints

GitHub