Code
void setup(){
size(400,400);
background(0);
stroke(51, 255, 69);
smooth();
}
void loop(){
if (key == 'a'){
background(0);
drawA();
}
if (key == 'b'){
background(0);
drawB();
}
if (key == 'c'){
background(0);
drawC();
}
if (key == 'd'){
background(0);
drawD();
}
if (key == 'e'){
background(0);
drawE();
}
if (key == 'f'){
background(0);
drawF();
}
if (key == 'g'){
background(0);
drawG();
}
if (key == 'h'){
background(0);
drawH();
}
if (key == 'i'){
background(0);
drawI();
}
if (key == 'j'){
background(0);
drawJ();
}
if (key == 'k'){
background(0);
drawK();
}
if (key == 'l'){
background(0);
drawL();
}
if (key == 'm'){
background(0);
drawM();
}
if (key == 'n'){
background(0);
drawN();
}
if (key == 'o'){
background(0);
drawO();
}
if (key == 'p'){
background(0);
drawP();
}
if (key == 'q'){
background(0);
drawQ();
}
if (key == 'r'){
background(0);
drawR();
}
if (key == 's'){
background(0);
drawS();
}
if (key == 't'){
background(0);
drawT();
}
if (key == 'u'){
background(0);
drawU();
}
if (key == 'v'){
background(0);
drawV();
}
if (key == 'w'){
background(0);
drawW();
}
if (key == 'x'){
background(0);
drawX();
}
if (key == 'y'){
background(0);
drawY();
}
if (key == 'z'){
background(0);
drawZ();
}
}
void drawGuide(){
rect (mouseX, 0, 10, 400);
line(0 , 300, 400, 300);
line(0, 200, 400, 200);
strokeWeight(1);}
void drawA(){
drawGuide();
line(200,100, 300, 100);
rect(200, 200, 25, 100);
rect(300, 100, 25, 200);
fill(51,255,69,150);
}
void drawB(){
drawGuide();
rect(200, 100, 25, 200);
rect(300, 200, 25, 100);
fill(51,255,69,150);
}
void drawC(){
drawGuide();
rect(200, 100, 25, 200);
rect(300, 100, 25, 50);
line(200,100, 300, 100);
rect(300, 250, 25, 50);
fill(51,255,69,150);
}
void drawD(){
drawGuide();
rect(200, 200, 25, 100);
rect(300, 100, 25, 200);
fill(51,255,69,150);
}
void drawE(){drawGuide();
rect(200, 100, 25, 200);
line(200,100, 300, 100);
fill(51,255,69,200);
}
void drawF(){drawGuide();
rect(200, 100, 25, 200);
rect(300, 100, 25, 50);
line(200,100, 300, 100);
fill(51,255,69,150);
}
void drawG(){drawGuide();
rect(200, 100, 25, 200);
rect(300, 100, 25, 50);
line(200,100, 300, 100);
rect(300, 200, 25, 100);
fill(51,255,69,150);
}
void drawH(){drawGuide();
rect(200, 100, 25, 200);
rect(300, 100, 25, 200);
fill(51,255,69,150);
}
void drawI(){drawGuide();
rect(200, 100, 25, 200);
fill(51,255,69,150);
}
void drawJ(){drawGuide();
rect(200, 250, 25, 50);
rect(300, 100, 25, 200);
fill(51,255,69,150);
}
void drawK(){drawGuide();
rect(200, 100, 25, 200);
rect(300, 150, 25, 150);
fill(51,255,69,150);
}
void drawL(){drawGuide();
rect(200, 100, 25, 200);
rect(300, 250, 25, 50);
fill(51,255,69,150);
}
void drawM(){drawGuide();
rect(200, 150, 25, 150);
rect(300, 200, 25, 100);
rect(250, 200, 25, 100);
fill(51,255,69,150);
}
void drawN(){drawGuide();
rect(200, 150, 25, 150);
rect(300, 200, 25, 100);
fill(51,255,69,150);
}
void drawO(){drawGuide();
line(200, 100, 300, 100);
rect(200, 100, 25, 200);
rect(300, 100, 25, 200);
fill(51,255,69,150);
}
void drawP(){drawGuide();
line(200, 100, 300, 100);
rect(200, 100, 25, 200);
rect(300, 100, 25, 100);
fill(51,255,69,150);
}
void drawQ(){drawGuide();
line(200, 100, 300, 100);
rect(200, 100, 25, 200);
rect(300, 100, 25, 200);
rect(250, 250, 25, 50);
fill(51,255,69,150);
}
void drawR(){drawGuide();
line(200, 100, 300, 100);
rect(200, 100, 25, 200);
rect(275, 200, 25, 100);
rect(300, 100, 25, 100);
fill(51,255,69,150);
}
void drawS(){drawGuide();
line(200, 100, 300, 100);
rect(200, 100, 25, 100);
rect(300, 200, 25, 100);
rect(200, 250, 25, 50);
rect(300, 100, 25, 50);
fill(51,255,69,150);
}
void drawT(){drawGuide();
rect(250, 100, 25, 200);
line(200,100, 325, 100);
fill(51,255,69,150);
}
void drawU(){drawGuide();
rect(200, 100, 25, 200);
rect(300, 100, 25, 200);
fill(51,255,69,150);
}
void drawV(){drawGuide();
rect(200, 100, 25, 200);
rect(250, 100, 25, 200);
fill(51,255,69,150);
}
void drawW(){drawGuide();
rect(200, 100, 25, 200);
rect(300, 100, 25, 200);
rect(250, 100, 25, 200);
fill(51,255,69,150);
}
void drawX(){drawGuide();
rect(200, 100, 25, 150);
rect(300, 150, 25, 150);
fill(51,255,69,150);
}
void drawY(){drawGuide();
rect(200, 100, 25, 100);
rect(300, 100, 25, 100);
rect(250, 200, 25, 100);
fill(51,255,69,150);
}
void drawZ(){drawGuide();
line(200, 100, 300, 100);
rect(200, 100, 25, 50);
rect(300, 250, 25, 50);
rect(200, 200, 25, 100);
rect(300, 100, 25, 100);
fill(51,255,69,150);
}
022 -- Intermorphable Alphabet: A custom graphic alphabet
Statement:Create an alphabet (using any graphic primitives you prefer). Conform all of your letters to the same "structuring logic", such that any letter could smoothly morph into any other letter. For example, design an alphabet in which every letter is constructed from 3 arcs, or from 4 rectangles, or from 7 triangles, etc. etc. Some people who have done this: Peter Cho's typeMeNot, David Lu's example, Nik Pashenkov's Alphabot.
NOTE: For this assignment, you *should* be able to animate the transitions from one letter to another. You are granted one extra week to complete this specific feature, if you need the extra time. If you can complete the animated transitions this week, please do. The required interaction is one in which pressing a key calls forth an animated transition (of approximately a second's duration) to the desired letter.
[z?]