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

DOCX
ماترێکس به‌ کوردی ئارام
TXT
Los dskn
DOC
Computer graphics
PPT
Mobile Game and Application with J2ME - Collision Detection
PPT
Mobile Game and Application with J2ME
PPTX
Unification and Refactoring of Clones
DOCX
Funcion cuadratica
DOC
SE Computer, Programming Laboratory(210251) University of Pune
ماترێکس به‌ کوردی ئارام
Los dskn
Computer graphics
Mobile Game and Application with J2ME - Collision Detection
Mobile Game and Application with J2ME
Unification and Refactoring of Clones
Funcion cuadratica
SE Computer, Programming Laboratory(210251) University of Pune

What's hot (19)

PDF
Gems of GameplayKit. UA Mobile 2017.
PPTX
Javascript Without Javascript
DOCX
Computer Graphics Lab File C Programs
PDF
Tabela completa de derivadas e integrais
PPTX
Patrick Kettner - JavaScript without javascript
PPTX
DOCX
C programs
DOCX
Computer graphics File for Engineers
DOC
Aptitude 30 questions paper
DOCX
Advance java
PPTX
C++ programming pattern
DOC
Ocr code
PDF
Regras diferenciacao
DOCX
Cg my own programs
PDF
graphics Assidnment
DOCX
Wap in c to draw a line using DDA algorithm
PDF
201707 SER332 Lecture 21
DOCX
Computer graphics lab assignment
PDF
Wzory statystyka
Gems of GameplayKit. UA Mobile 2017.
Javascript Without Javascript
Computer Graphics Lab File C Programs
Tabela completa de derivadas e integrais
Patrick Kettner - JavaScript without javascript
C programs
Computer graphics File for Engineers
Aptitude 30 questions paper
Advance java
C++ programming pattern
Ocr code
Regras diferenciacao
Cg my own programs
graphics Assidnment
Wap in c to draw a line using DDA algorithm
201707 SER332 Lecture 21
Computer graphics lab assignment
Wzory statystyka
Ad

Similar to Grid help, Processing (20)

PPTX
Aditazz 01-ul
PDF
Write Python for Speed
PDF
Dpsm simu.cpp
PDF
Questions has 4 parts.1st part Program to implement sorting algor.pdf
PDF
PPS Arrays Matrix operations
DOCX
PDF
C programs
PDF
C# Assignmet Help
DOC
Computer Aided Manufacturing Design
PDF
import java.awt.;import java.awt.event.MouseAdaptor;import java.pdf
DOCX
PPTX
Using Arbor/ RGraph JS libaries for Data Visualisation
DOCX
Java binary subtraction
PDF
C++ normal assignments by maharshi_jd.pdf
PDF
Microsoft Word Hw#1
DOC
Tai lieu ky thuat lap trinh
KEY
Grand centraldispatch
DOC
Computer graphics
PDF
Implementing string
PDF
Frsa
Aditazz 01-ul
Write Python for Speed
Dpsm simu.cpp
Questions has 4 parts.1st part Program to implement sorting algor.pdf
PPS Arrays Matrix operations
C programs
C# Assignmet Help
Computer Aided Manufacturing Design
import java.awt.;import java.awt.event.MouseAdaptor;import java.pdf
Using Arbor/ RGraph JS libaries for Data Visualisation
Java binary subtraction
C++ normal assignments by maharshi_jd.pdf
Microsoft Word Hw#1
Tai lieu ky thuat lap trinh
Grand centraldispatch
Computer graphics
Implementing string
Frsa
Ad

Recently uploaded (20)

PDF
David L Page_DCI Research Study Journey_how Methodology can inform one's prac...
PDF
Journal of Dental Science - UDMY (2021).pdf
PDF
medical_surgical_nursing_10th_edition_ignatavicius_TEST_BANK_pdf.pdf
PDF
LIFE & LIVING TRILOGY - PART (3) REALITY & MYSTERY.pdf
PPTX
Introduction to pro and eukaryotes and differences.pptx
PDF
Complications of Minimal Access-Surgery.pdf
PDF
1.3 FINAL REVISED K-10 PE and Health CG 2023 Grades 4-10 (1).pdf
PPTX
ELIAS-SEZIURE AND EPilepsy semmioan session.pptx
PPTX
Computer Architecture Input Output Memory.pptx
PDF
HVAC Specification 2024 according to central public works department
PDF
BP 505 T. PHARMACEUTICAL JURISPRUDENCE (UNIT 2).pdf
PDF
MBA _Common_ 2nd year Syllabus _2021-22_.pdf
PDF
semiconductor packaging in vlsi design fab
PDF
FORM 1 BIOLOGY MIND MAPS and their schemes
PPTX
Virtual and Augmented Reality in Current Scenario
PDF
AI-driven educational solutions for real-life interventions in the Philippine...
DOCX
Cambridge-Practice-Tests-for-IELTS-12.docx
PPTX
Education and Perspectives of Education.pptx
PDF
MICROENCAPSULATION_NDDS_BPHARMACY__SEM VII_PCI .pdf
PDF
Mucosal Drug Delivery system_NDDS_BPHARMACY__SEM VII_PCI.pdf
David L Page_DCI Research Study Journey_how Methodology can inform one's prac...
Journal of Dental Science - UDMY (2021).pdf
medical_surgical_nursing_10th_edition_ignatavicius_TEST_BANK_pdf.pdf
LIFE & LIVING TRILOGY - PART (3) REALITY & MYSTERY.pdf
Introduction to pro and eukaryotes and differences.pptx
Complications of Minimal Access-Surgery.pdf
1.3 FINAL REVISED K-10 PE and Health CG 2023 Grades 4-10 (1).pdf
ELIAS-SEZIURE AND EPilepsy semmioan session.pptx
Computer Architecture Input Output Memory.pptx
HVAC Specification 2024 according to central public works department
BP 505 T. PHARMACEUTICAL JURISPRUDENCE (UNIT 2).pdf
MBA _Common_ 2nd year Syllabus _2021-22_.pdf
semiconductor packaging in vlsi design fab
FORM 1 BIOLOGY MIND MAPS and their schemes
Virtual and Augmented Reality in Current Scenario
AI-driven educational solutions for real-life interventions in the Philippine...
Cambridge-Practice-Tests-for-IELTS-12.docx
Education and Perspectives of Education.pptx
MICROENCAPSULATION_NDDS_BPHARMACY__SEM VII_PCI .pdf
Mucosal Drug Delivery system_NDDS_BPHARMACY__SEM VII_PCI.pdf

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 { ... }