Phase Diagram

Phase Diagram

prusaprinters

<p>Creating a 3-d model of a ternary phase diagram</p> <h3>How I Designed This</h3> <p><strong>OpenJSCad code</strong></p> <div><p>var res = 64;<br/> var side=100; <p>var p1 = [0,0];</p> <p>var p2 = [side,0];</p> <p>var p3 = [side/2,Math.sqrt(side<em>side</em>3/4)];</p> <p>var c1 = [0,0,0];</p> <p>var c2 = [side,0,0];</p> <p>var c3 = [p3[0],p3[1],0];</p> <p>var stackOfTiles = new Array();</p> <p>function main() {</p> <p>for ( z=5; z&lt;100; z+=7) {</p> <p>stackOfTiles.push( CSG.cube({</p> <p>corner1: [0, 0, z],</p> <p>corner2: [100, 100, z+0.75]</p> <p>}));</p> <p>}</p> <p>var s1o = CSG.sphere({</p> <p>center: c1,</p> <p>radius: 70.5,</p> <p>resolution: res</p> <p>});</p> <p>var s2o = CSG.sphere({</p> <p>center: c2,</p> <p>radius: 60.5,</p> <p>resolution: res</p> <p>});</p> <p>var s3o = CSG.sphere({</p> <p>center: c3,</p> <p>radius: 50.5,</p> <p>resolution: res</p> <p>});</p> <p>var s1i = CSG.sphere({</p> <p>center: c1,</p> <p>radius: 70,</p> <p>resolution: res</p> <p>});</p> <p>var s2i = CSG.sphere({</p> <p>center: c2,</p> <p>radius: 60,</p> <p>resolution: res</p> <p>});</p> <p>var s3i = CSG.sphere({</p> <p>center: c3,</p> <p>radius: 50,</p> <p>resolution: res</p> <p>});</p> <p>var triangle = polygon([c1,c2,c3]);</p> <p>var prism = linear_extrude({height:100},triangle);</p> <p>var outsideSpheres = s1o.union(s2o).union(s3o);</p> <p>var insideSpheres = s1i.union(s2i).union(s3i);</p> <p>var slices = outsideSpheres.intersect(union(stackOfTiles));</p> <p>return union(slices,insideSpheres).intersect(prism);</p> <p>}</p> </p></div> Category: Learning

Download Model from prusaprinters

With this file you will be able to print Phase Diagram with your 3D printer. Click on the button and save the file on your computer to work, edit or customize your design. You can also find more 3D designs for printers on Phase Diagram.