slide1 n.
Skip this Video
Loading SlideShow in 5 Seconds..
DSA PowerPoint Presentation
Download Presentation

Loading in 2 Seconds...

play fullscreen
1 / 10

DSA - PowerPoint PPT Presentation

  • Uploaded on

DSA. Processing. Links. My Processing page Ben Fry Ben Fry’s Thesis on Computational Information Design Casey Reas site Casey Reas at UCLA. Favourites. Zipcodes by Ben Fry Dreamlines by Leonardo Solaas Life automata by Chris Wallace. Origin.

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
Download Presentation

PowerPoint Slideshow about 'DSA' - tyson

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript



  • My Processing page
  • Ben Fry
  • Ben Fry’s Thesis on Computational Information Design
  • Casey Reas site
  • Casey Reas at UCLA
  • Zipcodes by Ben Fry
  • Dreamlines by Leonardo Solaas
  • Life automata by Chris Wallace
  • Ben Fry and Casey Reas.
  • Processing is a programming language and environment built for the electronic arts and visual design communities. It is created to teach fundamentals of computer programming within a visual context and to serve as a software sketchbook. It is used by students, artists, designers, architects, and researchers for learning, prototyping, and production.
  • Processing is a Object oriented language with a specific domain of multimedia. Programs are translated in to Java, compiled and executed seamless in the simple but effective Development environment. Once written, an application can be exported as a Java applet for inclusion in a website, or as a Java application.

Variables are typed just as they are in Java

// Storing Input

// by REAS <>

int num = 120;

float mx[] = new float[num];

float my[] = new float[num];

void setup()


size(200, 200);



fill(255, 153);



void draw()



// Reads throught the entire array

// and shifts the values to the left

for(int i=1; i<num; i++) {

mx[i-1] = mx[i];

my[i-1] = my[i];


// Add the new values to the end of the array

mx[num-1] = mouseX;

my[num-1] = mouseY;

for(int i=0; i<num; i++) {

ellipse(mx[i], my[i], i/4, i/4);



Array declaration

Setup called once at the start

HSV model fill colour for shapes

Draw called once every frame

Model is sequence of x,y values, oldest first

Update model by losing the oldest and adding the mouse position

Finally render the model as circles, oldest smallest.

processing syntax
Processing syntax
  • Like java
    • Comments
    • Control structures
    • Assignment
    • Strongly typed variables
  • Simple class definition
  • Extensive library of functions to:
    • Set state of animation
    • Draw graphics (2D and 3D)
    • Get mouse input
    • File and web interaction
animation program structure
Animation Program Structure
  • Code executes in a framework which calls functions at points in the processing loop
    • Start – setup()
    • Each frame – draw()
  • Draw updates the Display window
    • Fresh canvas (buffer) at the start of draw()
    • Graphics commands update the canvas
    • When draw terminates, the canvas is written to the Display Window
integrated development environment
Integrated Development Environment
  • Syntax and language-aware editor
    • Colour-code syntax
    • Bracket matching
    • reserved words linked to reference manual
  • Generally good diagnostics
  • Extensive language examples
  • Fast edit-compile-execute cycle
  • Generate Java applet and application code
  • Include Java code
graphics model


Graphics Model


  • Very powerful set of graphics primitives for line graphics
    • 2-d and 3-d models + OpenGL
    • image and video manipulation
    • RGB and HSB colour models
    • Interaction from mouse and keyboard and serial port
    • Extensive font library
  • Graphics drawn through a transformation matrix (2-d or 3-d) with matrix stack
model based animation
Model- based animation






User defined



User input

e.g. Spring

External data source