This is a short program that combines skills from this lesson. I import a font and write a word to the screen. I also translate the coordinate system and rotate continuously so that the word spins around its own center.
// the word "pinwheel" spins around
PFont font1;
float rotAngle = 0;
void setup(){
size(200,200);
font1 = loadFont("Herculanum-48.vlw");
textFont(font1);
textAlign(CENTER);
}
void draw(){
background(11,139,1);
translate(width/2,height/2);
rotate(rotAngle);
text("pinwheel",0,0);
rotAngle += 0.01;
}
Screenshot from pinwheel program
E. Richardson