Grasshopper

generative modeling for Rhino

# Morphing from a box to a circle

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.

Tags: Morphing, shapes

Views: 1304

### 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'.

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??