Hey-o. I have an animation of triangles that change size based on mouseX and mouseY inputs. I'd like to export the geometry created as a dxf file. I know you can do this for a pdf because you can pause and resume what's "recorded" to the pdf explained here:
http://processing.org/reference/libraries/pdf/index.html under "Pause while recording". Is this possible for a dxf? If not, how can I set up this animation to export the geometry at some point? Right now I have it set up to use a key press. Any help would be greatly appreciated! Keep on rockin in the free world.
import processing.dxf.*;
float xoff = 0.0;
float x,y, xspeed, yspeed, angA;
//boolean recording;
//PGraphicsPDF pdf;
boolean record;
void setup() {
size(1000,500,P3D);
background(255);
// pdf = (PGraphicsPDF) createGraphics(width, height, PDF, "triangles.pdf");
I've been working on this sketch in which a rectangle is animated across the screen while rotating at angles determined using random noise. I like the results however I'm looking to take it a step further. Currently, a single rectangle is animated to move across the screen and then return to the left after it completes a row to begin a new row- similar to a typewriter. This results in random rotation along it's path and each row is not related to the one above or below it. How can I pass the rectangle through a noise field rather than just applying noise to the rotation angles as it moves along the path? I'm looking for rotation angles to change across the field of sketch rather than only the linear path. Please take a look at the sketch to understand what I mean. Any feedback would be greatly appreciated. Thank you!!!!
I've been messing with this script for a few days and I'm trying to move from 2D to 3D. My first step was to at least get PeasyCam so I could revolve around the objects drawn in a 3D environment. The problem I'm running in to is if I add "background(255);" to the void draw ( ) expression then I lose the series of boxes drawn as it moves across the sketch (which I'd like to keep), but the red cross-hairs (which denote attractors) remain and I'm able to orbit/pan/zoom. If I remove "background(255);" from void draw ( ) then i get the series of boxes but my cross-hairs leave a trail when i obit/pan/zoom. This is due to the way i've constructed the script. So my question is : What is the best way to rewrite this so that I can keep both the series of boxes and cross-hairs without either of them leaving a trail as I orbit/pan/zoom. I'm guessing that somehow I need to figure out how to draw the boxes like the cross-hairs so the geometry continues to update - but without computing all the acceleration stuff. I hope that is clear. The script below allows the camera to orbit/pan/zoom but leaves cross hair trails.
PS - i know i'm using a couple libraries (PeasyCam and Old3D) but my question is about the structure of my code - not library specific. That's why I posted here.