Quantcast
Channel: Processing Forum
Viewing all articles
Browse latest Browse all 1768

Exporting to dxf or pdf

$
0
0
I am very new at this and can't seem to export my file to dxf or pdf. I know im supposed to import the pdf or dxf code at the beginning of the code but the rest of it has me stumped. I would really appreciate any help with this. 



  1. ArrayList history = new ArrayList();
  2. float distthresh = 60;

  3. void setup(){
  4.   size(900,600);
  5.   background(255);
  6.   stroke(0,50);
  7.   smooth();
  8. }


  9. void draw(){
  10.   
  11. }

  12. void mouseDragged(){

  13.   PVector d = new PVector(mouseX,mouseY,0);
  14.   history.add(0,d);
  15.   
  16.   for (int p=0; p<history.size(); p++){
  17.     PVector v = (PVector) history.get(p);
  18.     float joinchance = p/history.size() + d.dist(v)/distthresh;
  19.     if (joinchance < random(0.4))  line(d.x,d.y,v.x,v.y);
  20.   }
  21. }

  22. void keyPressed(){
  23.   if (key == ' ') {
  24.     background(255);
  25.     history.clear();
  26.   }
  27. }

Viewing all articles
Browse latest Browse all 1768

Trending Articles