Erstellung eines 3D-Modells eines ternären Phasendiagramms.
Wie ich das entworfen habe
OpenJSCad-Code
var res = 64;
var side=100;
var p1 = [0,0];
var p2 = [Seite, 0];
var p3 = [Seite/2, Math.sqrt(Seite)];Seite3/4);
var c1 = [0,0,0];
var c2 = [Seite, 0, 0];
var c3 = [p3[0],p3[1],0];
var stackOfTiles = new Array();
Funktion main() {
für (z=5; z<100; z+=7) {
StackOfTiles.push( CSG.cube({
Ecke 1: [0, 0, z],
Ecke2: [100, 100, z+0.75]
))
)
var s1o = CSG.sphere({
Zentrum: c1,
Radius: 70,5,
Auflösung: res
);
var s2o = CSG.sphere({
Zentrum: c2,
Radius: 60,5
Auflösung: res
);
var s3o = CSG.sphere({
Zentrum: c3,
Radius: 50,5,
Auflösung: res
);
var s1i = CSG.sphere({
Zentrum: c1,
Radius: 70.
Auflösung: res
);
var s2i = CSG.sphere({
Zentrum: c2,
Radius: 60,
Auflösung: res
);
var s3i = CSG.sphere({
Zentrum: c3,
Radius: 50.
Auflösung: res
);
var triangle = polygon([c1,c2,c3]);
var prism = linear_extrude({height:100},triangle);
var outsideSpheres = s1o.union(s2o).union(s3o);
var insideSpheres = s1i.union(s2i).union(s3i);
var slices = outsideSpheres.intersect(union(stackOfTiles));
Rückgabe von union(slices, insideSpheres).intersect(prism);
)
Model Kaynağı
