Homework 1

Due date

This homework is due on January 24, 2011. and must be submitted as two files to UNCA moodle.

The Task

Read pages 9 to 34 of the textbook and create a self-portrait.

Using graph paper and black ink or a drawing program, draw a caricature of your face using points, lines, triangles, quadrilaterals, ellipses, rectangles, curves, and (for the ambitious) Bézier curves. There must be at least ten graphic primitives in the drawing. Three different primitives must be used. For example, you may not just use lines in one image. Scan in the black and white or grayscale drawing, and save it as a .gif or .tiff of size 400×400 pixels. Submit the .gif or .tiff file on Moodle. Remember to fill the space.

Create a Processing program that draws the same drawing decribed above. You can get your coordinates from Adobe Illustrator or another drawing program, or you can just estimate them from your drawing. If you get your coordinates from Adobe Illustrator, make sure your document dimensions are 400×400 pixels and that your information window displays units in pixels. More detailed instructions for working with Illustrator are provided here.

Upload your source code (as a .pde file) to Moodle.

Example

Here is an example program that recreates the caricature used on my homepage. It's not exactly the same image as shown on my homepage so both the image and the code are provided below. I created this program using approximate coordinates for curves rather than using Bézier curves defined within Illustrator.

face example

// Rebecca Bruce's face code
// 1-11-2011
// This program draws a caricature of my face.

size(500,600);
background(255);
stroke(0);
strokeWeight(3);
noFill();

// head
rect(130,110,240,380);

// eyes
// left eye
line(220,200,195,180);
line(195,180,145,185);

// right eye
line(280,200,305,180);
line(305,180,355,185);

// nose
// left half
noFill();
beginShape();
curveVertex(232,329);
curveVertex(232,329);
curveVertex(227,330);
curveVertex(218,325);
curveVertex(222,310);
curveVertex(229,300);
curveVertex(229,300);
endShape();

// right half
beginShape();
curveVertex(265,329);
curveVertex(265,329);
curveVertex(273,330);
curveVertex(280,325);
curveVertex(278,310);
curveVertex(272,300);
curveVertex(272,300);
endShape();

// lips
// top lip
beginShape();
curveVertex(195,400);
curveVertex(195,400);
curveVertex(230,380);
curveVertex(250,385);
curveVertex(270,380);
curveVertex(300,400);
curveVertex(308,403);
curveVertex(308,403);
endShape();

// bottom lip
beginShape();
curveVertex(200,400);
curveVertex(200,400);
curveVertex(250,420);
curveVertex(300,400);
curveVertex(300,400);
endShape();

// hair
// left side
line(230,115,210,60);
line(210,113,160,35);
beginShape();
curveVertex(30,530);
curveVertex(30,530);
curveVertex(20,150);
curveVertex(30,60);
curveVertex(100,10);
curveVertex(250,50);
curveVertex(250,50);
endShape();

// right side
line(265,116,330,30);
line(310,100,370,25);
beginShape();
curveVertex(250,50);
curveVertex(250,50);
curveVertex(300,12);
curveVertex(400,10);
curveVertex(480,100);
curveVertex(490,200);
curveVertex(480,510);
curveVertex(480,510);
endShape();

Grading

Grades will be based on the following criteria.

10% creativity and aesthetics
20% image and source files and formats
10% image size
50% use of primitives (see requirements above)
10% documentation of code