Presentation on theme: "Introduction to Programming With Computer Language Processing."— Presentation transcript:
Introduction to Programming With Computer Language Processing
Processing Born in 2001 at MIT. Open source. Language and environment to program images, animation, and sounds. Build on Java. www.processing.org
Processing Based on Java. Case sensitive Statement terminates by ; Three major components: – Fundamentals: data types, variables, operators… – Control structs: Functions Decisions: if Loops: while, for – Data structures: Class and objects Many examples
Processing Interactions: – Mouse operations: move, click… – No buttons, labels... Use Java to add them Libraries and references: – Use Help – Go to www.processing.org
Data Representations in a Computer Computer understands only 0’s and 1’s. Text file: ASCII file numbers Binary file: all numbers Images and graphics: every pixel has a number representing – Grayscale (0 – 255) – Color (red: 0-255, green: 0-255, blue: 0-255) – Optional: alpha (0-255), color transparency.
Pixels and Coordinates Pixel: unit of image resolution Coordinate system: – Top-left corner: (0,0) – X axis: horizontal axis, left to right – Y axis: Vertical, top to buttom Point: (X-coordinate, Y-coordinate) Examples: Point (0,0), (2,5), (3,3)…