13
PROCESSING * introduction to programming

PROCESSING. * Java SDK * downloads/jdk7-downloads-1880260.html

Embed Size (px)

Citation preview

Page 1: PROCESSING. * Java SDK *  downloads/jdk7-downloads-1880260.html

PROCESSING

*introduction to programming

Page 3: PROCESSING. * Java SDK *  downloads/jdk7-downloads-1880260.html

*Computer Programming

*Computer programming is the process of designing, writing, testing, debugging, and maintaining the source code of computer programs.

*This source code is written in one or more programming languages (such as C++, C#, Java, Python, Smalltalk, etc.).

*We will use Processing, which is the same(ish) as Java

*The purpose of programming is to create a set of instructions that computers use to perform specific operations or to exhibit desired behaviours.

*Simplified: programming is simply a set of instructions that tell the computer what to do.

http://en.wikipedia.org/wiki/Computer_programming

Page 4: PROCESSING. * Java SDK *  downloads/jdk7-downloads-1880260.html

*Organize your Folders

*If you already haven’t done so, create a folder in your drive for ICS3

*In that folder, put the following folders:

*Practice Programs

*Assignments

*Major Project

Page 5: PROCESSING. * Java SDK *  downloads/jdk7-downloads-1880260.html

*Open & Save

*First thing you do when you create a new program is save it

*Open Processing (Programs on Desktop, Processing)

*Save in Practice Programs folder as firstProgram

Page 6: PROCESSING. * Java SDK *  downloads/jdk7-downloads-1880260.html

*Drawing in Processing

*Drawing objects and shapes in Processing (and other programming languages) is an exercise in using the coordinate system.

Page 7: PROCESSING. * Java SDK *  downloads/jdk7-downloads-1880260.html
Page 8: PROCESSING. * Java SDK *  downloads/jdk7-downloads-1880260.html
Page 9: PROCESSING. * Java SDK *  downloads/jdk7-downloads-1880260.html

*Primitive Shapes

*Using the Processing Reference page

*http://www.processing.org/reference/

*Create the following shapes

*Arc

*Ellipse

*Line

*Rect

*Triangle

Page 10: PROCESSING. * Java SDK *  downloads/jdk7-downloads-1880260.html

*Copy Zoog example

*Notice:

*size(); //sets size of run screen

*background(); //sets background colour

*smooth(); //smooth edge of shapes

*fill(); //for colour

*//comments, don’t execute

Page 11: PROCESSING. * Java SDK *  downloads/jdk7-downloads-1880260.html
Page 12: PROCESSING. * Java SDK *  downloads/jdk7-downloads-1880260.html

*On your own …

*Change the size of the run window.

*Draw the basic shapes. Move the shapes around the screen and play with the size, by changing the coordinates.

*draw a square (rectangle)

*draw a circle (elipse)

*draw a line

*draw a triangle

*Add colour to your shapes.

*Make changes to the zoog

*Comments (top and throughout) and indentation.

Page 13: PROCESSING. * Java SDK *  downloads/jdk7-downloads-1880260.html

*More practice

*Draw the following scene. Expand (chimney, trees, clouds, etc.) as you see fit.