SlideShare una empresa de Scribd logo
1 de 9
Descargar para leer sin conexión
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 {
	 ...
	}

Más contenido relacionado

La actualidad más candente

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
 

La actualidad más candente (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 a 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 a 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
 

Último

Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdfVishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
ssuserdda66b
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
ciinovamais
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
QucHHunhnh
 

Último (20)

Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptx
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdfVishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 

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