algorithmic modeling for Rhino
I found a code on here for grasshopper that allows me to morph one shape into another in a series of morphs. The code does work, however, for even a simple morph it completely distorts the morphing series. What can I do to fix this? I have included pictures. I am very new to rhino and grasshopper.
You are attempting to "morph" a mesh into another ... where there's no 1:1 correspondence between - say - vertices ... meaning that either some kind of other logic is required or ... er ... some other way.
I have a lot of similar cases (~50) but unfortunately are carried over solely via code (useless to you ... unless you speak C#).
In general imagine a mesh that has N vertices and we want to "morph" it into something other: let's assume for simplicity into a "spherical mesh" (all vertices lay in a given sphere).
Imagine that for each vertex V we find the closest point (cP) on the sphere and then we define a pMod point at 0-1 on the yielding line V,Cp (Note: you don't need to reparametrise a Line). Imagine that we sample the vectors (pMod - V) into a Vectors List and then we feed the PDeform GH native component with (a) the mesh, (b) the mesh vertices (i.e. the from part) and (c) the deformation vectors (i.e. the to part).
The result could be something like that:
So ... if we replace the sphere with some object and we mastermind some proper vector creation strategy ... is possible to "morph" a mesh into another mesh that "looks" like the target object (add some " " more, he he).
Obviously the "variations" are unlimited, for instance this deformation ... follows another logic (maps only the "basePoints" into a circle and modifies the topmost points):
Meaning that theoretically a banana could become an alligator (obviously a yellow one).
Anyway ... notify if you want an example of the above.
Hi Peter, I'm looking into using the mesh morphing to connect to objects, can you share you c# file for the example you shared? Thank you!
Here it is. Are you aware that this Forum is dead? (another far uglier [aesthetics = no no] is active).