Point attractor on a morphed surface

unhandled

(Ali Dlg3) #1

Hello!

This is the first project that I am making on gh, so I hope that someone can orientate me

I am trying to make an arm cast and I made a voronoi surface and morphed it into a new surface, that is the shape of the arm. Now I want to use an attractor that modify this new surface (morphed one) and change the size of the holes

I manage to make a point attractor but it only modified the first surface that I created not the morphed one

I really apprecieate If someone can give me some advice

Thank you


#2

Pictures of your grasshopper/ the grasshopper file itself would make this easier to diagnose/explain.

But I’ll give it a shot either way. I assume you want the voronoi centers to move over the morphed surface. To do this you need to use UV coordinates. Look at “Surface closest point” and “evaluate surface” for getting and setting points based on UV coordinates.

Example:
Take the points after attraction (from the flat surface) and use “Surface Closest Point” component to get their UV position relative to the surface. Then use the “evaluate surface” component with the morphed surface and UV values from the previous step. This should give you the attracted points on the morphed surface. Now you will probably have to generate the voronoi cells in 3D on the morphed surface, and then cut the cells from the 3D shape. Bonus, you can place points near the morphed surface, get their UV (closest point) and use that on your flat surface (eval surface) as an attractor center.

I hope this helps. If you want a more detailed explanation add some images or the file so we can see your current approach. There are always multiple ways of getting similar results.


(Ali Dlg3) #3

Sorry I couldn’t answer you sooner, but I wanted to solve a problem that I am having with the code before sending it to you :persevere:

This is my gh file, but its not what I pretend to do in the project, I want to make the holes get smaller and the surface denser but right now its making new objects in the center of seeds and the point attractor is working on them, not in my flat surface

Thank you for your time and consideration

1213.gh (12.1 KB)


#4

Could you internalize the attractor points and surface and upload it again. That way I can see what it is doing. Also you are using a “relay” component which I don’t seem to have, but I don’t think it breaks your code.

Edit: to internalize right click a component which takes input from your Rhino file and choose the internalize option. This will add the referenced object to the grasshopper file and disconnect it from the Rhino object. This is useful when sharing files with other people as you don’t need to include the rhino file.


#5

Hi.
Not sure this is what you want, anyway check attached demo if you want…

Morphed Voronoi_re.gh (48.2 KB)


(Ali Dlg3) #6

Yes! thank you both so much!