Hoeteck Wee - Problem Set #1
 
Part 1
p1.dbn
Paper 50
Pen 0
Line 10 20 80 70


Create a program to draw a carefully chosen one line on a paper of your choice.
 
Part 2
p2.dbn
Paper 50
// type program here
Pen 0
Set A 0
// bottom line
Line 15 (10+A) 85 (30+A)
// left line
Line (15+A) (10-A) (40+A) (85-A)
// right line
Line (85-A) (30-A) (40-A) (85-A)

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 45
// type program here
Repeat A 10 90
{
  Pen (A-5)
  Line A 20 A 60
}


Create a program to draw a single filled rectangle. Again, choose carefully.
 
Part 4
p4.dbn
Paper 40
Repeat A 0 80
{
  Pen (A*A/90)
  Line (A+10) (30-(A/4)) (A+10) (30+(2*A/3))
}



Create a program to draw a single filled triangle. Use your good judgement.
 
Part 5
p5.dbn
Paper 60
Repeat A 0 45
{
   Pen A
   Line (A+15) (40-(A/2)) (A+15) (40+(2*A/3))
}
Repeat A 45 82
{
   Pen A
   Line (A+15) (2*(A-45)+20) (A+15) (40+(2*A/3))
}


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 70
Set [50 29] 0
Set [59 30] 0
Set [41 30] 0
Set [32 34] 0
Set [68 34] 0


Set 5 dots on a paper of your choice. Evoke an emotion with your choice in placement of dots.
 
Part 7
p7.dbn
Paper 0
// supposed to be bow and tie :)
Pen 100
Line 50 75 42 50
Line 42 50 50 15  
Line 50 15 58 50
Line 58 50 50 75
Line 42 78 58 72
Line 42 72 58 78
Line 42 72 42 78
Line 58 72 58 78


Create a representational picture (i.e. something that looks like something) using just 8 (at maximum) dotted lines.
 
Part 8
p8.dbn
Paper 100
Repeat A (-25) 25
{
   Repeat B (-25) 25
   {
      Set [(A+50) (B+50)] ((A*A+B*B)/5) 
   }
}


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 0
Repeat A 0 25
{
   Repeat C 1 16
   {
      Repeat B 0 5
      {
         Set [(4*A) (4*B+C*5)] 100
      }
   }
}

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 40
Repeat A 0 30
{
   Repeat B 0 30
   {
      Pen (2*A+10)
      Line (A+20) 20 (A+20) 50
      Line (A+20) 50 (A+30) 60
   }
}
Repeat A 0 10
{
   Repeat B 0 30
   {
      Pen (70-(6*A))
      Line (A+50) (A+20) (A+50) (A+50)
   }
}

Using the Line command, and a (few) nested loop, create an image that evokes a three-dimensional feeling through shading.