Grasshopper

algorithmic modeling for Rhino

Create grid cells in a closed curve and check the cells for containment of points

Hello everybody!

I need help with a definition that I am working on.

I have this island(pink curve) and this collection of blue points.

I want to find in which areas are these points more dense. 

I have tried to make a grid inside the closed pink curve and then check with containment the number of the points in the cells. 

But I am not able to make a grid in the closed pink curve with cells.

Can please anybody help?

Thank you in advance!

Views: 4787

Attachments:

Replies to This Discussion

why not make the grid of cells within a bounding box around your curve at the density you like and eliminate all cells whose center point fails the region containment test?

I have tried to do so. But I cannot do a grid into a bounding box. I don't know why!?

I have also tried to trim a bigger grid from the curve but then the cells are lost.

In fact all I want to do is create a grid in the pink curve resulting cells?

Can anybody help me?

Hi,

I suppose you understand that you can't create a rational grid inside this curve. So, my advice would be to  either create a grid of cells from the bounding box(you can achieve this by iso-triming the lower face of the bounding box) like David suggested, or create a convex hull tessellation like voronoi or delaunay to check for containment.

Best,

M. 

Of course I know that it cannot be rational but this is not my problem

The thing that I tried both things that you suggested, but in the first case I cannot create a grid in the bounding box, and in the voronoi case I cannot cut of the cells outside the curve.

Could you please make a sample definition?

Sure, As soon as inget in front of a pc with rhino installed, so you' ll have to be patient if someone else hasn't helped u out till that time.
M.

Ok thanks!

Thanks a lot!

I guess I was too late in the end.:(Best,

M.

Attachments:

Thank you anyway! I did it the same way.

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service