SlideShare a Scribd company logo
1 of 9
Download to read offline
int gridX = 12;
int gridY = 16;
int gridSize = 32;
size( 12*32, 16*32);
size (384, 512);
size( gridX * gridSize,
gridY * gridSize );
raster_sketch1.pde
for (int i = 0; i < gridX; i++) {
for (int j = 0; j < gridY; j++) {
.....
}
}
i=0, i=1, i=2 ... ->
j=0,j=1,j=2...->
raster_sketch1.pde
for (int i = 0; i < gridX; i++) {
for (int j = 0; j < gridY; j++) {
...
ellipse(i*gridSize, j*gridSize,
gridSize*0.7, gridSize*0.7);
...
}
}
i=0, i=1, i=2 ... ->
j=0,j=1,j=2...->
raster_sketch1.pde
translate(gridSize/2, gridSize/2);
verschieb alles um ein halbes “Kästchen”
raster_sketch1.pde
int gridX = 10;
int gridY = 10;
int gridSize = 22;
int gridX = 50;
int gridY = 20;
int gridSize = 22;
int gridX = 5;
int gridY = 7;
int gridSize = 110;
raster_sketch2.pde
for (int i = 0; i < gridX; i++) {
for (int j = 0; j < gridY; j++) {
...
pushMatrix();
translate(i*gridSize, j*gridSize);
rotate(QUARTER_PI);
fill(farbe2);
rect(0, 0, gridSize*0.5, gridSize*0.5);
popMatrix();
...
}
}
raster_sketch3.pde
for (int i = 0; i < gridX; i++) {
for (int j = 0; j < gridY; j++) {
	 float objectSize;
objectSize = map(j, 0, gridY-1,
-gridSize, gridSize );
	 pushMatrix();
	 translate(i*gridSize, j*gridSize);
rotate(QUARTER_PI);
fill(farbe2);
rect(0, 0, objectSize*0.5, objectSize*0.5);
popMatrix();
}
}
gridY-1
gridSize
0 <-> 15
map(...)
-32 <-> 32
raster_sketch4.pde
for (int i = 0; i < gridX; i++) {
for (int j = 0; j < gridY; j++) {
float randomNumber = random(0, 100);
if (randomNumber > 80) {
fill(farbe1);
}
else {
fill(farbe2);
}
...
rect(...);
}
}
raster_sketch5.pde
for (int i = 0; i < gridX; i++) {
for (int j = 0; j < gridY; j++) {
if ( (i > 1) && (i < gridX-2) && (j > 1) && (j < gridY-2) ) {
	...
	 } else {
	 ...
	}

More Related Content

What's hot

Gems of GameplayKit. UA Mobile 2017.
Gems of GameplayKit. UA Mobile 2017.Gems of GameplayKit. UA Mobile 2017.
Gems of GameplayKit. UA Mobile 2017.UA Mobile
 
Javascript Without Javascript
Javascript Without JavascriptJavascript Without Javascript
Javascript Without JavascriptPatrick Kettner
 
Computer Graphics Lab File C Programs
Computer Graphics Lab File C ProgramsComputer Graphics Lab File C Programs
Computer Graphics Lab File C ProgramsKandarp Tiwari
 
Tabela completa de derivadas e integrais
Tabela completa de derivadas e integraisTabela completa de derivadas e integrais
Tabela completa de derivadas e integraisDiego Rodrigues Vaz
 
Patrick Kettner - JavaScript without javascript
Patrick Kettner - JavaScript without javascriptPatrick Kettner - JavaScript without javascript
Patrick Kettner - JavaScript without javascriptOdessaJS Conf
 
Computer graphics File for Engineers
Computer graphics File for EngineersComputer graphics File for Engineers
Computer graphics File for Engineersvarun arora
 
Aptitude 30 questions paper
Aptitude         30 questions paperAptitude         30 questions paper
Aptitude 30 questions paperpuneet8589
 
Cg my own programs
Cg my own programsCg my own programs
Cg my own programsAmit Kapoor
 
Wap in c to draw a line using DDA algorithm
Wap in c to draw a line using DDA algorithmWap in c to draw a line using DDA algorithm
Wap in c to draw a line using DDA algorithmKapil Pandit
 
Computer graphics lab assignment
Computer graphics lab assignmentComputer graphics lab assignment
Computer graphics lab assignmentAbdullah Al Shiam
 
Wzory statystyka
Wzory statystykaWzory statystyka
Wzory statystykauekatonotes
 

What's hot (19)

Gems of GameplayKit. UA Mobile 2017.
Gems of GameplayKit. UA Mobile 2017.Gems of GameplayKit. UA Mobile 2017.
Gems of GameplayKit. UA Mobile 2017.
 
Javascript Without Javascript
Javascript Without JavascriptJavascript Without Javascript
Javascript Without Javascript
 
Computer Graphics Lab File C Programs
Computer Graphics Lab File C ProgramsComputer Graphics Lab File C Programs
Computer Graphics Lab File C Programs
 
Tabela completa de derivadas e integrais
Tabela completa de derivadas e integraisTabela completa de derivadas e integrais
Tabela completa de derivadas e integrais
 
Patrick Kettner - JavaScript without javascript
Patrick Kettner - JavaScript without javascriptPatrick Kettner - JavaScript without javascript
Patrick Kettner - JavaScript without javascript
 
OOXX
OOXXOOXX
OOXX
 
C programs
C programsC programs
C programs
 
Computer graphics File for Engineers
Computer graphics File for EngineersComputer graphics File for Engineers
Computer graphics File for Engineers
 
Aptitude 30 questions paper
Aptitude         30 questions paperAptitude         30 questions paper
Aptitude 30 questions paper
 
Advance java
Advance javaAdvance java
Advance java
 
C++ programming pattern
C++ programming patternC++ programming pattern
C++ programming pattern
 
Ocr code
Ocr codeOcr code
Ocr code
 
Regras diferenciacao
Regras diferenciacaoRegras diferenciacao
Regras diferenciacao
 
Cg my own programs
Cg my own programsCg my own programs
Cg my own programs
 
graphics Assidnment
graphics Assidnmentgraphics Assidnment
graphics Assidnment
 
Wap in c to draw a line using DDA algorithm
Wap in c to draw a line using DDA algorithmWap in c to draw a line using DDA algorithm
Wap in c to draw a line using DDA algorithm
 
201707 SER332 Lecture 21
201707 SER332 Lecture 21   201707 SER332 Lecture 21
201707 SER332 Lecture 21
 
Computer graphics lab assignment
Computer graphics lab assignmentComputer graphics lab assignment
Computer graphics lab assignment
 
Wzory statystyka
Wzory statystykaWzory statystyka
Wzory statystyka
 

Similar to Grid help, Processing

Write Python for Speed
Write Python for SpeedWrite Python for Speed
Write Python for SpeedYung-Yu Chen
 
Questions has 4 parts.1st part Program to implement sorting algor.pdf
Questions has 4 parts.1st part Program to implement sorting algor.pdfQuestions has 4 parts.1st part Program to implement sorting algor.pdf
Questions has 4 parts.1st part Program to implement sorting algor.pdfapexelectronices01
 
PPS Arrays Matrix operations
PPS Arrays Matrix operationsPPS Arrays Matrix operations
PPS Arrays Matrix operationsSreedhar Chowdam
 
Computer Aided Manufacturing Design
Computer Aided Manufacturing DesignComputer Aided Manufacturing Design
Computer Aided Manufacturing DesignV Tripathi
 
import java.awt.;import java.awt.event.MouseAdaptor;import java.pdf
import java.awt.;import java.awt.event.MouseAdaptor;import java.pdfimport java.awt.;import java.awt.event.MouseAdaptor;import java.pdf
import java.awt.;import java.awt.event.MouseAdaptor;import java.pdfanyacarpets
 
Using Arbor/ RGraph JS libaries for Data Visualisation
Using Arbor/ RGraph JS libaries for Data VisualisationUsing Arbor/ RGraph JS libaries for Data Visualisation
Using Arbor/ RGraph JS libaries for Data VisualisationAlex Hardman
 
Java binary subtraction
Java binary subtractionJava binary subtraction
Java binary subtractionCharm Sasi
 
Microsoft Word Hw#1
Microsoft Word   Hw#1Microsoft Word   Hw#1
Microsoft Word Hw#1kkkseld
 
Tai lieu ky thuat lap trinh
Tai lieu ky thuat lap trinhTai lieu ky thuat lap trinh
Tai lieu ky thuat lap trinhHồ Trường
 
Grand centraldispatch
Grand centraldispatchGrand centraldispatch
Grand centraldispatchYuumi Yoshida
 
Frsa
FrsaFrsa
Frsa_111
 
2017 RM-URISA Track: Spatial SQL - The Best Kept Secret in the Geospatial World
2017 RM-URISA Track:  Spatial SQL - The Best Kept Secret in the Geospatial World2017 RM-URISA Track:  Spatial SQL - The Best Kept Secret in the Geospatial World
2017 RM-URISA Track: Spatial SQL - The Best Kept Secret in the Geospatial WorldGIS in the Rockies
 

Similar to Grid help, Processing (20)

Aditazz 01-ul
Aditazz 01-ulAditazz 01-ul
Aditazz 01-ul
 
Write Python for Speed
Write Python for SpeedWrite Python for Speed
Write Python for Speed
 
Dpsm simu.cpp
Dpsm simu.cppDpsm simu.cpp
Dpsm simu.cpp
 
Questions has 4 parts.1st part Program to implement sorting algor.pdf
Questions has 4 parts.1st part Program to implement sorting algor.pdfQuestions has 4 parts.1st part Program to implement sorting algor.pdf
Questions has 4 parts.1st part Program to implement sorting algor.pdf
 
PPS Arrays Matrix operations
PPS Arrays Matrix operationsPPS Arrays Matrix operations
PPS Arrays Matrix operations
 
No3
No3No3
No3
 
C programs
C programsC programs
C programs
 
C# Assignmet Help
C# Assignmet HelpC# Assignmet Help
C# Assignmet Help
 
Computer Aided Manufacturing Design
Computer Aided Manufacturing DesignComputer Aided Manufacturing Design
Computer Aided Manufacturing Design
 
import java.awt.;import java.awt.event.MouseAdaptor;import java.pdf
import java.awt.;import java.awt.event.MouseAdaptor;import java.pdfimport java.awt.;import java.awt.event.MouseAdaptor;import java.pdf
import java.awt.;import java.awt.event.MouseAdaptor;import java.pdf
 
C programs
C programsC programs
C programs
 
Using Arbor/ RGraph JS libaries for Data Visualisation
Using Arbor/ RGraph JS libaries for Data VisualisationUsing Arbor/ RGraph JS libaries for Data Visualisation
Using Arbor/ RGraph JS libaries for Data Visualisation
 
Java binary subtraction
Java binary subtractionJava binary subtraction
Java binary subtraction
 
Microsoft Word Hw#1
Microsoft Word   Hw#1Microsoft Word   Hw#1
Microsoft Word Hw#1
 
Tai lieu ky thuat lap trinh
Tai lieu ky thuat lap trinhTai lieu ky thuat lap trinh
Tai lieu ky thuat lap trinh
 
Grand centraldispatch
Grand centraldispatchGrand centraldispatch
Grand centraldispatch
 
Computer graphics
Computer graphics   Computer graphics
Computer graphics
 
Implementing string
Implementing stringImplementing string
Implementing string
 
Frsa
FrsaFrsa
Frsa
 
2017 RM-URISA Track: Spatial SQL - The Best Kept Secret in the Geospatial World
2017 RM-URISA Track:  Spatial SQL - The Best Kept Secret in the Geospatial World2017 RM-URISA Track:  Spatial SQL - The Best Kept Secret in the Geospatial World
2017 RM-URISA Track: Spatial SQL - The Best Kept Secret in the Geospatial World
 

Recently uploaded

4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptxmary850239
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfJemuel Francisco
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxAshokKarra1
 
ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfVanessa Camilleri
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designMIPLM
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
Active Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfActive Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfPatidar M
 
Activity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationActivity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationRosabel UA
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYKayeClaireEstoconing
 
ROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxVanesaIglesias10
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptxmary850239
 
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxQ4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxlancelewisportillo
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxHumphrey A Beña
 
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptxMusic 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptxleah joy valeriano
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management SystemChristalin Nelson
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...JojoEDelaCruz
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17Celine George
 

Recently uploaded (20)

4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptx
 
ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdf
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-design
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
Active Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfActive Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdf
 
Activity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationActivity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translation
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
 
ROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptx
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx
 
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxQ4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
 
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptxMusic 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management System
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17
 

Grid help, Processing

  • 1. int gridX = 12; int gridY = 16; int gridSize = 32; size( 12*32, 16*32); size (384, 512); size( gridX * gridSize, gridY * gridSize ); raster_sketch1.pde
  • 2. for (int i = 0; i < gridX; i++) { for (int j = 0; j < gridY; j++) { ..... } } i=0, i=1, i=2 ... -> j=0,j=1,j=2...-> raster_sketch1.pde
  • 3. for (int i = 0; i < gridX; i++) { for (int j = 0; j < gridY; j++) { ... ellipse(i*gridSize, j*gridSize, gridSize*0.7, gridSize*0.7); ... } } i=0, i=1, i=2 ... -> j=0,j=1,j=2...-> raster_sketch1.pde
  • 4. translate(gridSize/2, gridSize/2); verschieb alles um ein halbes “Kästchen” raster_sketch1.pde
  • 5. int gridX = 10; int gridY = 10; int gridSize = 22; int gridX = 50; int gridY = 20; int gridSize = 22; int gridX = 5; int gridY = 7; int gridSize = 110;
  • 6. raster_sketch2.pde for (int i = 0; i < gridX; i++) { for (int j = 0; j < gridY; j++) { ... pushMatrix(); translate(i*gridSize, j*gridSize); rotate(QUARTER_PI); fill(farbe2); rect(0, 0, gridSize*0.5, gridSize*0.5); popMatrix(); ... } }
  • 7. raster_sketch3.pde for (int i = 0; i < gridX; i++) { for (int j = 0; j < gridY; j++) { float objectSize; objectSize = map(j, 0, gridY-1, -gridSize, gridSize ); pushMatrix(); translate(i*gridSize, j*gridSize); rotate(QUARTER_PI); fill(farbe2); rect(0, 0, objectSize*0.5, objectSize*0.5); popMatrix(); } } gridY-1 gridSize 0 <-> 15 map(...) -32 <-> 32
  • 8. raster_sketch4.pde for (int i = 0; i < gridX; i++) { for (int j = 0; j < gridY; j++) { float randomNumber = random(0, 100); if (randomNumber > 80) { fill(farbe1); } else { fill(farbe2); } ... rect(...); } }
  • 9. raster_sketch5.pde for (int i = 0; i < gridX; i++) { for (int j = 0; j < gridY; j++) { if ( (i > 1) && (i < gridX-2) && (j > 1) && (j < gridY-2) ) { ... } else { ... }