Introduction to Problem Solving Programming using Processing 2

Introduction to Problem Solving & Programming using Processing 2 1 B. RAMAMURTHY CHAPTER 1 CSE 113 -Fall 2015 9/15/2021

Outline 2 �Motivating Processing…What is Processing? �Sample Program �Processing development environment (PDE)/ Main Processing interface CSE 113 -Fall 2015 9/15/2021

Motivating Processing 3 �Focus is on multi-media and graphics �Simple to translate from ideas to “Visualization”, “interactive graphics”, “Animations” �Easy to use “zero-entry approach to coding” �Open source, abundant community contribution �Built-on top of Java �Can be exported to mobile application environment using Android mode �Can be exported to Web environment using Javascript mode �… many more CSE 113 -Fall 2015 9/15/2021

Sample Program: lets analyze this 4 void setup() { // initialization : executed once size(400, 400); stroke(0); background(192, 64, 0); } void draw() { // repeated every time mouse is moved line(150, 25, mouse. X, mouse. Y); } CSE 113 -Fall 2015 9/15/2021

Lets look at Processing Environment 5 CSE 113 -Fall 2015 9/15/2021

Using processing: Page 9 -16 6 � Environment: � PDE is a simple text editor for writing code. � When programs are they open a new window called the display window. � Pieces of software written in Processing are called sketches. � There is console at the bottom of Processing environment that display output from println() and print() functions. � The toolbar buttons allow you run and stop programs, create a new sketch, open, save, and export. � There are other buttons for file (operations), Edit (operations), Sketch (start and stop), Tools (for formatting etc. ), Help (reference files) � Lets work on the samples given in these pages. CSE 113 -Fall 2015 9/15/2021

Summary 7 �We had a gentle introduction to Processing Environment �Your assignment this week: Read pages 9 -16 Download Processing 2. 1 or above version from processing. org and install it; if you have difficulty please go to next week’s lab/recitation in Bell 340 to get help on installation Try the examples given in those pages. Try something on your own. Understand the various features of the PDE. �No recitation/lab this week Do go to your recitation next week. All recitations are held in 340 Bell. CSE 113 -Fall 2015 9/15/2021
- Slides: 7