SlideShare a Scribd company logo
1 of 14
Download to read offline
Monday, July 28, 14
HTML COMMENT <!-- -->
CSS COMMENT // or /* */
PROCESSING COMMENT // or /* */
Monday, July 28, 14
void setup() {
/* size(400, 400);
noStroke();
background(100,0,255); */
}
void draw() {
//Draw a circle
 ellipse(mouseX, mouseY, 80, 80);
}
Monday, July 28, 14
Monday, July 28, 14
void draw() {
if (keyPressed) {
if (key == 'b' || key == 'B') {
fill(0);
}
} else {
fill(255);
}
rect(25, 25, 50, 50);
}
Monday, July 28, 14
float circleX = 0;
void setup() {
size(400,400);
noStroke();
fill(193, 155, 62);
}
void draw(){
background(27, 177, 245);
ellipse(circleX, 50, 50, 50);
circleX = circleX + 1;
if(circleX > 400) {
circleX=0;
}
}
Monday, July 28, 14
float circleX = 0;
float speed = 2;
void setup() {
size(400,400);
noStroke();
fill(193, 155, 62);
}
void draw(){
background(27, 177, 245);
ellipse(circleX, 50, 50, 50);
circleX = circleX + speed;
if(circleX < 0) {
speed *= -1;
}
if(circleX > 400) {
speed *= -1;
}
}
Monday, July 28, 14
float circleX = 0;
float speed = 2;
void setup() {
size(400,400);
noStroke();
fill(193, 155, 62);
}
void draw(){
background(27, 177, 245);
ellipse(circleX, 50, 50, 50);
circleX = circleX + speed;
if (keyPressed) {
if (key == 'b' || key == 'B') {
speed *= -1;
}
}
}
Monday, July 28, 14
FLAPPY BIRD CAN BE MADE WITH 25 IF STATEMENTS
http://www.openprocessing.org/sketch/133401
PONG CAN BE MADE WITH LESS THAN 20
https://github.com/nakul13/PONG/commit/
04680fd6041a1134852f6a425212c27d2965eef0
Monday, July 28, 14
THE FOR LOOP
void setup() {
size(400,400);
stroke(0);
fill(193, 155, 62);
}
void draw(){
for (int i = 0; i < 200; i = i+1)
{
line(30, i, 350, i);
}
}
Monday, July 28, 14
THE FOR LOOP
for (int i = 0; i < 200; i = i+5)
{
line(30, i, 350, i);
}
Monday, July 28, 14
THE FOR LOOP
for (int i = 0; i < 200; i = i+5)
{
ellipse (20*i, 20*i, 10, 10);
}
Monday, July 28, 14
Monday, July 28, 14
PImage webImg;
void setup() {
size(528, 720);
String url = "http://bit.ly/1ApLO5u";
}
void draw() {
background(0);
image(webImg, 0, 0);
}
Monday, July 28, 14

More Related Content

Viewers also liked

Python for text processing
Python for text processingPython for text processing
Python for text processing
Xiang Li
 
Practical Natural Language Processing
Practical Natural Language ProcessingPractical Natural Language Processing
Practical Natural Language Processing
Jaganadh Gopinadhan
 

Viewers also liked (6)

Simplesmente Python: Por que você não deve deixar de aprender essa linguagem
Simplesmente Python: Por que você não deve deixar de aprender essa linguagemSimplesmente Python: Por que você não deve deixar de aprender essa linguagem
Simplesmente Python: Por que você não deve deixar de aprender essa linguagem
 
Python introduction
Python introductionPython introduction
Python introduction
 
Python for text processing
Python for text processingPython for text processing
Python for text processing
 
Text Classification in Python – using Pandas, scikit-learn, IPython Notebook ...
Text Classification in Python – using Pandas, scikit-learn, IPython Notebook ...Text Classification in Python – using Pandas, scikit-learn, IPython Notebook ...
Text Classification in Python – using Pandas, scikit-learn, IPython Notebook ...
 
