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

Patrick Kettner - JavaScript without javascript
Patrick Kettner - JavaScript without javascriptPatrick Kettner - JavaScript without javascript
Patrick Kettner - JavaScript without javascript
OdessaJS Conf
 
Cg my own programs
Cg my own programsCg my own programs
Cg my own programs
Amit Kapoor
 

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

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
apexelectronices01
 
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
anyacarpets
 

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

Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
Chris Hunter
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
heathfieldcps1
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
PECB
 
Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.
MateoGardella
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
ciinovamais
 

Recently uploaded (20)

Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writing
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.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 { ... }