Processing

Processing Java-based language for learning graphical interfaces programming.

6 flashcards · Programming Languages · by lakesare

  1. Imagine the bouncing ball sketch. How would you make the ball leave fading traces?

    Just draw the large transparent rectangle throughout the display. Supersede background(0); with fill(0, 20); // rgb, alpha rect(0, 0, width, height);

  2. random(); VS noise(); What does noise(100) return?

    noise(100) will always return the same value between 0 and 1 (unless you refresh the page, it's seeded on page load).

  3. Describe 3 ways to denote red color in Processing.

    color c = #FF0000; color c = color(255, 0, 0, alpha); color c = 0xFFFF0000; Hexadecimal notation. AARRGGBB.

  4. rect(a, b, c, d) rect(a, b, c, d, r) What are the arguments for rect(a, b, c, d)?

    a float: x-coordinate of the rectangle b float: y-coordinate of the rectangle c float: width of the rectangle d float: height of the rectangle r float: radii for all four corners

  5. What are arguments to line()?

  6. What argument does rotate(x) accept, and in what direction does it rotate? rotate(x)

    rotate accepts radians and rotates in clockwise direction (unlike in maths!)