docs: add diagrams for spatial partition, special case, specification, state, step builder, strangler, strategy, subclass sandbox

This commit is contained in:
Ilkka Seppälä
2025-04-10 21:13:17 +03:00
parent 8e823909da
commit cd224ea5fe
16 changed files with 32 additions and 4 deletions
+4
View File
@@ -39,6 +39,10 @@ Wikipedia says
>
> For example, in ray tracing, space partitioning helps quickly determine the objects a ray might intersect by narrowing down the search space, leading to faster rendering times. Similarly, in game development, Quadtrees can efficiently manage 2D game environments by segmenting the space into smaller regions, facilitating quicker collision detection and rendering.
Flowchart
![Spatial Partition flowchart](./etc/spatial-partition-flowchart.png)
## Programmatic Example of Spatial Partition Pattern in Java
The Spatial Partition design pattern in Java is a strategic approach for handling multiple objects in expansive game worlds or detailed simulation environments, boosting query efficiency and operational speed. It allows us to efficiently manage these objects and perform operations like collision detection or range queries. The pattern works by dividing the space into smaller, manageable regions, and each object is associated with the region it belongs to. This way, we can limit our operations to a specific region, instead of checking every object against every other object.
Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB