Grasshopper

algorithmic modeling for Rhino

I faced a situation a week ago, where I need to materialize a point cloud into structure. The point cloud are derived from generative output from Processing. It look something like this, not to be exact.

 

I imagined the points forming bones like bone cells, thus wrote a script that takes the points, and find out which of the points are at the centre and at the periphery.

 

I leave out the centre points because I need to make a tube, I took away the outermost point as well, which made the tube look better. Then I connect lines from each point to the n (number) closest points, to make it a structure.

 

The way I figured out if a point is in the middle or in the periphery is by finding its vector to all other points, and then perform a mass addiction of those vectors, but with their amplitude divided by 1. This would then represent the distance importance factor. Alternative way is to mass addict the 1/distance, which is easier, but providing a slightly different result. (I provided the script with two option so you can try out)

 

NOTE: The script I provided has 1000 points in the cloud, so it may take a minute to compute.

A Random point cloud to test the script.Selected the green points, according to the evaluation of the Sum(1/distance).

I connected all the lines and cull the shortest few. (For each point)

More lines, thicker.

Victor Leung

 

Views: 3180

Attachments:

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service