Processing - La Salle University

Download Report

Transcript Processing - La Salle University

Processing Workshop
What is processing?
“Processing is an open source programming
language and environment for people who want
to program images, animation, and interactions.
It is used by students, artists, designers,
researchers, and hobbyists for learning,
prototyping, and production…to teach
fundamentals of computer programming within a
visual context and to serve as a software
sketchbook and professional production tool.”
(http://www.processing.org, 7/2/2008)
Download processing
• Go to www.processing.org
• Click on the link to download
Download the software.
Click on the options Windows
Save the file to your computer
Put in the My Documents folder
The file will be named processing-1.2.1
Continue
• After the file is saved, click on the option to
OPEN the file.
• Once the file is open we need to extract it.
• Save the work to the MY DOCUMENTS. The
folder processing-0135 work will be created in
MY DOCUMENTS.
Folder processing-1.2.1
This is the processing program.
Right click on this file and click on the option to create a shortcut on the
desktop
File Open
Run Command
Writing pad for
your Processing
Code
List of Errors
List of Editing Commands
The Environment
• Opening files
• Saving files
– Files must be in folders with the same name
– Files have an extension PDE
• Drawing (running) the files
• Editing the files
• Seeing the errors
Opening an Example
• Click on the File Command
• Select the option open
• Use the browse feature and go to the MY
DOCUMENTS folder. Find the folder
processing work. In that folder find the folder
HomageToTheSquare_1
HomageToTheSquare_1
Click on the OPEN option
Select the file and
click on open
Code for HomageToTheSquare
SIZE command
size of the window
FILL Command
Red, Green, Blue amounts
RECT Command
X position, Y position,
width, height
SAVE command
Your First Exercise
• The color for each square is decided by the
combination RED, BLUE and GREEN for each square.
Value for each color is a number in the range of 0255.
• Change the values of the colors for the squares by
changing the numbers in each fill command.
• Look at your image
More Homage
• HomageToTheSquare_2
– Random color and size
• HomageToTheSquare_3
– Loops, Random color and size to create 10 images
• HomageToTheSquare_4
– Same as 3, but less code using more loops
Pick an Example
• The Processing environment downloaded with
a bunch of examples.
• Show me one you like – running.