Loading...
Processing Forum
Recent Topics
All Forums
Screen name:
lola91
lola91's Profile
1
Posts
0
Responses
0
Followers
Activity Trend
Last 30 days
Last 30 days
Date Interval
From Date :
To Date :
Go
Loading Chart...
Posts
Responses
PM
Show:
All
Discussions
Questions
Expanded view
List view
Private Message
Help!!!
[2 Replies]
31-Jan-2013 01:58 PM
Forum:
Programming Questions
Sorry :) I'm new in the forum :) I wanted to ask someone more experienced than me if he could explain a few things in this code that I have not very clear.
import processing.pdf.*;
PImage lol;
lol = loadImage("pokerface.jpg");
println(lol.width);
println(lol.height);
int pop = 80;
size(lol.width*pop,lol.height*pop,PDF,"Pokerface.pdf");
background(255);
for( int x = 0; x < lol.width; x++) {
for(int y = 0; y < lol.height; y++) {
float r = random(255);
color c = lol.get(x,y);
float dim = 255 - brightness(c);
noStroke ();
colorMode(HSB, 255);
fill(r);
rect(x*pop,y*pop,dim*2, dim*2);
}
}
my questions are:
-the first 2 "println"are used to what?
-"for( int x = 0; x < lol.width; x++) {
for(int y = 0; y < lol.height; y++) {
float r = random(255);" what is meaning?
Thanks everyone :)
«Prev
Next »
Moderate user : lola91
Forum