Grasshopper

algorithmic modeling for Rhino

Hi Everyone !

How can you put this Voronoi field with attractor point to any kind of surface. I tried to change the plane direction at command (PL) "Voronoi" but no results.It seems that the "default" Plane is the only way. What am i doing wrong ?? (i attached the .ghx)   Many thanks to any replies !

Views: 5737

Attachments:

Replies to This Discussion

I looked at your def, and I'm jot exactly sure what you're asking. The voronoi component is strictly 2D - so it cannot generate a voronoi pattern on a surface. What you can do is 'remap' your surface divisions and your attractor point to the XY plane, run the voronoi on those points, then 'remap' to your surface.

what are you trying to achieve? do you have any example images?
here's an example of what i'm talking about.

Attachments:
Thank you for your answer ! This is exactly what i wanted to do. I reparamatized my surface as you told me, but i do not understand this "remap" thing with points. You wrote in the .ghx but still don't understand. Can you explain that to me ?
When working with curves and surfaces in 3D, you have to understand the different spaces involved. "Remapping" is often used to indicate translating geometry from one space to another.

For example, let us consider a plane somewhere in space, 10 units along each side, and it has UV domains 0-1 in both directions. It's a perfect square surface basically.

This surface only really 'exists' on the inside of the UV domains. You can evaluate the surface at {0,0}, which will give you the lower left corner, you can evaluate it at {1,1}, which will give you the upper right corner or you can evaluate it at {0.5, 0.5} which might give you the point in the middle. If you evaluate it at {2,-5}, you will get a point that is beyond the surface edge.

This surface 'space' is strictly two-dimensional and it is also bounded, meaning it has a finite region in which things can be said to exist. If we attach a point to this surface at UV coordinates {0.5, 0.5}, then move the surface about, the point will move with the surface. So it's XYZ coordinates will change, but the UV coordinates are still {0.5, 0.5}! These are just two ways of looking at the same point. Either we treat the point as a coordinate in infinite 3D euclidean space {x,y,z} or we treat it as anchored to a surface {u,v}. Going from XYZ to UV is usually called "Projecting" or "Pulling", going from UV to XYZ is usually called "Evaluating" or "Sampling", but they are mathematically very similar processes.

Evan mentioned that Voronoi only works in the flat 2D plane. He suggested remapping the points from the surface onto the World XY plane, then solving the Voronoi diagram, then mapping the result back onto the surface again.

Basically that means projecting all your XYZ points to surface UV space. That will give you a collection of points defined strictly by 2 coordinates, i.e. it is completely flat. You solve the Voronoi diagram on these flat points, and then you have to put the flat points (and the flat voronoi cell outlines) back onto the surface.

Have a look at the [Surface CP] and [Evaluate Surface] components, they provide the methods required to map coordinates from XYZ space to UV space and vice versa.

--
David Rutten
david@mcneel.com
Poprad, Slovakia
Wow ! Thank you David ! Well in our university people never heard about grasshopper maybe just some kind of things about parametric architecture which is just a part of the "parametric" world. It is always good to know that there are people who are ready to teach. Well thank you again.

Miklós from Hungary

Thanks a lot, you're a genius, I didn't thought to remap the surface. Very clever solution !

So finally i got it ! Thanks again.
Attachments:

Say, I have a curved façade but I want play my punctures on 2-d first, and “remap” from XYZ plan to curved UV façade.

If I can do one, I may iterate through the others.   Any thoughts? Thanks,

Attachments:

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service