jai
YaBB Newbies
Offline
Posts: 28
How to capture high res pictures?
Dec 13th , 2006, 3:47pm
How would I go about getting for example 300dpi pictures of work done? I need to have pictures to hand in as its a course requirement to have 3 images at 300dpi. I know I can change the applet size but how would I go about getting 300dpi? This is the source: int NUM = 15; boolean myToggle; Wurm[] w = new Wurm[NUM]; void setup() { frameRate(30); size(600, 400); background(random(0,255),25,180); smooth(); for(int i=0;i<NUM;i++) { w[i] = new Wurm(random(width), random(height)); } } void draw() { for(int i=0;i<NUM;i++) { w[i].draw(); } } class Wurm { int wurm_size = 3; // Width of the centipede float xpos, ypos; // Starting position of centipede float xspeed = random(0,2.4); // Speed of the centipede float yspeed = random(0,1.2); // Speed of the centipede float xdirection = random (-1,1); // Left or Right float ydirection = random (-1,1); // Top to Bottom float myAngle = 0; Wurm (float theXpos, float theYpos) { xpos = theXpos; ypos = theYpos; } void draw() { xpos = xpos + ( xspeed * xdirection ); ypos = ypos + ( yspeed * ydirection ); if (xpos > width-wurm_size || xpos < 0) { xdirection *= -1; } if (ypos > height-wurm_size || ypos < 0) { ydirection *= -1; } /* Draw the centipede */ myAngle += random(0,0.015f); pushMatrix(); translate(xpos,ypos); rotate(myAngle); stroke(random(0,1),random(0,2),random(0,3),10); line(0, 0,random(-45,-30), random(-45,-30)); line(0, 0,random(-45,-30), random(-45,-30)); line(0, 0, -random(-45,-30), random(-45,-30)); line(0, 0, -random(-45,-30), random(-45,-30)); popMatrix(); pushMatrix(); translate(xpos,ypos); rotate(myAngle); stroke(random(0,10),random(0,207),random(0,255),20);//stroke colours line(50, 0,random(-45,30), random(-45,30)); line(50, 0,random(-45,30), random(-45,30)); line(50, 0, -random(-45,30), random(-45,30)); stroke(255,20); line(50, 0, -random(-45,30), random(-45,30)); noStroke(); fill(255,0,129,10); rect(50,50,5,5); fill(255,118,0,7); ellipse(50,-30,7,3); popMatrix(); } }