Yes. My example is a bit advanced. Your will be appreciated buy beginners. Please, consider including the information on the PDF in the Description pages and then publish it in Compadre.org/osp
Re: Re: Re: Re: Re: How to use "Mesh2D" (javascript) -
Wolfgang
192 Posts
It is easy to suggest a Tracker experiment file, EjsS model, or OSP program to the ComPADRE digital library. First login to the OSP Collection. Then click on the "suggest a resource" link in the upper right hand corner of the html page.
Please make sure that your material is documented and follows good programming practice before it is submitted.
Re: Re: Re: Re: Re: How to use "Mesh2D" (javascript) -
lookang
245 Posts
hi Professor Paco,
can you post an example that is rectangular in cells?
i tried to remix your codes but was unsuccessful
part 1 points // i tried to add to my exisiting codes for (i=0; i points[number][0] = x = xmin+(xmax-xmin)*i/(number-1); //mesh2D lookang y = ymin; // added to test set for (j=0; j points[number][1] = y = ymin+(ymax-ymin)*j/(number-1); //mesh2D lookang // sum[i][j]= (A1*Math.cos(omega*t-k*d[i][j])+A2*Math.cos(omega*t-k*d2[i][j]+phase)); if (coherence===true) { z = sum[i][j]= (A1*Math.cos(omega*t-k*d[i][j])+A2*Math.cos(omega*t-k*d2[i][j]+phase));
// z needed for right screen view //z = (A1*Math.cos(omega*t-k*d[i][j])+A2*Math.cos(omega*t-k*d2[i][j]+phase)); }
part 2 cells // was unable to render this correctly for rectangles for (var i=1, cell=0; i for (var j=1; j var thisTile = cells[cell]; // xmin+(xmax-xmin)*i/(number-1) var corner = xmin+(xmax-xmin)*i/(number-1) + j; thisTile[0] = corner-number-1; thisTile[1] = corner-number; thisTile[2] = corner; thisTile[3] = corner-1; } }
part 3 FieldAtPoint // is it equivalent to my variable sum ?
i am trying to recreate this ejs into ejss http://iwant2study.org/lookangejss/04waves_11superposition/ejs/ejs_model_Ripple_Tank_Interferencewee13.jar
thank you in advance! and great job making EJSS :)
by the way, Dear paco, i think i found a bug, the mesh2D is always on the top layer, causing the other objects to be on the lower layers automatically, thus only the mesh2D is visible.
Re: Re: Re: Re: Re: Re: Re: How to use "Mesh2D" (javascript) -
Francisco Esquembre
237 Posts
Dear LooKang,
I studied your problem yesterday but was not sure that you wanted to use a Mesh element. maybe a cellLattice would be enough.
Anyway, you were faster than me!
The bug you report is fixed, but the EjsS releasethat has fixed it is still beta. You can find it here: http://fem.um.es/EjsWiki/uploads/Download/EJS_5.1_150805.zip