Grasshopper

algorithmic modeling for Rhino

hi,

I was able to make a small grid of points that move in relationship to eachother. When some of the points change in the x direction other points move in the z direction. I would like to try to lay a surface over these points that shows this relationship. I have tried using the deform surface tool and I could not get it to work. I was wondering if anyone could help or had any ideas that would help lead me in the right direction. I have posted my script.

 

Views: 3502

Attachments:

Replies to This Discussion

Looking into it. In the meantime, this:

 

 

Doesn't make sense. You need to define unique variable names in the left part of the mapper, so you can create a well-defined mapping. The left should always looks like:

 

{A;B;C;...;X}

 

depending on how many indices there are in your paths. Do not replace the literals with numbers. Then re-use those same literals on the right hand side:

 

{B;C;...;X;A}

 

in whatever order makes sense.

 

If you don't like to use "A" or "D", you're free to pick other names of course, as long as they adhere to variable naming rules in the Expression language (only alphanumeric symbols and the underscore, cannot start with a number). So:

 

{fruitbat; guineapig; seadragon;...;horseshoecrab}

 

works in the same way.

 

What you definitely should *not* do is use numbers (they just get lost), or the same name twice.

 

If you want to flatten your entire data tree into a {0;0;0} branch, then just use the Flatten component and override the Flatten Path input.

 

--

David Rutten

david@mcneel.com

Poprad, Slovakia

ok thank you very much...i changed the path mappers but the deform still wont work

I can't work out what it is exactly you're trying to do, so allow me to explain Spatial Deformation in a generic fashion.

 

A Spatial Deformation is a collection of forces that all affect a shape. Each force has a 'gripping point', and the area around this point is most strongly affected by that force. The farther away you are from the gripping point, the weaker that force becomes, with respect to the other forces involved. For example, imagine we have a simple shape with a bunch of gripping points (the green crosses):

 

 

Some of the points are coincident with the shape, others are merely nearby. Now we move each of our gripping points to a different location, and we'd like the shape to mimic this distortion:

 

 

 

The first action item on our list is to compute the forces for all gripping points. A force is basically a vector. It defines both in what direction the force acts and how strong it is. The black arrows are the forces, and you can create those using either a [Vector 2Pt] component or a Subtraction component (new points - old points = motion vectors).

 

As I mentioned before, each force has an area of influence around it which ensures the force becomes more and more dominant the closer you get to it:

 

 

The part of the shape directly underneath this gripping point will only be affected by that one force. the parts of the shape adjacent to this gripping point will be mostly affected by this force, but they will also feel some pull from other forces in the vicinity. Parts of the shape far away will be affected mostly by other forces.

 

 

All of this results in the above deformation. As you can see, whenever the gripping point was coincident with the base shape, the shape has been moved all the way to the purple points. If the gripping point was only near the base shape, the deformation is only partial.

 

So when using the Spatial Deform component you need to provide a list of gripping points and a list of force vectors. Furthermore these lists need to be the exact same length.

 

Is that enough to get you going again?

 

 

Incidentally, if your points are on a rectangular grid (as they appear to be), you can also choose to fit an interpolated nurbs surface through them. It might be the easier solution in this particular case.

 

--

David Rutten

david@mcneel.com

Poprad, Slovakia

ok thank you very much.. this gives me alot to try. I think I should be able to work on it from here...thanks for your help

Hi Braedy,

 

I'm not sure if this is what you're looking for.   I didn't see a way to connect your point system to your surface with Spatial Deformation so I took a different approach. 

 

Chris

 

Attachments:
thanks alot guys I just had to use the path mapper tool to put the points in the surface from points and it worked!!!

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