Category Archives: processing

Question about printing on paper.

I'm trying to print out a picture on glossy photo paper. The problem is that when it goes to print the program is treating the image as if it's trying to print on normal printer paper. my printer uses two different inks for black, one for photo and one for normal printing. I was wondering if there is a way to set my program to expect to be printing on glossy photo paper rather than normal printer paper.

submitted by /u/dplusave
[link] [comments]

Processing with G4P

Processing with G4P

I'm new to processing and I am trying to make an application for a quiz. I need to use buttons and titles so I decided to use the G4P lib. I tried to build the app with only one button to see if it is working and always get a fatal exception. After some research, I'm not excatly sure to understand what this error means.

This is the error message :

https://i.redd.it/56uhxzwtarz21.png

And this is the code :

https://i.redd.it/5s93shhabrz21.png

https://i.redd.it/32opb61cbrz21.png

submitted by /u/xApologize
[link] [comments]

Drawing a certain number of circles, and other issues with draw()

I need to create a program that draws 100 circles at random locations with random radii. I'm struggling to work out how to get it to stop drawing after 100 under the draw() function. I'm fairly new to this sort of stuff. Here is my current code:

void setup() { size(500,500); background(0); frameRate(30); } void draw() { for (int i = 0; i < 30; i++) { int radius = int(random(1, 30)); int ellipseX = int(random(0 + radius, width - radius)); int ellipseY = int(random(0 + radius, height - radius)); fill(255,100); noStroke(); ellipseMode(RADIUS); ellipse(ellipseX, ellipseY, radius, radius); } } 

In this program, I also need to draw a vertical red line that sweeps across the sketch from left to right, and as it touches a circle, they start to move with the line. When the line reaches the end of the sketch, the program must draw a new set of 100 random circles, and the line sweeps back from right to left and drags the new circles.

I'd really appreciate any help or advice with either issue.

submitted by /u/hi-i-need-advice
[link] [comments]