SlideShare uma empresa Scribd logo
1 de 34
CREATIVITY AND
COMPUTATION LAB
THE PLAN


Week 1 - Introductions

Week 2 - Nothing.

Week 3 - 6 - Fundamentals, OOP

Week 7 - 10 - Midterm project/support, oF

Week 11 - 15 - Final project/support
ADVANCED STUDENTS



Come up with ideas for super cool projects and work
on them.

Advanced section? Maybe, maybe not.
WHAT IS PROCESSING?



Processing is a simple programming environment that
was created to make it easier to develop visually
oriented applications with an emphasis on animation
and providing users with instant feedback through
interaction.
WHAT CAN IT DO?



Originally built as a domain-specific extension to Java
targeted towards artists and designers, Processing has
evolved into a full-blown design and prototyping tool
used for large-scale installation work, motion
graphics, and complex data visualization.
WHAT ARE IT’S ROOTS?


Processing is based on Java, but because program
elements in Processing are fairly simple, you can learn
to use it even if you don't know any Java.

Java in turn, derives much of its syntax from C and C
++ but has a simpler object model and fewer low-
level facilities.
...THAT'S...COOL. WHY DO I
            CARE?


Processing -> Java -> C/C++

The fundamentals of Processing carry over nicely to
other languages. They'll help you lay a foundation for
picking up languages with more complex syntax.
THE PROCESSING IDE
PROGRAMMING INTERACTIVITY | EXPLORING THE
          PROCESSING IDE | 55
SYNTAX



A set of rules that defines the combination of
symbols and expressions

Defines the surface form of a language
CURLY BRACES


Always work in
balanced pairs (an
open and closed pair)

Used to structure
code blocks
NAMING CONVENTION

Legal names can only
contain letters,
underscores, numbers, and
the dollar sign

The initial character must
be a letter, underscore, or
dollar sign - not a number

The names you define are
called identifiers
VOCABULARY
VARIABLES

A container for storing
data

Allows a data element to
be reused

Every variable had a name,
value and data type

A variable must be
declared before it is used
DATA TYPES

                              int - integer data
Processing can store and
manipulate different kinds    float - floating-point
of data including numbers,    numbers that have a
letters, words, colors, etc   decimal point

The computer stores each      String - Words and
in a different way so it      sentences
needs to know which kind
of data it is in order to     boolean - True or false
manage it
                              And MORE!
OPERATORS

Symbols used to write
mathematical
expressions

+ (Addition)

- (Subtraction)

* (Multiplication)

/ (Division)
RELATIONAL OPERATORS

> (greater than)

>= (greater than and
equal to)

< (less than)

<= (less than and
equal to)

== (equal to)

!= (not equal to)
COMMENTS


Ignored by the
computer

Helps us write notes

Helps remember what
that part of the
program does
EXPRESSIONS, STATEMENTS
An expression

  like a phrase

  Often a combination of
  operators

A statement

  A set of expressions

  Like a sentence

  Ends with the statement
  terminator
FUNCTIONS



Allow us to execute
certain actions like draw
shapes, set colors

Usually lowercase followed
by parentheses
PROGRAMMING MODES



Processing has 3 programming modes - Basic,
Continuous, and Java. For our purposes, pretend the
Java mode does not exist.
BASIC MODE



This mode is used drawing
static images and learning
fundamentals of
programming. Simple lines
of code have a direct
representation on the
screen.
CONTINUOUS MODE

This mode provides a
setup() structure that is
run once when the
program begins and a
draw() structure which by
default continually loops
through the code inside.

This additional structure
allows writing custom
functions and classes and
using keyboard and mouse
events.
CONTROL STRUCTURES
ITERATION: WHILE



Controls a sequence of
repetitions. The while
structure executes a series
of statements continuously
while the expression is
true.
ITERATION: FOR


Controls a sequence of
repetitions. A for structure
has three parts: init, test,
and update. Each part must
be separated by a semi-
colon ";". The loop
continues until the test
evaluates to false.
CONDITIONAL: IF


Allows the program to
make a decision about
which code to execute. If
the test evaluates to true,
the statements enclosed
within the block are
executed and if the test
evaluates to false the
statements are not
executed.
CONDITIONAL/SELECTIVE:
       SWITCH

Works like an if else
structure, but switch() is
more convenient when you
need to select between
three or more
alternatives. Program
controls jumps to the case
with the same value as the
expression. All remaining
statements in the switch
are executed unless
redirected by a break.
DRAWING, SHAPES AND
      COLOR
COORDINATES

Processing uses a Cartesian
coordinate system with the
origin in the upper-left corner.
If your program is 320 pixels
wide and 240 pixels high,
coordinate [0, 0] is the upper-
left pixel and coordinate [320,
240] is in the lower-right. The
last visible pixel in the lower-
right corner of the screen is at
position [319, 239] because
pixels are drawn to the right
and below the coordinate.
SHAPES

Ellipse: ellipse() | ellipse(x, y, width, height);

Line: line() | line(x1, y1, x2, y2);

Point: point() | point(x,y);

Rectangle: rect() | rect(x, y, width, height);

Triangle: triangle() | triangle(x1, y1, x2, y2, x3, y3);

Quadrilateral: quad() | quad(x1, y1, x2, y2, x3, y3, x4, y4);

And more!
COLOR

Setting             Creating & Reading

   background()        alpha()

   colorMode()         blendColor()

   fill()               brightness()

   noFill()            color()

   noStroke()          hue()

   stroke()            And More!
LET’S MAKE SOMETHING!
ASSIGNMENT
Create a self portrait! - It could be a drawing of you, your
pet, your zodiac sign, an abstract pattern, etc. etc.

The sketch should incorporate some of what we’ve covered
in class and contain at least one function and one control
structure.

Advanced - Make things move, use - events, libraries, OOP.

  Come up with ideas for projects you would like to work
  on.

  Bonus - Use Eclipse to create your sketch.

Mais conteúdo relacionado

Mais procurados

Mais procurados (20)

Flowchart and algorithm
Flowchart and algorithmFlowchart and algorithm
Flowchart and algorithm
 
Problem solving and design
Problem solving and designProblem solving and design
Problem solving and design
 
Writing algorithms
Writing algorithmsWriting algorithms
Writing algorithms
 
Chapter 6 algorithms and flow charts
Chapter 6  algorithms and flow chartsChapter 6  algorithms and flow charts
Chapter 6 algorithms and flow charts
 
Algorithms, flow charts and pseudocodes
Algorithms, flow charts and pseudocodesAlgorithms, flow charts and pseudocodes
Algorithms, flow charts and pseudocodes
 
Pseudocode
PseudocodePseudocode
Pseudocode
 
Chapter 2 Representation Of Algorithms 2
Chapter 2  Representation Of  Algorithms 2Chapter 2  Representation Of  Algorithms 2
Chapter 2 Representation Of Algorithms 2
 
Pseudocode
PseudocodePseudocode
Pseudocode
 
algorithm and Pseudocode
algorithm and Pseudocodealgorithm and Pseudocode
algorithm and Pseudocode
 
31 uml
31 uml31 uml
31 uml
 
Algorithmsandflowcharts1
Algorithmsandflowcharts1Algorithmsandflowcharts1
Algorithmsandflowcharts1
 
Unit 3 Foc
Unit  3 FocUnit  3 Foc
Unit 3 Foc
 
Penyelesaian masalah
Penyelesaian masalahPenyelesaian masalah
Penyelesaian masalah
 
Algorithms and flowcharts by Haseeb Khan
Algorithms and flowcharts by Haseeb KhanAlgorithms and flowcharts by Haseeb Khan
Algorithms and flowcharts by Haseeb Khan
 
Simple uml
Simple umlSimple uml
Simple uml
 
Flowchart
FlowchartFlowchart
Flowchart
 
Algo and flowchart
Algo and flowchartAlgo and flowchart
Algo and flowchart
 
Algorithms and flowcharts
Algorithms and flowchartsAlgorithms and flowcharts
Algorithms and flowcharts
 
algo
algoalgo
algo
 
Programming construction tools
Programming construction toolsProgramming construction tools
Programming construction tools
 

Destaque

Social Media Tools and Tactics for Success
Social Media Tools and Tactics for SuccessSocial Media Tools and Tactics for Success
Social Media Tools and Tactics for SuccessLaura Hill
 
Processing presentation
Processing presentationProcessing presentation
Processing presentationrngtng
 
Hype vs. Reality: The AI Explainer
Hype vs. Reality: The AI ExplainerHype vs. Reality: The AI Explainer
Hype vs. Reality: The AI ExplainerLuminary Labs
 
Study: The Future of VR, AR and Self-Driving Cars
Study: The Future of VR, AR and Self-Driving CarsStudy: The Future of VR, AR and Self-Driving Cars
Study: The Future of VR, AR and Self-Driving CarsLinkedIn
 

Destaque (6)

RoM vs FB
RoM vs FBRoM vs FB
RoM vs FB
 
Social Media Tools and Tactics for Success
Social Media Tools and Tactics for SuccessSocial Media Tools and Tactics for Success
Social Media Tools and Tactics for Success
 
Student Lecture 3
Student Lecture 3Student Lecture 3
Student Lecture 3
 
Processing presentation
Processing presentationProcessing presentation
Processing presentation
 
Hype vs. Reality: The AI Explainer
Hype vs. Reality: The AI ExplainerHype vs. Reality: The AI Explainer
Hype vs. Reality: The AI Explainer
 
Study: The Future of VR, AR and Self-Driving Cars
Study: The Future of VR, AR and Self-Driving CarsStudy: The Future of VR, AR and Self-Driving Cars
Study: The Future of VR, AR and Self-Driving Cars
 

Semelhante a Session1

01 Database Management (re-uploaded)
01 Database Management (re-uploaded)01 Database Management (re-uploaded)
01 Database Management (re-uploaded)bluejayjunior
 
Ppt on visual basics
Ppt on visual basicsPpt on visual basics
Ppt on visual basicsyounganand
 
Learn Programming with Livecoding.tv http://goo.gl/tIgO1I
Learn Programming with Livecoding.tv http://goo.gl/tIgO1ILearn Programming with Livecoding.tv http://goo.gl/tIgO1I
Learn Programming with Livecoding.tv http://goo.gl/tIgO1Ilivecoding.tv
 
Presentation on visual basic 6 (vb6)
Presentation on visual basic 6 (vb6)Presentation on visual basic 6 (vb6)
Presentation on visual basic 6 (vb6)pbarasia
 
Basic Computer Programming
Basic Computer ProgrammingBasic Computer Programming
Basic Computer ProgrammingAllen de Castro
 
Learning R while exploring statistics
Learning R while exploring statisticsLearning R while exploring statistics
Learning R while exploring statisticsDorothy Bishop
 
Programming process and flowchart
Programming process and flowchartProgramming process and flowchart
Programming process and flowcharthermiraguilar
 
Computer Programming Computer Programming
Computer Programming Computer ProgrammingComputer Programming Computer Programming
Computer Programming Computer Programmingarifhasan88
 
R-Language-Lab-Manual-lab-1.pdf
R-Language-Lab-Manual-lab-1.pdfR-Language-Lab-Manual-lab-1.pdf
R-Language-Lab-Manual-lab-1.pdfKabilaArun
 
R-Language-Lab-Manual-lab-1.pdf
R-Language-Lab-Manual-lab-1.pdfR-Language-Lab-Manual-lab-1.pdf
R-Language-Lab-Manual-lab-1.pdfattalurilalitha
 
Data Structures- Part1 overview and review
Data Structures- Part1 overview and reviewData Structures- Part1 overview and review
Data Structures- Part1 overview and reviewAbdullah Al-hazmy
 
Introduction To Programming
Introduction To ProgrammingIntroduction To Programming
Introduction To Programmingcwarren
 
Lecture1-Algorithms-and-Flowcharts-ppt.ppt
Lecture1-Algorithms-and-Flowcharts-ppt.pptLecture1-Algorithms-and-Flowcharts-ppt.ppt
Lecture1-Algorithms-and-Flowcharts-ppt.pptReshuReshma8
 
Visual basic 6.0
Visual basic 6.0Visual basic 6.0
Visual basic 6.0Aarti P
 
AlgorithmAndFlowChart.pdf
AlgorithmAndFlowChart.pdfAlgorithmAndFlowChart.pdf
AlgorithmAndFlowChart.pdfSusieMaestre1
 
Basic Slides on Algorithms and Flowcharts
Basic Slides on Algorithms and FlowchartsBasic Slides on Algorithms and Flowcharts
Basic Slides on Algorithms and Flowchartsmoazwinner
 

Semelhante a Session1 (20)

01 Database Management (re-uploaded)
01 Database Management (re-uploaded)01 Database Management (re-uploaded)
01 Database Management (re-uploaded)
 
Ppt on visual basics
Ppt on visual basicsPpt on visual basics
Ppt on visual basics
 
programming.ppt
programming.pptprogramming.ppt
programming.ppt
 
maple project.pptx
maple project.pptxmaple project.pptx
maple project.pptx
 
Learn Programming with Livecoding.tv http://goo.gl/tIgO1I
Learn Programming with Livecoding.tv http://goo.gl/tIgO1ILearn Programming with Livecoding.tv http://goo.gl/tIgO1I
Learn Programming with Livecoding.tv http://goo.gl/tIgO1I
 
Programming
ProgrammingProgramming
Programming
 
Presentation on visual basic 6 (vb6)
Presentation on visual basic 6 (vb6)Presentation on visual basic 6 (vb6)
Presentation on visual basic 6 (vb6)
 
Basic Computer Programming
Basic Computer ProgrammingBasic Computer Programming
Basic Computer Programming
 
Learning R while exploring statistics
Learning R while exploring statisticsLearning R while exploring statistics
Learning R while exploring statistics
 
Programming process and flowchart
Programming process and flowchartProgramming process and flowchart
Programming process and flowchart
 
Computer Programming Computer Programming
Computer Programming Computer ProgrammingComputer Programming Computer Programming
Computer Programming Computer Programming
 
R-Language-Lab-Manual-lab-1.pdf
R-Language-Lab-Manual-lab-1.pdfR-Language-Lab-Manual-lab-1.pdf
R-Language-Lab-Manual-lab-1.pdf
 
R-Language-Lab-Manual-lab-1.pdf
R-Language-Lab-Manual-lab-1.pdfR-Language-Lab-Manual-lab-1.pdf
R-Language-Lab-Manual-lab-1.pdf
 
R-Language-Lab-Manual-lab-1.pdf
R-Language-Lab-Manual-lab-1.pdfR-Language-Lab-Manual-lab-1.pdf
R-Language-Lab-Manual-lab-1.pdf
 
Data Structures- Part1 overview and review
Data Structures- Part1 overview and reviewData Structures- Part1 overview and review
Data Structures- Part1 overview and review
 
Introduction To Programming
Introduction To ProgrammingIntroduction To Programming
Introduction To Programming
 
Lecture1-Algorithms-and-Flowcharts-ppt.ppt
Lecture1-Algorithms-and-Flowcharts-ppt.pptLecture1-Algorithms-and-Flowcharts-ppt.ppt
Lecture1-Algorithms-and-Flowcharts-ppt.ppt
 
Visual basic 6.0
Visual basic 6.0Visual basic 6.0
Visual basic 6.0
 
AlgorithmAndFlowChart.pdf
AlgorithmAndFlowChart.pdfAlgorithmAndFlowChart.pdf
AlgorithmAndFlowChart.pdf
 
Basic Slides on Algorithms and Flowcharts
Basic Slides on Algorithms and FlowchartsBasic Slides on Algorithms and Flowcharts
Basic Slides on Algorithms and Flowcharts
 

Último

mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
The byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxThe byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxShobhayan Kirtania
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfchloefrazer622
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...anjaliyadav012327
 
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.pdfQucHHunhnh
 

Último (20)

mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
The byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxThe byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptx
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
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
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
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"
 
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
 
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
 

Session1

  • 2. THE PLAN Week 1 - Introductions Week 2 - Nothing. Week 3 - 6 - Fundamentals, OOP Week 7 - 10 - Midterm project/support, oF Week 11 - 15 - Final project/support
  • 3. ADVANCED STUDENTS Come up with ideas for super cool projects and work on them. Advanced section? Maybe, maybe not.
  • 4. WHAT IS PROCESSING? Processing is a simple programming environment that was created to make it easier to develop visually oriented applications with an emphasis on animation and providing users with instant feedback through interaction.
  • 5. WHAT CAN IT DO? Originally built as a domain-specific extension to Java targeted towards artists and designers, Processing has evolved into a full-blown design and prototyping tool used for large-scale installation work, motion graphics, and complex data visualization.
  • 6. WHAT ARE IT’S ROOTS? Processing is based on Java, but because program elements in Processing are fairly simple, you can learn to use it even if you don't know any Java. Java in turn, derives much of its syntax from C and C ++ but has a simpler object model and fewer low- level facilities.
  • 7. ...THAT'S...COOL. WHY DO I CARE? Processing -> Java -> C/C++ The fundamentals of Processing carry over nicely to other languages. They'll help you lay a foundation for picking up languages with more complex syntax.
  • 8. THE PROCESSING IDE PROGRAMMING INTERACTIVITY | EXPLORING THE PROCESSING IDE | 55
  • 9. SYNTAX A set of rules that defines the combination of symbols and expressions Defines the surface form of a language
  • 10.
  • 11. CURLY BRACES Always work in balanced pairs (an open and closed pair) Used to structure code blocks
  • 12. NAMING CONVENTION Legal names can only contain letters, underscores, numbers, and the dollar sign The initial character must be a letter, underscore, or dollar sign - not a number The names you define are called identifiers
  • 14. VARIABLES A container for storing data Allows a data element to be reused Every variable had a name, value and data type A variable must be declared before it is used
  • 15. DATA TYPES int - integer data Processing can store and manipulate different kinds float - floating-point of data including numbers, numbers that have a letters, words, colors, etc decimal point The computer stores each String - Words and in a different way so it sentences needs to know which kind of data it is in order to boolean - True or false manage it And MORE!
  • 16. OPERATORS Symbols used to write mathematical expressions + (Addition) - (Subtraction) * (Multiplication) / (Division)
  • 17. RELATIONAL OPERATORS > (greater than) >= (greater than and equal to) < (less than) <= (less than and equal to) == (equal to) != (not equal to)
  • 18. COMMENTS Ignored by the computer Helps us write notes Helps remember what that part of the program does
  • 19. EXPRESSIONS, STATEMENTS An expression like a phrase Often a combination of operators A statement A set of expressions Like a sentence Ends with the statement terminator
  • 20. FUNCTIONS Allow us to execute certain actions like draw shapes, set colors Usually lowercase followed by parentheses
  • 21. PROGRAMMING MODES Processing has 3 programming modes - Basic, Continuous, and Java. For our purposes, pretend the Java mode does not exist.
  • 22. BASIC MODE This mode is used drawing static images and learning fundamentals of programming. Simple lines of code have a direct representation on the screen.
  • 23. CONTINUOUS MODE This mode provides a setup() structure that is run once when the program begins and a draw() structure which by default continually loops through the code inside. This additional structure allows writing custom functions and classes and using keyboard and mouse events.
  • 25. ITERATION: WHILE Controls a sequence of repetitions. The while structure executes a series of statements continuously while the expression is true.
  • 26. ITERATION: FOR Controls a sequence of repetitions. A for structure has three parts: init, test, and update. Each part must be separated by a semi- colon ";". The loop continues until the test evaluates to false.
  • 27. CONDITIONAL: IF Allows the program to make a decision about which code to execute. If the test evaluates to true, the statements enclosed within the block are executed and if the test evaluates to false the statements are not executed.
  • 28. CONDITIONAL/SELECTIVE: SWITCH Works like an if else structure, but switch() is more convenient when you need to select between three or more alternatives. Program controls jumps to the case with the same value as the expression. All remaining statements in the switch are executed unless redirected by a break.
  • 30. COORDINATES Processing uses a Cartesian coordinate system with the origin in the upper-left corner. If your program is 320 pixels wide and 240 pixels high, coordinate [0, 0] is the upper- left pixel and coordinate [320, 240] is in the lower-right. The last visible pixel in the lower- right corner of the screen is at position [319, 239] because pixels are drawn to the right and below the coordinate.
  • 31. SHAPES Ellipse: ellipse() | ellipse(x, y, width, height); Line: line() | line(x1, y1, x2, y2); Point: point() | point(x,y); Rectangle: rect() | rect(x, y, width, height); Triangle: triangle() | triangle(x1, y1, x2, y2, x3, y3); Quadrilateral: quad() | quad(x1, y1, x2, y2, x3, y3, x4, y4); And more!
  • 32. COLOR Setting Creating & Reading background() alpha() colorMode() blendColor() fill() brightness() noFill() color() noStroke() hue() stroke() And More!
  • 34. ASSIGNMENT Create a self portrait! - It could be a drawing of you, your pet, your zodiac sign, an abstract pattern, etc. etc. The sketch should incorporate some of what we’ve covered in class and contain at least one function and one control structure. Advanced - Make things move, use - events, libraries, OOP. Come up with ideas for projects you would like to work on. Bonus - Use Eclipse to create your sketch.

Notas do Editor