GMU:Algorithmic Art/HP 7475A: Difference between revisions

From Medien Wiki
No edit summary
No edit summary
Line 48: Line 48:
'''How to use the library for HPGL export in a Processing sketch?'''<br>
'''How to use the library for HPGL export in a Processing sketch?'''<br>


  * import hpglgraphics.*;
  import hpglgraphics.*;
  * HPGLGraphics hpgl;
  HPGLGraphics hpgl;


  * void setup(){
  void setup(){
  size(1104, 772); // 1616 x 1104 for A3(!?)
  size(1104, 772); // 1616 x 1104 for A3(!?)
  Hpgl = (HPGLGraphics) createGraphics(width, height, HPGLGraphics.HPGL);
  Hpgl = (HPGLGraphics) createGraphics(width, height, HPGLGraphics.HPGL);
  hpgl.setPaperSize("A4"); //either A4 or A3
  hpgl.setPaperSize("A4"); //either A4 or A3
  hpgl.setPath("yourFileName.hpgl"); //file will appear in sketch folder
  hpgl.setPath("yourFileName.hpgl"); //file will appear in sketch folder
  noLoop();
  noLoop();
}
}
 
void draw(){
void draw(){
  beginRecord(hpgl);
  beginRecord(hpgl);
  // your code here (the graphics you wnat to export as hpgl file)
  // your code here (the graphics you wnat to export as hpgl file)
  endRecord();
  endRecord();
}
}




'''How to send a HPGL file to the plotter?'''<br>
'''How to send a HPGL file to the plotter?'''<br>
Use the “HP7475A_feed_hpgl_file_01” or “HP7475A_feed_hpgl_file_02” sketches, which are almost the same (only the buffer handling works differently). Both do not work perfect yet for each case, but almost. For very detailed graphics (for example the “noise.hpgl” file), version 02 works better. Instructions how to use the programs are in the comments
Use the “HP7475A_feed_hpgl_file_01” or “HP7475A_feed_hpgl_file_02” sketches, which are almost the same (only the buffer handling works differently). Both do not work perfect yet for each case, but almost. For very detailed graphics (for example the “noise.hpgl” file), version 02 works better. Instructions how to use the programs are in the comments