Grasshopper

algorithmic modeling for Rhino

I'm trying to figure out a way to morph a box into a cylinder over a interval with various step parameters to understand the logic and apply it to morphing more complex shapes. So then I can apply that system to a surface to study the intervals that are created between the two objects. Can anyone point me in the right direction or suggest a way about accomplishing this.

Views: 7393

Replies to This Discussion

Morphing 3D geometries might be a bit difficult.

An added difficulty is the fact that a box is made of 6 surfaces and a cylinder is made of 3.

My suggestions would be to start experimenting with 2D geometry or maybe deforming meshes for controlled 3D work.

morphing 2d geometries

Blend Shape
How would you suggest going about morphing 2d geometry. If I remember correctly I saw a tutorial but I haven't been able to locate it on the net. Thanks for the reply.
Did the link titled "morphing 2d geometries" from the previous post work for you? You might have to go to the actual post in the discussion forum if you were only reading my reply by e-mail...
The one link Taz gave about 2d geometry is exactly what I wanted to post here, yesterday already, but ning's searching isn't all that great and didn't know where to find it since its from a long way back.

To be specific and maybe not answer the bigger question and probably state the obvious, morphing a box into a cylinder is at best a 2d process in anyways. Like morphing a square to a circle, except they have height which won't be affected in anyway that matters for the purpose of the exercise.

I would use that example of David in the 2d geometry link to create a bunch of intervals while morphing a square to a circle. I would focus on the position and proportional change of movement of the control points of the curves as they morph. But thats just me.

Goodluck.
Thanks Taz and Theunis. I'm going to look into a more 3d approach. I'll post it if I figure it out.
3d morphing is quite possible, just that you have to do a little step -by-step break-up of your operation first. The primary question in this case would be:

Is it mesh geometries or Nurbs that you are looking to morph between?

At the end of the day, nearly all such operations come down to moving a bunch of points, and rebuilding your geometry from them. So the logical steps are:

1. Breakdown source & target geometries into points.
2. Calculate vectors from source points to target points.
3. Step2 implies that there needs to be an equal number of source and target points, which is by far one the most important considerations to make. If your are dealing with Nurbs, you must rebuild your geometries in order to have the same number of points, and if its meshes, you need to add tessellation.
4. Once you have the vectors, incrementally move points long these vectors in X number of steps, and each time you move them, rebuild your geometry from them using the same logic/sequence that you used to break it down in step1.


I posted a small example for mesh blending here. See if that helps.

If you are dealing with a Nurbs sphere and Nurbs Box, then things aren't very straight forward. For starters, a sphere is a single surface, while a box is 6. Since you can't make a box with a single surface, you will have to make your sphere with 6, somewhat broken down in the manner as if a cube were radially projected onto it. And then you will have to morph each of the surfaces to go from the 'part-sphere' to a flat face of the box by moving around their CVs.
Oops.. Didn't notice that taz posted the same example as me in 'Blend Shape'.
No problem. It's a link to your previous explanation anyway!

For this type of problem Maya might be the best tool to use since that's what it was developed for (character faces/expressions).

And even with Maya the setup would take some thought when dealing with multiple surfaces.

Ok, 3 years later...

Hi Matt, I was also trying to do this. I did this tutorial from Eat a Bug

http://eat-a-bug.blogspot.com.br/2009/02/blend-surfaces.html

And can anyone tell how get the blended geometry stopped intead of

tracking a line between the to solids??

Hey Matt,
I know it's a bit late now but anyway I was trying to deal something as you posted above. It's possible to transform a square to a circle. I still couldn't go further with 3D geometries but working on it. See the attached file

Cheers,

Attachments:

That script is so solid, i'm wondering tho what would need to be done to transform any closed curve to another?

You couldn't. That script lives and dies by the fact that squares and circles are topologically identical if you allow rounded corners. Hence, there is only a single number which controls the transition from one shape to another.

If you're dealing with freeform curves then you first need to establish this topological mapping from one to the other. This is an exceedingly difficult process if you have to design it without knowing anything about the curves in question.

Kinks in the curves are always problematic, though solutions do exist for dealing with them. One thing you have to decide is whether kinks ought to be part of transitions or not if they cannot be matched up between the two input curves. If kinks should only exist in the extreme cases, you'd get something like this:

instead of something like this:

Another problem is how do you decide which kinks on curve A are matched up with which kinks on curve B? Most software I've seen just maps them 1:1 or ignores any potential matching and just projects kinks on either curve onto the other, resulting in either:

or:

Or of course you could decide on a cut-off point when mode1 gives way to mode2...

Finally, and definitely the most difficult is whether you interpret these between curves as individual instance or as part of a bundle of interpolating curves. If it's supposed to be a bundle then you may want to avoid intersections between any two adjacent curves. This can be extremely difficult to determine and solve for.

If you don't care about intersections, your results may look like:

Whereas a global/bundle approach would need to avoid those crossings:

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service