1 Processing.org is a framework for algorithmic visualization and computational sketching. It was created at the MIT Media Lab by Ben Fry and Casey Reas.
Download ComputationalGeometry version 3 in .zip format.
Unzip and put the extracted ComputationalGeometry folder into the libraries folder of your Processing sketches. Reference and examples are included in the ComputationalGeometry folder.
Keywords. 3D, geometry, surface, contour, iso, polygon, poly, generative, Proxy
Reference. Have a look at the javadoc reference here. A copy of the reference is included in the .zip as well.
Source. The source code of ComputationalGeometry is available at GitHub, and its repository can be browsed here.
import ComputationalGeometry.*; //Constructing the IsoSurface IsoSurface iso = new IsoSurface(this, new PVector(0,0,0), new PVector(100,100,100), 8); // Adding data to Isosurface for(int i=0; i<10; i++){ PVector pt = new PVector( random(100), random(100), random(100) ); iso.addPoint(pt); // Alternate: add a point with a weighting factor // iso.addPoint(pt, random(0,1)); } // Plotting iso.plot(mouseX/10000.0);
import ComputationalGeometry.*; //Construct the Isocontour IsoContour iso = new IsoContour(this, new PVector(0,0), new PVector(100,100), 10,10); // Adding Data to the Isocontour randomSeed(1); for(int i=0; i<10; i++){ PVector pt = new PVector( random(100), random(100), 0 ); iso.addPoint(pt); // Alternate: add a point with a weighting factor // iso.addPoint(pt, random(0,1)); } // Plot Isocontour fill(255,0,0); iso.plot( max(mouseX/800.0, 0.05) );
import ComputationalGeometry.*; //Constructing the IsoSkeleton IsoSkeleton skeleton = new IsoSkeleton(this); // Create points to make the network PVector[] pts = new PVector[50]; for (int i=0; i<pts.length; i++) { pts[i] = new PVector(random(-100, 100), random(-100, 100), random(-100, 100) ); } // Add edges to IsoSkeleton for (int i=0; i<pts.length; i++) { for (int j=i+1; j<pts.length; j++) { if (pts[i].dist( pts[j] ) < 60) { skeleton.addEdge(pts[i], pts[j]); } } } // Plotting skeleton.plot(5.0f, .25f); // Thickness as parameter
import ComputationalGeometry.*; // Constructing the IsoWrap IsoWrap wrap = new IsoWrap(this); // Create points to be wrapped PVector[] pts = new PVector[50]; for (int i=0; i<pts.length; i++) { pts[i] = new PVector(random(-100, 100), random(-100, 100), random(-100, 100) ); } wrap.addPts(pts); // Plotting wrap.plot();
Find a list of examples in the current distribution of ComputationalGeometry, or have a look at them by following the links below.
Platform osx
Processing 3.0