This homework is due on January 21, 2010. and must be submitted as two files to the UNCA moodle activity HW 1.
Read pages 10 to 26 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, 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 .png of size 400×400 pixels. Submit the .png on Moodle. Remember to fill the space.
Create a program that draws your line drawing. 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.
Upload your source code (as a .pde text file) to Moodle.
Here is an example programmed by a previous instructor of this course.
// Susan Reiser's face code // 1-19-2009 // This program draws my face. size(300,300); noFill(); stroke(0); smooth(); //turns on antialiasing //hair bezier(74.5, 49, 29, 98, 87, 100, 87, 100); bezier(110.5, 20, 66, 39, 103, 75, 103, 75); bezier(122, 47, 122, 47, 113, 16, 142, 11); bezier(168, 49, 168, 49, 165, 15, 208, 29); bezier(122, 47, 122, 47, 113, 16, 142, 11); bezier(88, 65, 80, 127, 124, 102, 127, 99); bezier(144, 95, 144, 95, 81, 93, 132, 49); bezier(165, 40, 111, 64, 161, 97, 161, 97); bezier(173, 90, 173, 86, 177, 37, 216, 58); bezier(208, 47, 208, 47, 231, 42, 241, 73); bezier(201, 72, 201, 72, 211, 60, 218, 86); bezier(182, 89, 182, 89, 219, 120, 235, 90); bezier(235, 103, 235, 103, 245, 100, 248, 90); bezier(204, 116, 205, 120, 235, 140, 249, 106); bezier(218, 137, 218, 137, 234, 189, 258, 150); bezier(105, 126, 96, 142, 72, 144, 64, 109); bezier(54, 116, 51, 147, 75, 139, 75, 139); bezier(54, 150, 64, 213, 88, 160, 88, 160); //eyes //left bezier(111, 162, 117, 153, 132, 152, 143, 162); bezier(111, 162, 122, 168, 143, 162, 143, 162); //right bezier(171, 161, 186, 145, 201, 152, 202, 158); bezier(171, 161, 171, 161, 190, 163, 202, 158); //nose ***** bezier(99, 150, 99, 150, 155, 120, 150, 185); bezier(150, 185, 134, 190, 143, 202, 143, 202); //right eyebrow bezier(169, 150, 169, 150, 176, 133, 214, 143); //outer lip bezier(125, 216, 146, 213, 167, 213, 191, 216); bezier(125, 216, 160, 261, 191, 216, 191, 216); //inner lip bezier(125, 217, 148, 220, 167, 222, 191, 216); bezier(125, 217, 162, 245, 191, 216, 191, 216); //ears bezier(225, 204, 225, 204, 235, 216, 245, 165); bezier(77, 178, 77, 178, 78, 216, 91, 207); //profile bezier(219, 139, 227, 158, 225, 182, 225, 182); bezier(225, 182, 225, 182, 225, 218, 219, 228); bezier(219, 228, 162, 319, 104, 251, 96, 226); bezier(96, 226, 88, 193, 86, 176, 88, 165); //neck line(99, 234, 100, 290); line(204, 250, 194, 290); line(197, 277, 218, 286 ); bezier(99, 266, 99, 266, 94, 271, 92, 271);
Grades will be based on the following criteria.
10% | creativity and aesthetics |
10% | image and source file formats |
10% | image size |
50% | use of primitives (see requirements above) |
20% | documentation of code |