How to populate a box geometry, inside a closed curve or on a surface?

So fairly new to grasshopper,
Trying to figure out how to populate a box geometry, inside a closed curve/on a surface as a grid.

How to fill this

Inside This

So as to appear like this
3

Again fairly new to grasshopper,
thanks

Hello there are many discussions and publication on this subject, search with these keywords “voxel grasshopper” …
Here is a way


Calculate the bounding box
Calculate the number of rectangles in X and Y direction
Array the middle point of rectangles
Test is these centers points are inside or outside the curve
Dispatch only the points that are inside
Move the rectangles

1 Like

Hi,
Thanks for the help, will work on this and get back