Hello,
I think the way to go is via the beginShape command.
I have a
math 3D plotter,
some of the figures are done by an array to store the values.
The values are then shown by beginShape
The latter graphics ones are simple isosurfaces.
Best download and run locally.
http://www.openprocessing.org/visuals/?visualID=7098To do so, it is important to store the values in the right order. Otherwise the wholw thing gets fuzzy (see my sphere in the same program...).
Greetings,
Chrisir
Here is a code-fragment to show the already calculated values via beginShape:
Code:void ShowLookupAsGrid() {
// nice
colorMode(RGB,400);
noStroke();
if ((MaxindexI <= 0) && (MaxindexJ <= 0)) {
ShowSpecialMessage("LookUp-Table not defined.");
}
else {
for (int i = 0; i < MaxindexI; i = i+1) {
for (int j = 0; j < MaxindexJ; j = j+1) {
fill (2+abs(MyResults[i][j].x),2+abs(MyResults[i][j].y),2+abs(MyResults[i][j].z));
beginShape(QUAD);
vertex(MyResults[i][j].x,MyResults[i][j].y,MyResults[i][j].z);
vertex(MyResults[i+1][j].x,MyResults[i+1][j].y,MyResults[i+1][j].z);
vertex(MyResults[i+1][j+1].x,MyResults[i+1][j+1].y,MyResults[i+1][j+1].z);
vertex(MyResults[i][j+1].x,MyResults[i][j+1].y,MyResults[i][j+1].z);
endShape(CLOSE);
} // j
} //i
} // else
} // ShowGraph2