Build
Save
Load
Back
var canvas = document.getElementById("screen"); var belectricEngine = function(processingInstance) { with(processingInstance) { size(900, 600); frameRate(30); var backgroundColor = color(100, 100, 200); var edgeColor = color(0, 0, 0); var x = 415; //Nodes var node0 = [-100, 100, -350]; //Last -100 //Middle -100 var node1 = [-100, 100, 100]; //Middle -100 var node2 = [-100, 100, -350]; //Last -100 var node3 = [-100, 100, 100]; var node4 = [500, 100, -350]; //Last -100 //First 100 //Middle -100 var node5 = [500, 100, 100]; //First 100 //Middle -100 var node6 = [500, 100, -350]; //Last -100 //First 100 var node7 = [500, 100, 100]; //First 100d var nodes = [node0, node1, node2, node3, node4, node5, node6, node7]; //Edges var edge0 = [0, 1]; var edge1 = [1, 3]; var edge2 = [3, 2]; var edge3 = [2, 0]; var edge4 = [4, 5]; var edge5 = [5, 7]; var edge6 = [7, 6]; var edge7 = [6, 4]; var edge8 = [0, 4]; var edge9 = [1, 5]; var edge10 = [2, 6]; var edge11 = [3, 7]; var edges = [edge0, edge1, edge2, edge3, edge4, edge5, edge6, edge7, edge8, edge9, edge10, edge11]; //Rotate Z var rotateZ3D = function(theta) { var sinTheta = sin(theta); var cosTheta = cos(theta); for (var n=0; n
30) { a="|"; c=0; } c+=1; }; //mouseDragged = function() { // rotateY3D(mouseX - pmouseX); // rotateX3D(mouseY - pmouseY); //}; rotateZ3D(0); rotateY3D(0); rotateX3D(0); } }; var processingInstance = new Processing(canvas, belectricEngine);