Morphing One Object into Another - DISTORTED HELP - Grasshopper2024-03-29T11:47:42Zhttps://www.grasshopper3d.com/forum/topics/morphing-one-object-into-another-distorted-help?commentId=2985220%3AComment%3A1941125&feed=yes&xn_auth=noHere it is. Are you aware tha…tag:www.grasshopper3d.com,2018-10-26:2985220:Comment:19411252018-10-26T06:47:13.182Zpeter fotiadishttps://www.grasshopper3d.com/profile/peterfotiadis
<p>Here it is. Are you aware that this Forum is dead? (another far uglier [aesthetics = no no] is active).</p>
<p><a rel="nofollow noopener" href="https://discourse.mcneel.com/c/grasshopper" target="_blank">https://discourse.mcneel.com/c/grasshopper</a></p>
<p></p>
<p>Here it is. Are you aware that this Forum is dead? (another far uglier [aesthetics = no no] is active).</p>
<p><a rel="nofollow noopener" href="https://discourse.mcneel.com/c/grasshopper" target="_blank">https://discourse.mcneel.com/c/grasshopper</a></p>
<p></p> Hi Peter, I'm looking into us…tag:www.grasshopper3d.com,2018-10-26:2985220:Comment:19409092018-10-26T02:12:07.029ZElnaz Tafrihihttps://www.grasshopper3d.com/profile/ElnazTafrihi
<p>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!</p>
<p>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!</p> You are attempting to "morph"…tag:www.grasshopper3d.com,2017-02-01:2985220:Comment:16824932017-02-01T17:49:29.070Zpeter fotiadishttps://www.grasshopper3d.com/profile/peterfotiadis
<p>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.</p>
<p>I have a lot of similar cases (~50) but unfortunately are carried over solely via code (useless to you ... unless you speak C#).</p>
<p>In general imagine a mesh that has N vertices and we want to "morph" it into something other: let's assume <strong>for simplicity</strong> into a…</p>
<p>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.</p>
<p>I have a lot of similar cases (~50) but unfortunately are carried over solely via code (useless to you ... unless you speak C#).</p>
<p>In general imagine a mesh that has N vertices and we want to "morph" it into something other: let's assume <strong>for simplicity</strong> into a "spherical mesh" (all vertices lay in a given sphere).</p>
<p>Imagine that for each vertex <strong>V</strong> we find the closest point (<strong>cP</strong>) on the sphere and then we define a <strong>pMod</strong> point at <strong>0-1</strong> on the yielding line <strong>V,Cp</strong> (Note: you don't need to reparametrise a Line). Imagine that we sample the vectors (<strong>pMod</strong> - <strong>V</strong>) into a Vectors List and then we feed the <strong>PDeform GH native component</strong> with (a) the mesh, (b) the mesh vertices (i.e. the <span style="text-decoration: underline;"><strong>from part</strong></span>) and (c) the deformation vectors (i.e. the <span style="text-decoration: underline;"><strong>to part</strong></span>).</p>
<p>The result could be something like that:</p>
<p><a href="http://storage.ning.com/topology/rest/1.0/file/get/2769240618?profile=original" target="_self"><img width="721" src="http://storage.ning.com/topology/rest/1.0/file/get/2769240618?profile=RESIZE_1024x1024" class="align-full" width="721"/></a><a href="http://storage.ning.com/topology/rest/1.0/file/get/2769241195?profile=original" target="_self"><img width="721" src="http://storage.ning.com/topology/rest/1.0/file/get/2769241195?profile=RESIZE_1024x1024" class="align-full" width="721"/></a><strong><a href="http://storage.ning.com/topology/rest/1.0/file/get/2769241816?profile=original" target="_self"><img width="721" src="http://storage.ning.com/topology/rest/1.0/file/get/2769241816?profile=RESIZE_1024x1024" class="align-full" width="721"/></a></strong> 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).</p>
<p>Obviously the "variations" are unlimited, for instance this deformation ... follows <strong>another logic</strong> (maps only the "basePoints" into a circle and modifies the topmost points):</p>
<p><a href="http://storage.ning.com/topology/rest/1.0/file/get/2769241835?profile=original" target="_self"><img width="721" src="http://storage.ning.com/topology/rest/1.0/file/get/2769241835?profile=RESIZE_1024x1024" class="align-full" width="721"/></a></p>
<p>Meaning that theoretically a banana could become an alligator (obviously a yellow one).</p>
<p>Anyway ... notify if you want an example of the above.</p>