how do i export color stls using toxilibs? i found this topic here:
http://processing.org/discourse/yabb2/YaBB.pl?num=1268405776 but i could not get the example to work. I'm running the latest version of toxilibs. After some tweaking, this is as far as i've got. the error is at line 34 where i try to retrieve the vertices of the faces.
many thanks
import toxi.math.conversion.*;
import toxi.geom.*;
import toxi.math.*;
import toxi.geom.mesh2d.*;
import toxi.util.datatypes.*;
import toxi.util.events.*;
import toxi.geom.mesh.subdiv.*;
import toxi.geom.mesh.*;
import toxi.math.waves.*;
import toxi.util.*;
import toxi.math.noise.*;
/* a custom mesh STL exporter */
// assume this has been populated somehow...
TriangleMesh mesh;
// create stl color model with mesh base color
// the true flag means facets can have their own RGB value
I'm currently working on a large project that requires me to zoom into a map, but i've run into the issue of when exporting circles 0.1 pt in radius they convert to hexagons in pdf. I'm reluctant to scale the whole script because it would mean rescaling a large quantity of csv files.
Is there a way to export the files as circles?
the image below is a rescaled ellipse of 0.1 pt radius.
import processing.pdf.*;
boolean record;
void setup(){
size(500,500, P3D);
smooth();
}
void draw(){
if (record) {
// Note that #### will be replaced with the frame number. Fancy!
I'm working on a project which requires me to draw in the control window, then save the images out using saveFrame. I'm unable to draw in the control window because i can't seem to get the control window to stop updating (setDrawBackground not working??)
i think my friend tried to post this earlier but didn't explain it well...
i'm trying to write a script which seperates a list into those which are at X pixels away and those are more than X pixels away then count both arraylists. I've been trying this for quite some time but cant get the points grouped up correctly, any help would be appreciated!
i'm using toxic libs geometry library for the vector math.
import toxi.geom.*;
PFont f;
Closestpoint AdrClosePoint;
ArrayList pointCollection;
ArrayList templist;
void setup() {
size (1400, 900); background(255);
f = createFont("Arial", 12, true); textFont(f);
f = createFont("Arial",16,true); // Loading font
pointCollection = new ArrayList();
templist = new ArrayList();
for (int i = 0; i<1000; i++){ Vec3D origin = new Vec3D(random(width), random(height), 0); Closestpoint mypoint = new Closestpoint(origin); pointCollection.add(mypoint); } }
void draw() { for (int i = 0; i< pointCollection.size(); i++){ Closestpoint cp = (Closestpoint) pointCollection.get(i); cp.display(); cp.distancenear();