Assignment 1 - Interactive Polygon Builder

Sample Polygon 1

polygon1.obj

v -0.0833333 0.413333
v 0.296667 0.326667
v 0.24 -0.536667
v -0.403333 -0.29
v -0.0833333 0.413333
f 1 2 3 4

Sample Polygon 2

polygon2.obj

v -0.806667 0.166667
v -0.77 -0.23
v -0.7 -0.386667
v -0.606667 -0.436667
v -0.443333 -0.496667
v -0.3 -0.53
v -0.0666667 -0.556667
v 0.0966667 -0.543333
v 0.26 -0.5
v 0.426667 -0.363333
v 0.473333 -0.31
v 0.563333 -0.113333
v 0.636667 0.06
v 0.606667 0.28
v 0.52 0.503333
v 0.42 0.643333
v 0.05 0.766667
v -0.12 0.753333
v -0.323333 0.676667
v -0.433333 0.6
v -0.49 0.52
v -0.493333 0.39
v -0.45 0.223333
v -0.403333 0.0366667
v -0.336667 -0.1
v -0.23 -0.166667
v -0.123333 -0.18
v -0.00333333 -0.193333
v 0.133333 -0.19
v 0.236667 -0.106667
v 0.37 0.15
v 0.31 0.413333
v 0.116667 0.54
v -0.0433333 0.583333
v -0.183333 0.55
v -0.28 0.463333
v -0.303333 0.343333
v -0.263333 0.16
v -0.196667 0.0666667
v -0.0433333 0.0233333
v 0.0666667 0.05
v 0.16 0.166667
v 0.166667 0.293333
v 0.103333 0.356667
v 0.0133333 0.383333
v -0.0633333 0.39
v -0.126667 0.35
v -0.103333 0.243333
v 0.04 0.266667
v 0.03 0.186667
v -0.0766667 0.156667
v -0.186667 0.223333
v -0.176667 0.366667
v -0.11 0.466667
v -0.04 0.483333
v 0.11 0.433333
v 0.213333 0.353333
v 0.243333 0.206667
v 0.19 -0.0166667
v 0.00666667 -0.0766667
v -0.17 -0.04
v -0.296667 0.116667
v -0.386667 0.316667
v -0.4 0.47
v -0.286667 0.6
v -0.106667 0.656667
v 0.08 0.64
v 0.28 0.6
v 0.37 0.51
v 0.443333 0.32
v 0.51 0.08
v 0.416667 -0.196667
v 0.05 -0.37
v -0.193333 -0.353333
v -0.443333 -0.28
v -0.583333 -0.13
v -0.6 -0.00333333
v -0.643333 0.2
v -0.61 0.273333
v -0.643333 0.346667
v -0.676667 0.353333
v -0.593333 0.56
v -0.72 0.36
v -0.793333 0.35
v -0.873333 0.553333
v -0.83 0.346667
v -0.86 0.32
v -0.866667 0.293333
v -0.863333 0.256667
v -0.836667 0.233333
v -0.813333 0.233333
v -0.806667 0.166667
f 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91

Extra Credit

Dotted Lines

Showing the stipple pattern that creates a dotted line.

Dashed Lines

Showing the stipple pattern that creates a dashed line.

Color

You can cycle through several different colors by hitting the 'c' key.

Thicker Line Width

Increase line width by pressing the '+' key.

Effects Combination

Combination of the different effects that were implemented: color (yellow), pattern (dotted), and width (3 pixels).

Guidelines

Screenshot that shows guidelines that are displayed when you are dragging the vertex around. This helps alignment when you are drawing a more complicated picture.

Snap-To

This screenshot shows the effects of snap-to. Press the 's' key to toggle snap-to mode, which will allow you to easily draw horizontal or vertical lines. In this specific screenshot, the mouse is currently being held down and is dragging a vertex around. However, only the x coordinate is being used; the y coordinate is simply ignored. This is because the change in x is greater than the change in y - vertical line will be draw instead when the change in y is greater than the change in x.