top of page
Search

Week 37&38 ( Sep. 7 - Sep. 20) Accomplishment of Main Algorithms

  • groupyyzdh2323
  • Sep 22, 2020
  • 2 min read

Generation of Attraction Points

What we have done before for the sphere and cube volume are totally based on their geometric properties, which is kind of applicable since these properties are easily obtained. The case could be much more difficult when it comes to non-uniform proportion sphere (ellipsoid), rotated cubes (not axis-aligned), and not to mention freely-rotated or -scaled capsules and cylinders (quad and plane are discarded here since they are not so useful considering users' needs). To also include axis-based rotation and scaling, as well as capsules and cylinders, we totally changed our core concept from geometric properties base to ray-casting. In brief, the ray-casting method is to first randomly generate a point inside the bounding box of the volume (same way as generating points inside an axis-aligned cube), and then cast a ray from the center of the bounding box to it. If this ray has a collision with the volume, then this newly-generated point is out of the volume and should be discarded, while one more loop to generate points should be added. If not, this point is inside the volume and should be kept. When dealing with the intersection, a similar method is implemented to judge whether the new point is inside already-added volumes. The bounding box and ray-volume collision are supported by the default mesh collider of the basic objects (cube, sphere, capsules and cylinders) in Unity.


The UI is adjusted to include more type choices, axis-based rotation and scaling. Note that the surface-distributed generation is discarded since it could hardly be realized through the mesh collider. And we add a hide volume toggle to better observe the results.

ree

Space colonization algorithm

Current stage of the space colonization algorithm implementation provides the following outcome, it can be observed that a tree-like pattern is already achieved. The later step can be creating a proper mesh for the visual representation.

ree


 
 
 

Comments


©2020 by Group YYZ Weekly Blog. Proudly created with Wix.com

bottom of page