Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Program Repeating Square
- //Programmer : Kenenth Parson
- size(500,500);
- for(int x=0, y=250; y>=0; x=x+5, y=y-5)
- {
- fill(x);
- rect(x,y,25,25);
- }
- for( int x=250, y=0; x<=500; x=x+5, y=y+5)
- {
- fill(255-y);
- rect(x,y,25,25);
- }
- for(int x=500, y=250; y<=500; x=x-5, y=y+5)
- {
- fill(255-x);
- rect(x,y,25,25);
- }
- for(int x=250, y=500; y>=250; x=x-5, y=y-5)
- {
- fill(255-y);
- rect(x,y,25,25);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement