SlideShare una empresa de Scribd logo
1 de 13
Week 2: Functions
Runs once Runs over and over Runs each  time you click the mouse A Brief Detour: Mouse and Key Presses
Runs once Runs over and over A Brief Detour: Mouse and Key Presses Try replacing  mousePressed () with: keyPressed () mouseReleased () mouseDragged () How are these different?
Functions (you should know what this does)
Functions This does the same thing… but with more lines! Why do I care?
Anatomy of a Function (similar words: method, subroutine) void  renderCircle(){ fill (200); ellipse (x,y,100,100); } what’s this? what’s this? function code function name
Do the same thing in slightly different ways Both circles look the same, but behave differently Functions: Why do I care?
If you change the function code, you change how the circles look without changing their behavior Functions: Why do I care? make a different shape here
Sometimes it’s just neater and easier to read Functions: Why do I care? Blahblahblah make 6 ellipses in three alternating colors and enclose them in a rectangle  that has a randomly changing color and put a line through it all…
Anatomy of a Function what’s this? parameters (TYPE and NAME) function code function name void  renderCircle( int  _x,  int  _y){ fill (200); ellipse (_x,_y,100,100); }
You can use a function to ask a question and receive an answer Functions: Why do I care?
boolean  inCircle( int  _x,  int  _y){ if ( sq (_x-x) +  sq (_y-y) <  sq (50))  return   true ; else   return   false ; } Anatomy of a Function data return type parameters (TYPE and NAME) function code function name
YOU CAN USE OTHER PEOPLE’S FUNCTIONS Functions: Why do I care?

Más contenido relacionado

La actualidad más candente

Python programming lab3 250215
Python programming lab3 250215Python programming lab3 250215
Python programming lab3 250215profbnk
 
Sequence Types in Python Programming
Sequence Types in Python ProgrammingSequence Types in Python Programming
Sequence Types in Python ProgrammingBobby Murugesan
 
Sqlalchemy lightning talk
Sqlalchemy lightning talkSqlalchemy lightning talk
Sqlalchemy lightning talkpythonsd
 
Functional programming with haskell
Functional programming with haskellFunctional programming with haskell
Functional programming with haskellfaradjpour
 
Functional Core and Imperative Shell - Game of Life Example - Haskell and Scala
Functional Core and Imperative Shell - Game of Life Example - Haskell and ScalaFunctional Core and Imperative Shell - Game of Life Example - Haskell and Scala
Functional Core and Imperative Shell - Game of Life Example - Haskell and ScalaPhilip Schwarz
 
Introduction to haskell
Introduction to haskellIntroduction to haskell
Introduction to haskellLuca Molteni
 
Monoids - Part 1 - with examples using Scalaz and Cats
Monoids - Part 1 - with examples using Scalaz and CatsMonoids - Part 1 - with examples using Scalaz and Cats
Monoids - Part 1 - with examples using Scalaz and CatsPhilip Schwarz
 
[1062BPY12001] Data analysis with R / week 3
[1062BPY12001] Data analysis with R / week 3[1062BPY12001] Data analysis with R / week 3
[1062BPY12001] Data analysis with R / week 3Kevin Chun-Hsien Hsu
 
The Ring programming language version 1.5.2 book - Part 18 of 181
The Ring programming language version 1.5.2 book - Part 18 of 181The Ring programming language version 1.5.2 book - Part 18 of 181
The Ring programming language version 1.5.2 book - Part 18 of 181Mahmoud Samir Fayed
 
The Ring programming language version 1.2 book - Part 12 of 84
The Ring programming language version 1.2 book - Part 12 of 84The Ring programming language version 1.2 book - Part 12 of 84
The Ring programming language version 1.2 book - Part 12 of 84Mahmoud Samir Fayed
 

La actualidad más candente (13)

Python programming lab3 250215
Python programming lab3 250215Python programming lab3 250215
Python programming lab3 250215
 
Sequence Types in Python Programming
Sequence Types in Python ProgrammingSequence Types in Python Programming
Sequence Types in Python Programming
 
Sqlalchemy lightning talk
Sqlalchemy lightning talkSqlalchemy lightning talk
Sqlalchemy lightning talk
 
Introduction to python programming
Introduction to python programmingIntroduction to python programming
Introduction to python programming
 
Functional programming with haskell
Functional programming with haskellFunctional programming with haskell
Functional programming with haskell
 
Functional Core and Imperative Shell - Game of Life Example - Haskell and Scala
Functional Core and Imperative Shell - Game of Life Example - Haskell and ScalaFunctional Core and Imperative Shell - Game of Life Example - Haskell and Scala
Functional Core and Imperative Shell - Game of Life Example - Haskell and Scala
 
Introduction to haskell
Introduction to haskellIntroduction to haskell
Introduction to haskell
 
Tutorial matlab
Tutorial matlabTutorial matlab
Tutorial matlab
 
Monoids - Part 1 - with examples using Scalaz and Cats
Monoids - Part 1 - with examples using Scalaz and CatsMonoids - Part 1 - with examples using Scalaz and Cats
Monoids - Part 1 - with examples using Scalaz and Cats
 
[1062BPY12001] Data analysis with R / week 3
[1062BPY12001] Data analysis with R / week 3[1062BPY12001] Data analysis with R / week 3
[1062BPY12001] Data analysis with R / week 3
 
Sql
SqlSql
Sql
 
The Ring programming language version 1.5.2 book - Part 18 of 181
The Ring programming language version 1.5.2 book - Part 18 of 181The Ring programming language version 1.5.2 book - Part 18 of 181
The Ring programming language version 1.5.2 book - Part 18 of 181
 
The Ring programming language version 1.2 book - Part 12 of 84
The Ring programming language version 1.2 book - Part 12 of 84The Ring programming language version 1.2 book - Part 12 of 84
The Ring programming language version 1.2 book - Part 12 of 84
 

Destacado

Mb5 858-q&a-demo-cert magic
Mb5 858-q&a-demo-cert magicMb5 858-q&a-demo-cert magic
Mb5 858-q&a-demo-cert magicnikol
 
Milan Mobile Games
Milan Mobile GamesMilan Mobile Games
Milan Mobile GamesTinker
 
Secrets of the Inbox - Presentation for Driving Sales Summit - #dses
Secrets of the Inbox - Presentation for Driving Sales Summit - #dsesSecrets of the Inbox - Presentation for Driving Sales Summit - #dses
Secrets of the Inbox - Presentation for Driving Sales Summit - #dsesJeff Kershner
 
XBee and RFID
XBee and RFIDXBee and RFID
XBee and RFIDTinker
 
Mobile Workflow and the Showroom Process of the Near Future
Mobile Workflow and the Showroom Process of the Near FutureMobile Workflow and the Showroom Process of the Near Future
Mobile Workflow and the Showroom Process of the Near FutureJeff Kershner
 
Mobile Path to Purchase 2014 - New Shopper Mindset
Mobile Path to Purchase 2014 - New Shopper MindsetMobile Path to Purchase 2014 - New Shopper Mindset
Mobile Path to Purchase 2014 - New Shopper MindsetJeff Kershner
 
HookLogic / AutoHook Suite - Building the Ultimate Attribution Model in Autom...
HookLogic / AutoHook Suite - Building the Ultimate Attribution Model in Autom...HookLogic / AutoHook Suite - Building the Ultimate Attribution Model in Autom...
HookLogic / AutoHook Suite - Building the Ultimate Attribution Model in Autom...Jeff Kershner
 
Winning The Customer With a Great Experience
Winning The Customer With a Great ExperienceWinning The Customer With a Great Experience
Winning The Customer With a Great ExperienceJeff Kershner
 

Destacado (13)

From desires, obligations and norms to goals
From desires, obligations and norms to goalsFrom desires, obligations and norms to goals
From desires, obligations and norms to goals
 
Mb5 858-q&a-demo-cert magic
Mb5 858-q&a-demo-cert magicMb5 858-q&a-demo-cert magic
Mb5 858-q&a-demo-cert magic
 
Milan Mobile Games
Milan Mobile GamesMilan Mobile Games
Milan Mobile Games
 
Kijken naar het glas
Kijken naar het glasKijken naar het glas
Kijken naar het glas
 
Secrets of the Inbox - Presentation for Driving Sales Summit - #dses
Secrets of the Inbox - Presentation for Driving Sales Summit - #dsesSecrets of the Inbox - Presentation for Driving Sales Summit - #dses
Secrets of the Inbox - Presentation for Driving Sales Summit - #dses
 
Leadership lessons-from-obama-
Leadership lessons-from-obama-Leadership lessons-from-obama-
Leadership lessons-from-obama-
 
The purpose of life & universe ( iln )
The purpose of  life & universe  ( iln )The purpose of  life & universe  ( iln )
The purpose of life & universe ( iln )
 
Mind tree story
Mind tree storyMind tree story
Mind tree story
 
XBee and RFID
XBee and RFIDXBee and RFID
XBee and RFID
 
Mobile Workflow and the Showroom Process of the Near Future
Mobile Workflow and the Showroom Process of the Near FutureMobile Workflow and the Showroom Process of the Near Future
Mobile Workflow and the Showroom Process of the Near Future
 
Mobile Path to Purchase 2014 - New Shopper Mindset
Mobile Path to Purchase 2014 - New Shopper MindsetMobile Path to Purchase 2014 - New Shopper Mindset
Mobile Path to Purchase 2014 - New Shopper Mindset
 
HookLogic / AutoHook Suite - Building the Ultimate Attribution Model in Autom...
HookLogic / AutoHook Suite - Building the Ultimate Attribution Model in Autom...HookLogic / AutoHook Suite - Building the Ultimate Attribution Model in Autom...
HookLogic / AutoHook Suite - Building the Ultimate Attribution Model in Autom...
 
Winning The Customer With a Great Experience
Winning The Customer With a Great ExperienceWinning The Customer With a Great Experience
Winning The Customer With a Great Experience
 

Similar a Programming for Artists and Designers: Week 3

Mdx Basics
Mdx BasicsMdx Basics
Mdx BasicsALIPPHAR
 
Using-Python-Libraries.9485146.powerpoint.pptx
Using-Python-Libraries.9485146.powerpoint.pptxUsing-Python-Libraries.9485146.powerpoint.pptx
Using-Python-Libraries.9485146.powerpoint.pptxUadAccount
 
Cocoa Design Patterns in Swift
Cocoa Design Patterns in SwiftCocoa Design Patterns in Swift
Cocoa Design Patterns in SwiftMichele Titolo
 
Oracle sql functions
Oracle sql functionsOracle sql functions
Oracle sql functionsVivek Singh
 
Notes5
Notes5Notes5
Notes5hccit
 
Functional programming and Elm
Functional programming and ElmFunctional programming and Elm
Functional programming and ElmFangda Wang
 
Principles of functional progrmming in scala
Principles of functional progrmming in scalaPrinciples of functional progrmming in scala
Principles of functional progrmming in scalaehsoon
 
Living in the ES6 Future, Today
Living in the ES6 Future, TodayLiving in the ES6 Future, Today
Living in the ES6 Future, Todayjeremymorrell
 
Lab Session for sql programming language 1.pptx
Lab Session for sql programming language 1.pptxLab Session for sql programming language 1.pptx
Lab Session for sql programming language 1.pptxmeharikiros2
 
7 Habits For a More Functional Swift
7 Habits For a More Functional Swift7 Habits For a More Functional Swift
7 Habits For a More Functional SwiftJason Larsen
 
Real World Haskell: Lecture 6
Real World Haskell: Lecture 6Real World Haskell: Lecture 6
Real World Haskell: Lecture 6Bryan O'Sullivan
 
Getting functional with elixir
Getting functional with elixirGetting functional with elixir
Getting functional with elixirAthira Mukundan
 
Swift, functional programming, and the future of Objective-C
Swift, functional programming, and the future of Objective-CSwift, functional programming, and the future of Objective-C
Swift, functional programming, and the future of Objective-CAlexis Gallagher
 
Notes2
Notes2Notes2
Notes2hccit
 
How to start functional programming (in Scala): Day1
How to start functional programming (in Scala): Day1How to start functional programming (in Scala): Day1
How to start functional programming (in Scala): Day1Taisuke Oe
 
Please make the complete program, Distinguish between header files a.pdf
Please make the complete program, Distinguish between header files a.pdfPlease make the complete program, Distinguish between header files a.pdf
Please make the complete program, Distinguish between header files a.pdfSALES97
 
Excel Useful Tips
Excel Useful TipsExcel Useful Tips
Excel Useful TipsParul_100in
 
Lecture 02 visualization and programming
Lecture 02   visualization and programmingLecture 02   visualization and programming
Lecture 02 visualization and programmingSmee Kaem Chann
 
ISTA 130 Lab 21 Turtle ReviewHere are all of the turt.docx
ISTA 130 Lab 21 Turtle ReviewHere are all of the turt.docxISTA 130 Lab 21 Turtle ReviewHere are all of the turt.docx
ISTA 130 Lab 21 Turtle ReviewHere are all of the turt.docxpriestmanmable
 

Similar a Programming for Artists and Designers: Week 3 (20)

Mdx Basics
Mdx BasicsMdx Basics
Mdx Basics
 
Using-Python-Libraries.9485146.powerpoint.pptx
Using-Python-Libraries.9485146.powerpoint.pptxUsing-Python-Libraries.9485146.powerpoint.pptx
Using-Python-Libraries.9485146.powerpoint.pptx
 
Cocoa Design Patterns in Swift
Cocoa Design Patterns in SwiftCocoa Design Patterns in Swift
Cocoa Design Patterns in Swift
 
Oracle sql functions
Oracle sql functionsOracle sql functions
Oracle sql functions
 
Notes5
Notes5Notes5
Notes5
 
Functional programming and Elm
Functional programming and ElmFunctional programming and Elm
Functional programming and Elm
 
Principles of functional progrmming in scala
Principles of functional progrmming in scalaPrinciples of functional progrmming in scala
Principles of functional progrmming in scala
 
Living in the ES6 Future, Today
Living in the ES6 Future, TodayLiving in the ES6 Future, Today
Living in the ES6 Future, Today
 
Lab Session for sql programming language 1.pptx
Lab Session for sql programming language 1.pptxLab Session for sql programming language 1.pptx
Lab Session for sql programming language 1.pptx
 
7 Habits For a More Functional Swift
7 Habits For a More Functional Swift7 Habits For a More Functional Swift
7 Habits For a More Functional Swift
 
Ms excel
Ms excelMs excel
Ms excel
 
Real World Haskell: Lecture 6
Real World Haskell: Lecture 6Real World Haskell: Lecture 6
Real World Haskell: Lecture 6
 
Getting functional with elixir
Getting functional with elixirGetting functional with elixir
Getting functional with elixir
 
Swift, functional programming, and the future of Objective-C
Swift, functional programming, and the future of Objective-CSwift, functional programming, and the future of Objective-C
Swift, functional programming, and the future of Objective-C
 
Notes2
Notes2Notes2
Notes2
 
How to start functional programming (in Scala): Day1
How to start functional programming (in Scala): Day1How to start functional programming (in Scala): Day1
How to start functional programming (in Scala): Day1
 
Please make the complete program, Distinguish between header files a.pdf
Please make the complete program, Distinguish between header files a.pdfPlease make the complete program, Distinguish between header files a.pdf
Please make the complete program, Distinguish between header files a.pdf
 
Excel Useful Tips
Excel Useful TipsExcel Useful Tips
Excel Useful Tips
 
Lecture 02 visualization and programming
Lecture 02   visualization and programmingLecture 02   visualization and programming
Lecture 02 visualization and programming
 
ISTA 130 Lab 21 Turtle ReviewHere are all of the turt.docx
ISTA 130 Lab 21 Turtle ReviewHere are all of the turt.docxISTA 130 Lab 21 Turtle ReviewHere are all of the turt.docx
ISTA 130 Lab 21 Turtle ReviewHere are all of the turt.docx
 

