Catherine Foo - Problem Set #1
 
Part 1
p1.dbn
// type program here
paper 89
pen 12
line 21 78 34 16

Create a program to draw a carefully chosen one line on a paper of your choice.
 
Part 2
p2.dbn
// type program here
set H 90
paper (100-H*2)
pen (H+10)
line 20 (H+10) (H/2) 90
pen (H+20)
line 80 (H*2) 30 H
pen (30+H)
line H (H-10) 80 100

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
// type program here
paper 80
repeat a 20 77
{
   line a 20 a 77
}

Create a program to draw a single filled rectangle. Again, choose carefully.
 
Part 4
p4.dbn
// type program here
paper 33
pen 88
repeat g 44 88
{
   repeat h ((g/2)+44) g
   {
      set [(g-20) h] 88
   }
}
repeat g 8 18
{
   repeat h (g*3) (g+15)
   {
      set [(g+5) (h+10)] 88
   }
}

Create a program to draw a single filled triangle. Use your good judgement.
 
Part 5
p5.dbn
// type program here
paper 100
repeat a 0 100
{
repeat b 0 a
{
set [a b] ((a+b)/2)
}
}

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
// type program here
paper 50
set [20 20] 100
set [35 35] 80
set [50 50] 65
set [70 70] 35
set [90 90] 20

Set 5 dots on a paper of your choice. Evoke an emotion with your choice in placement of dots.
 
Part 7
p7.dbn
// type program here
paper 100
pen 0
set dh 50
set dv 15
repeat a 0 40
{
set [((a+dh)) (a*a/25+dv)] 0
}

repeat a 0 40
{
set [((dh-a)) (a*a/25+dv)] 0
}

repeat a 0 30
{
set [(a*3+dh-45) (30-a*a/22+55+dv)] 0
set [(a*3+dh-45) (30-a*a/25+45+dv)] 0
set [(a*3+dh-45) (30-a*a/27+35+dv)] 0
}

repeat a 0 6
{
set [dh (19+dv+(a*a/2))] 0
}

repeat a 0 5
{
set [(dh+5-(2*a)) (dv+10)] 0
}

Create a representational picture (i.e. something that looks like something) using just 8 (at maximum) dotted lines.
 
Part 8
p8.dbn
// type program here
repeat a 0 100
{
repeat b 0 100
{
set [a b] (2700/((50-a)*(50-a)+(50-b)*(50-b)+1))
}
}

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
// type program here
paper 50
repeat a 0 100
{
   repeat b 0 100
   {
      set c ((50-a)*(50-a)+(50-b)*(50-b))
      set d (1+(c/2)-((c*c)/8)+((c*c*c)/16)-(5*(c*c*c*c)/128))
      set [a b] d
   }
}

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
// type program here
paper 100
set x 1
repeat a 0 25
{
pen ((a*5)/3+25)
line (a+50) (20+(((a+x)*(a+x))/100)) (a+50) (60+(((a+x)*(a+x))/100))
}
repeat a 0 25
{
pen (25-((a*5)/3))
line (50-a) (20+(((x+a)*(x+a))/100)) (50-a) (60+(((a+x)*(x+a))/100))
}
repeat a 0 25
{
pen (50-((a*5)/3+25))
line (a+50) (60+(((a+x)*(a+x))/100)) (a+50) (62+(10-(((a+x)*(a+x))/100)))
}
repeat a 0 25
{
pen (50-(25-((a*5)/3)))
line (50-a) (60+(((x+a)*(x+a))/100)) (50-a) (62+(10-(((a+x)*(x+a))/100)))
}


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