Practical Natural Language Processing
Practical Natural Language ProcessingPractical Natural Language Processing
Practical Natural Language Processing
 
NLTK - Natural Language Processing in Python
NLTK - Natural Language Processing in PythonNLTK - Natural Language Processing in Python
NLTK - Natural Language Processing in Python
 

More from citylore (7)

Processing i
Processing iProcessing i
Processing i
 
Cssii
CssiiCssii
Cssii
 
Lesson 2- Css1
Lesson 2- Css1Lesson 2- Css1
Lesson 2- Css1
 
Lesson 1
Lesson 1 Lesson 1
Lesson 1
 
Live from the poemobile 2012
Live from the poemobile 2012Live from the poemobile 2012
Live from the poemobile 2012
 
City Lore Outcomes Institute Powerpoint
City Lore Outcomes Institute Powerpoint City Lore Outcomes Institute Powerpoint
City Lore Outcomes Institute Powerpoint
 
City Lore Interviewing guide
 City Lore Interviewing guide City Lore Interviewing guide
City Lore Interviewing guide
 

Recently uploaded

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
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
KarakKing
 
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
 
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
 
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
 

Recently uploaded (20)

Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 
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
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
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
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
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.
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
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
 
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...
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
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
 
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
 

Processing iii

  • 2. HTML COMMENT <!-- --> CSS COMMENT // or /* */ PROCESSING COMMENT // or /* */ Monday, July 28, 14
  • 3. void setup() { /* size(400, 400); noStroke(); background(100,0,255); */ } void draw() { //Draw a circle  ellipse(mouseX, mouseY, 80, 80); } Monday, July 28, 14
  • 5. void draw() { if (keyPressed) { if (key == 'b' || key == 'B') { fill(0); } } else { fill(255); } rect(25, 25, 50, 50); } Monday, July 28, 14
  • 6. float circleX = 0; void setup() { size(400,400); noStroke(); fill(193, 155, 62); } void draw(){ background(27, 177, 245); ellipse(circleX, 50, 50, 50); circleX = circleX + 1; if(circleX > 400) { circleX=0; } } Monday, July 28, 14
  • 7. float circleX = 0; float speed = 2; void setup() { size(400,400); noStroke(); fill(193, 155, 62); } void draw(){ background(27, 177, 245); ellipse(circleX, 50, 50, 50); circleX = circleX + speed; if(circleX < 0) { speed *= -1; } if(circleX > 400) { speed *= -1; } } Monday, July 28, 14
  • 8. float circleX = 0; float speed = 2; void setup() { size(400,400); noStroke(); fill(193, 155, 62); } void draw(){ background(27, 177, 245); ellipse(circleX, 50, 50, 50); circleX = circleX + speed; if (keyPressed) { if (key == 'b' || key == 'B') { speed *= -1; } } } Monday, July 28, 14
  • 9. FLAPPY BIRD CAN BE MADE WITH 25 IF STATEMENTS http://www.openprocessing.org/sketch/133401 PONG CAN BE MADE WITH LESS THAN 20 https://github.com/nakul13/PONG/commit/ 04680fd6041a1134852f6a425212c27d2965eef0 Monday, July 28, 14
  • 10. THE FOR LOOP void setup() { size(400,400); stroke(0); fill(193, 155, 62); } void draw(){ for (int i = 0; i < 200; i = i+1) { line(30, i, 350, i); } } Monday, July 28, 14
  • 11. THE FOR LOOP for (int i = 0; i < 200; i = i+5) { line(30, i, 350, i); } Monday, July 28, 14
  • 12. THE FOR LOOP for (int i = 0; i < 200; i = i+5) { ellipse (20*i, 20*i, 10, 10); } Monday, July 28, 14
  • 14. PImage webImg; void setup() { size(528, 720); String url = "http://bit.ly/1ApLO5u"; } void draw() { background(0); image(webImg, 0, 0); } Monday, July 28, 14