Último

Vector Search @ sw2con for slideshare.pptx
Vector Search @ sw2con for slideshare.pptxVector Search @ sw2con for slideshare.pptx
Vector Search @ sw2con for slideshare.pptxjbellis
 
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdfThe Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdfFIDO Alliance
 
Portal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russePortal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russe中 央社
 
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptxHarnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptxFIDO Alliance
 
Intro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераIntro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераMark Opanasiuk
 
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...ScyllaDB
 
JavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate GuideJavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate GuidePixlogix Infotech
 
The Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and InsightThe Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and InsightSafe Software
 
Event-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream ProcessingEvent-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream ProcessingScyllaDB
 
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc
 
Introduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptxIntroduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptxFIDO Alliance
 
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdfMuhammad Subhan
 
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...FIDO Alliance
 
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider  Progress from Awareness to Implementation.pptxTales from a Passkey Provider  Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider Progress from Awareness to Implementation.pptxFIDO Alliance
 
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdfIntroduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdfFIDO Alliance
 
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...FIDO Alliance
 
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...panagenda
 
ERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage IntacctERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage IntacctBrainSell Technologies
 
How we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdfHow we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdfSrushith Repakula
 
The Metaverse: Are We There Yet?
The  Metaverse:    Are   We  There  Yet?The  Metaverse:    Are   We  There  Yet?
The Metaverse: Are We There Yet?Mark Billinghurst
 

Último (20)

Vector Search @ sw2con for slideshare.pptx
Vector Search @ sw2con for slideshare.pptxVector Search @ sw2con for slideshare.pptx
Vector Search @ sw2con for slideshare.pptx
 
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdfThe Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
 
Portal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russePortal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russe
 
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptxHarnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
 
Intro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераIntro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджера
 
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
 
JavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate GuideJavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate Guide
 
The Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and InsightThe Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and Insight
 
Event-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream ProcessingEvent-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream Processing
 
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
 
Introduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptxIntroduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptx
 
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
 
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
 
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider  Progress from Awareness to Implementation.pptxTales from a Passkey Provider  Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
 
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdfIntroduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
 
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
 
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
 
ERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage IntacctERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage Intacct
 
How we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdfHow we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdf
 
The Metaverse: Are We There Yet?
The  Metaverse:    Are   We  There  Yet?The  Metaverse:    Are   We  There  Yet?
The Metaverse: Are We There Yet?
 

Programming for Artists and Designers: Week 3

  • 2. Runs once Runs over and over Runs each time you click the mouse A Brief Detour: Mouse and Key Presses
  • 3. Runs once Runs over and over A Brief Detour: Mouse and Key Presses Try replacing mousePressed () with: keyPressed () mouseReleased () mouseDragged () How are these different?
  • 4. Functions (you should know what this does)
  • 5. Functions This does the same thing… but with more lines! Why do I care?
  • 6. Anatomy of a Function (similar words: method, subroutine) void renderCircle(){ fill (200); ellipse (x,y,100,100); } what’s this? what’s this? function code function name
  • 7. Do the same thing in slightly different ways Both circles look the same, but behave differently Functions: Why do I care?
  • 8. If you change the function code, you change how the circles look without changing their behavior Functions: Why do I care? make a different shape here
  • 9. Sometimes it’s just neater and easier to read Functions: Why do I care? Blahblahblah make 6 ellipses in three alternating colors and enclose them in a rectangle that has a randomly changing color and put a line through it all…
  • 10. Anatomy of a Function what’s this? parameters (TYPE and NAME) function code function name void renderCircle( int _x, int _y){ fill (200); ellipse (_x,_y,100,100); }
  • 11. You can use a function to ask a question and receive an answer Functions: Why do I care?
  • 12. boolean inCircle( int _x, int _y){ if ( sq (_x-x) + sq (_y-y) < sq (50)) return true ; else return false ; } Anatomy of a Function data return type parameters (TYPE and NAME) function code function name
  • 13. YOU CAN USE OTHER PEOPLE’S FUNCTIONS Functions: Why do I care?