Mediascripting on the Web (CSC 195 2014F) : EBoards

CSC 195 2014S, Class 03: Processing (1)


Overview

Preliminaries

Admin

Questions

PsAiF/R

GitHub and HW2

PsAiF/R: Your Answers

PsAiF/R: Your Problems

PsAiF/R: Your Reflections

Processing

A bit of background

Why Processing?

Processing basics

A quick and ugly example

float foo;
float bar;
float c;

int width = 500;
int height = 300;

void
setup()
{
  size(width,height);
  foo = 300;
  bar = 300;
  c = 0;
}
void
draw()
{
  foo = (foo + 5) % width;
  bar = (bar - 2) % height;
  c = (c+1) % 93;
  colorMode(HSB,100);
  fill(c,100,100);
   strokeWeight(2);
  stroke(c,100,100);
  line(0,0,foo,bar);
  line(50,50, 50,500);
  ellipse(200,200,200,50);
  rect(200,200,200,50);

} // draw

Lab

Your turn to play.

Copyright (c) 2014 Samuel A. Rebelsky.

Creative Commons License

This work is licensed under a Creative Commons Attribution 3.0 Unported License. To view a copy of this license, visit http://creativecommons.org/licenses/by/3.0/ or send a letter to Creative Commons, 543 Howard Street, 5th Floor, San Francisco, California, 94105, USA.