<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://pybullet.org/Bullet/phpBB3/app.php/feed/topic/7467" />

	<title>Real-Time Physics Simulation Forum</title>
	
	<link href="https://pybullet.org/Bullet/phpBB3/index.php" />
	<updated>2011-10-08T15:55:54+00:00</updated>

	<author><name><![CDATA[Real-Time Physics Simulation Forum]]></name></author>
	<id>https://pybullet.org/Bullet/phpBB3/app.php/feed/topic/7467</id>

		<entry>
		<author><name><![CDATA[mobeen]]></name></author>
		<updated>2011-10-08T15:55:54+00:00</updated>

		<published>2011-10-08T15:55:54+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=25717#p25717</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=25717#p25717"/>
		<title type="html"><![CDATA[Re: Meshless FEM [SOLVED]]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=25717#p25717"><![CDATA[
<blockquote class="uncited"><div>That's great, I will add it up to my collection. =)<br><br>But I am doing character simulation, if I use it in the future, I will let you know how it goes. Cheers Man !</div></blockquote>Sure Dr. Shepherd, <br>   Do let me know about how it helps you. All the best for your work.<br><br>Regards,<br>Mobeen<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=8124">mobeen</a> — Sat Oct 08, 2011 3:55 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Dr.Shepherd]]></name></author>
		<updated>2011-10-08T09:48:26+00:00</updated>

		<published>2011-10-08T09:48:26+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=25714#p25714</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=25714#p25714"/>
		<title type="html"><![CDATA[Re: Meshless FEM [SOLVED]]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=25714#p25714"><![CDATA[
That's great, I will add it up to my collection. =)<br><br>But I am doing character simulation, if I use it in the future, I will let you know how it goes. Cheers Man !<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=7605">Dr.Shepherd</a> — Sat Oct 08, 2011 9:48 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[mobeen]]></name></author>
		<updated>2011-10-08T08:46:10+00:00</updated>

		<published>2011-10-08T08:46:10+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=25712#p25712</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=25712#p25712"/>
		<title type="html"><![CDATA[Re: Meshless FEM [SOLVED]]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=25712#p25712"><![CDATA[
Hi all,<br>   I have just updated the OpenCloth repository(<a href="http://code.google.com/p/opencloth/" class="postlink">http://code.google.com/p/opencloth/</a>) to include my meshless FEM code.<br><br>As always comments and critics welcome.<br><br>Regards,<br>Mobeen<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=8124">mobeen</a> — Sat Oct 08, 2011 8:46 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[mobeen]]></name></author>
		<updated>2011-10-05T11:31:55+00:00</updated>

		<published>2011-10-05T11:31:55+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=25671#p25671</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=25671#p25671"/>
		<title type="html"><![CDATA[Re: Meshless FEM [SOLVED]]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=25671#p25671"><![CDATA[
Hi Dirk.   <blockquote class="uncited"><div>Nice! Did you add this to your open cloth project?</div></blockquote>   Not yet but I will be doing it as soon as I get some time.<br><br>Regards,<br>Mobeen<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=8124">mobeen</a> — Wed Oct 05, 2011 11:31 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Dirk Gregorius]]></name></author>
		<updated>2011-10-04T19:36:49+00:00</updated>

		<published>2011-10-04T19:36:49+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=25658#p25658</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=25658#p25658"/>
		<title type="html"><![CDATA[Re: Meshless FEM [SOLVED]]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=25658#p25658"><![CDATA[
Nice! Did you add this to your open cloth project?<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=14">Dirk Gregorius</a> — Tue Oct 04, 2011 7:36 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[mobeen]]></name></author>
		<updated>2011-10-04T09:17:41+00:00</updated>

		<published>2011-10-04T09:17:41+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=25654#p25654</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=25654#p25654"/>
		<title type="html"><![CDATA[Re: Meshless FEM]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=25654#p25654"><![CDATA[
Hi all,<br>   Finally, I got it working. Thanks to Marco Fratarcangeli for sharing his implementation with me.<br>The only problem was that for the final step, you need to use the LeapFrog integration rather than explicit integration. I added it in and the result is this,<dl class="file"><dt class="attach-image"><img src="https://pybullet.org/Bullet/phpBB3/download/file.php?id=824" class="postimage" alt="meshlessFEM.png" onclick="viewableArea(this);" /></dt></dl><p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=8124">mobeen</a> — Tue Oct 04, 2011 9:17 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[mobeen]]></name></author>
		<updated>2011-10-04T09:18:51+00:00</updated>

		<published>2011-09-25T06:02:29+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=25509#p25509</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=25509#p25509"/>
		<title type="html"><![CDATA[Meshless FEM [SOLVED]]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=25509#p25509"><![CDATA[
Hi all,<br>   I am trying to implement the following paper "Point Based Animation of Elastic, Plastic and Melting Objects" available:<a href="http://www.matthiasmueller.info/publications/sca04.pdf" class="postlink">http://www.matthiasmueller.info/publications/sca04.pdf</a> however, currently the output I am getting is wrong my points just simply fall down due to gravity and then explode. This is how I have done it so far if someone here has any idea of where I might be wrong please help.<br><br>From what I have understood, basically, there are four steps in the algorithm:<br>1) Estimation of the moment matrix for each point (sum (Xj-Xi)(Xj-Xi)^T Wij) and then inverting it.<br>2) Calculate external forces (gravity/collision/wind etc.)<br>3) Calculate the internal forces due to stresses between the current point and neighbour.<br>4) Integration of the velocities and then obtaining new positions from them.<br><br>For 1) this is how I am calculating it.<div class="codebox"><p>Code: </p><pre><code>for( k=0;k&lt;numZ;k++) {   for( j=0;j&lt;numY;j++) {       for( i=0;i&lt;numX;i++) {         int current_index =(((k*numY)+j)*numX)+i;         glm::mat3 sumM=glm::mat3(1);         for(int m=0;m&lt;18;m++) {glm::vec3 n = getNextNeighbour(m); int ix = int(n.x+i);int iy = int(n.y+j);int iz = int(n.z+k);int index = (((iz*numY)+iy)*numX)+ix;if (index &lt; 0)      index =0;if (index &gt;=total_points)   index = total_points-1;glm::vec3 Xij = X[index]-X[current_index];float r = glm::length(Xij);float h = 1;float k = kernel(r,h);rho_i[current_index] += k*mass;glm::mat3 tmp = glm::mat3(1);tmp[0][0] = Xij.x*Xij.x;tmp[0][1] = Xij.x*Xij.y;tmp[0][2] = Xij.x*Xij.z;tmp[1][0] = Xij.y*Xij.x;tmp[1][1] = Xij.y*Xij.y;tmp[1][2] = Xij.y*Xij.z;tmp[2][0] = Xij.z*Xij.x;tmp[2][1] = Xij.z*Xij.y;tmp[2][2] = Xij.z*Xij.z;sumM += k*tmp;            }        Vol[current_index] = mass/rho_i[current_index];        Minv[current_index] = glm::inverse(sumM);        }    }}</code></pre></div>2) is obvious <br>3) is more involved and this is how i calculate the internal forces. D is a vec3 containing the three coefficients of the elasiticity matrix.<div class="codebox"><p>Code: </p><pre><code>//Compute internal forcesint j,k;float d15 = Y / (1.0f + nu) / (1.0f - 2 * nu);float d16 = (1.0f - nu) * d15;float d17 = nu * d15;float d18 = Y / 2 / (1.0f + nu);glm::vec3 D(d16, d17, d18); //Isotropic elasticity matrix D//Calculate displacementfor(i=0;i&lt;total_points;i++) {   U[i] = X[i]-Xi[i]; }glm::mat3 delU = glm::mat3(1);  glm::mat3 e = glm::mat3(1);             //strainglm::mat3 s = glm::mat3(1);//stressglm::mat3 B = glm::mat3(1);//Calculate derivativesfor( k=0;k&lt;numZ;k++) {   for( j=0;j&lt;numY;j++) {       for( i=0;i&lt;numX;i++) {          int current_index =(((k*numY)+j)*numX)+i;         glm::vec3 sumMx = glm::vec3(0);         glm::vec3 sumMy = glm::vec3(0);         glm::vec3 sumMz = glm::vec3(0);         for(int m=0;m&lt;18;m++) {glm::vec3 n = getNextNeighbour(m); int ix = int(n.x+i);int iy = int(n.y+j);int iz = int(n.z+k);int index = (((iz*numY)+iy)*numX)+ix;if (index &lt; 0)   index =0;if (index &gt;=total_points)   index = total_points-1;glm::vec3 Xij = X[index]-X[current_index];float r = glm::length(Xij);float h = 3*r;glm::vec3 Uij = U[index]-U[current_index];sumMx += Uij.x*Xij*kernel(r,h);sumMy += Uij.y*Xij*kernel(r,h);sumMz += Uij.z*Xij*kernel(r,h);            }            glm::vec3 delUx = Minv[current_index]*sumMx;            glm::vec3 delUy = Minv[current_index]*sumMy;            glm::vec3 delUz = Minv[current_index]*sumMz;            delU = glm::mat3(delUx, delUy, delUz);            glm::mat3 delUT = glm::transpose(delU);            e = 0.5*( delU + delUT + delUT*delU);            s[0][0] = D.x*e[0][0]+D.y*e[1][1]+D.y*e[2][2];            s[1][1] = D.y*e[0][0]+D.x*e[1][1]+D.y*e[2][2];            s[2][2] = D.y*e[0][0]+D.y*e[1][1]+D.x*e[2][2];                    s[0][1] = D.z*e[0][1];            s[1][2] = D.z*e[1][2];            s[2][0] = D.z*e[2][0];            s[0][2] = s[2][0];            s[1][0] = s[0][1];            s[2][1] = s[1][2];            B = - 2*Vol[current_index]*(delU + I)*s*Minv[current_index];            for(int m=0;m&lt;18;m++) {  gm::vec3 n = getNextNeighbour(m);   int ix = int(n.x+i);  int iy = int(n.y+j);  int iz = int(n.z+k);  int index = (((iz*numY)+iy)*numX)+ix;                if (index &lt; 0)     index =0;  if (index &gt;=total_points)     index = total_points-1;                glm::vec3 Xij = X[index]-X[current_index];  float r = glm::length(Xij);  float h = 3;      F[index] += B*Xij*kernel(r,h);  F[current_index] -= B*Xij*kernel(r,h);            }        }    }}</code></pre></div>4) Currently I am using explicit Euler integration from an existing code so this is fine.<br><br>Thanks,<br>Mobeen<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=8124">mobeen</a> — Sun Sep 25, 2011 6:02 am</p><hr />
]]></content>
	</entry>
	</feed>
