Assignment 1

By Douglas S. Blank

This is my story.

In [8]:
size(500, 500);

rect(250, 250, 250, 250);

fill(255, 0, 0);
triangle(10, 10, 50, 50, 0, 70);
Sketch #7:

Sketch #7 state: Loading...
In [9]:
/* @pjs font="Arial.ttf"; */
        
void setup()
{
  size(200,200);
  noLoop();
  textFont(createFont("Arial",32));
}

void draw()
{
  background(255);
  String t = "P.js";
  float tw = textWidth(t);
  fill(0);
  text(t, (width-tw)/2, (height+32)/2);
}
Sketch #8:

Sketch #8 state: Loading...