| Bruce Chang
 - Problem Set #1 
 | 
| Part 1 
 |  p1.dbn | 
 paper 0
pen 100
line 20 10 80 90
 
 | 
 |  | Create a program to draw a carefully chosen one line on a paper of your choice. 
 | 
| Part 2 
 |    p2.dbn | 
 paper 0
pen 100
//3 images generated by setting x=0,-3,7
set x 7
//mouth
line (30+x) 30 (70-x) 30
//right eye
line (40-x/2) (70-x/2) (40+x/2) (60+x/2)
//left eye
line (60+x/2) (70-x/2) (60-x/2) (60+x/2)
//Many facial expressions are generated 
//by controlling one variable.  Give me
//more lines and more variables :)
 
 | 
 |  | Create a program that uses one variable as a means to control a set of 3 lines. Capture 3 instances of the graphic (A,B,C). 
 | 
| Part 3 
 |  p3.dbn | 
 paper 0
repeat y 30 80
{
   pen (y*2-50)
   line (y-10) y y (y-10) 
}
//assumed "single filled triangle" to be
//"1 filled triangle" and not
//"solid-color triangle"
 | 
 |  | Create a program to draw a single filled rectangle. Again, choose carefully. 
 | 
| Part 4 
 |  p4.dbn | 
 paper 0
set x 10
set z 90
repeat y 30 70
{
   pen z
   line x y z y
   set x (x+1)
   set z (z-1)
}
//assumed "single filled triangle" to be
//"1 filled triangle" and not
//"solid-color triangle"
//shaded isosceles
 | 
 |  | Create a program to draw a single filled triangle. Use your good judgement. 
 | 
| Part 5 
 |  p5.dbn | 
 paper 0
repeat y 40 (-6)
{
   pen (y+30)
   line 5 40 (55+y) (y+40)
}
//assumed "single filled triangle" to be
//"1 filled triangle" and not
//"solid-color triangle"
//shaded scalene with no edge parallel to
//image boundary
 | 
 |  | Think of all the ways you can draw a filled triangle, and choose one. Utilize the properties of the drawing method you choose, to create a single filled triangle. 
 | 
| Part 6 
 |  p6.dbn | 
 Paper 100
set [50 53] 0
set [47 51] 0
set [53 51] 0
set [48 48] 0
set [52 48] 0
//possible emotions:
//focused
//reserved/shy
//"pent"-up anger
 
 | 
 |  | Set 5 dots on a paper of your choice. Evoke an emotion with your choice in placement of dots. 
 | 
| Part 7 
 |  p7.dbn | 
 Paper 100
repeat v 1 10
{
   set [(v*3+20) (v*10)] 20
}
repeat w 1 10
{
   set [(w*(-3)+80) (w*10)] 20
}
repeat x 1 10
{
   set [(x*(-13)+80) (x*11)] 20
}
repeat y 1 10
{
   set [(y*11-9) 66] 20
}
repeat z 1 10
{
   set [(z*13+20) (z*11)] 20
}
//Frustrated because I can't use floats.
//otherwise, I could get more dots per
//line segment.
 | 
 |  | Create a representational picture (i.e. something that looks like something) using just 8 (at maximum) dotted lines. 
 | 
| Part 8 
 |  p8.dbn | 
 repeat x 0 100
{
   repeat y 0 100
   {
      set [x y] ((x-50)*(x-50)/8+(y-50)*(y-50)/16)
   }
}
//nested loop that covers all 100^2 pixels
//and generates a shaded ellipse
 | 
 |  | Using a nested loop, fill the entire field with the value of some calculation that can be appreciated. Do not use the Line command. 
 | 
| Part 9 
 |  p9.dbn | 
 Paper 75
repeat x 0 50
{
   repeat y 0 50
   {
      set [(x*x/16) (y*y/8-x)] ((x*x/32)+(y*y/12))
   }
}
//bi-directional exponential growth and
//bi-directional gradient
 | 
 |  | Using a nested loop, create a stippled pattern of dots that can be enjoyed for its complexity.  Do not use the Line command. 
 | 
| Part 10 
 |  p10.dbn | 
 paper 100
repeat x 0 10
{
   repeat y 0 50
   {
      pen (x+4*y/3)
      line (x*30) 0 (y+2*x) 100
   }
}
//pages of a book (w/o text) :)
 | 
 |  | Using the Line command, and a (few) nested loop, create an image that evokes a three-dimensional feeling through shading. 
 |