Casey Muller - Problem Set #2
 
Part 1
p1.dbn
paper 7

Choose a single shade of a paper and render that shade.
 
Part 2
p2.dbn
repeat a 0 100
{
   repeat b 0 1
   {
      repeat c ((a)/10) 10
      {
         paper (a-a*b)
      }
   }
}


Create a sequence of shaded papers using the Repeat command as a short animation of brightness. For example
Repeat a 0 100
{
Paper a
}

 
Part 3
p3.dbn
forever
{
   repeat a 1 2
   {
      paper 100
   }
   repeat a 1 5
   {
      paper 0
   }
   repeat a 1 10
   {
      paper 100
   }
   repeat a 1 10
   {
      paper 0
   }
   repeat a 1 2
   {
      paper 100
   }
   paper 0
   repeat a 1 2
   {
      paper 100
   }
   repeat a 1 5
   {
      paper 0
   }
   repeat a 1 10
   {
      paper 100
   }
   repeat a 1 10
   {
      paper 0
   }
}

Create an animation of a sequence of shaded papers that evokes a sense of rhythm.
 
Part 4
p4.dbn
repeat a 0 20
{
   paper a
   paper a
   paper a
   paper a
   paper a
}
forever
{
   repeat a 20 60
   {
      paper a
      paper a
      paper a
      paper a
      paper a
   }
   repeat a 60 20
   {
      paper a
      paper a
      paper a
      paper a
      paper a
   }
}

Create an animation of a sequence of shaded papers that evokes a tranquil, sleepy image.
 
Part 5
p5.dbn
repeat a 3 5
{
   repeat b ((a-1)*5) (a*20)
   {
      paper (100-b)
      paper (100-b)
      paper (100-b)
   }
   repeat b (a*20) (a*5)
   {
      paper (100-b)
      paper (100-b)
      paper (100-b)
   }
}

Create an animation of a sequence of shaded papers that evokes a gradually increasing/heightening feeling.
 
Part 6
p6.dbn
pen 0
set a 2
repeat b (a*5) (a*20)
{
   paper (100-b)
   line b b (50+b/3) (70+b/4)
}
repeat a 3 5
{
   repeat b ((a-1)*20) (a*5)
   {
      paper (100-b)
      line b b (50+b/3) (70+b/4)
   }
   repeat b (a*5) (a*20)
   {
      paper (100-b)
      line b b (50+b/3) (70+b/4)
   }
}

Add a single line to the sequence, and let it fly in time. For instance
Repeat a 0 100
{
Paper 0
Line a 0 a 100
}

 
Part 7
p7.dbn
pen 0
set a 2
repeat b (a*5) (a*20)
{
   paper (100-b)
   line b b (50+b/3) (70+b/4)
   line 0 ((a-2)*33+33*(b-a*5)/(a*20-a*5)) ((a-2)*33+33*(b-a*5)/(a*20-a*5)) 0
}
repeat a 3 5
{
   repeat b ((a-1)*20) (a*5)
   {
      paper (100-b)
      line b b (50+b/3) (70+b/4)
      line 0 ((a-2)*33) ((a-2)*33) 0
   }
   repeat b (a*5) (a*20)
   {
      paper (100-b)
      line b b (50+b/3) (70+b/4)
      line 0 ((a-2)*33+33*(b-a*5)/(a*20-a*5)) ((a-2)*33+33*(b-a*5)/(a*20-a*5)) 0
   }
}

Add another line and let two lines fly in contrasting styles.
 
Part 8
p8.dbn
pen 0
set a 2
repeat b (a*5) (a*20)
{
   paper (100-b)
   line b b (50+b/3) (70+b/4)
   line 0 ((a-2)*33+100*(b-a*5)/(a*20-a*5)) ((a-2)*33+100*(b-a*5)/(a*20-a*5)) 0
}
repeat a 3 5
{
   repeat b ((a-1)*20) (a*5)
   {
      paper (100-b)
      line b b (50+b/3) (70+b/4)
      line 0 ((a-2)*33+100) ((a-2)*33+100) 0
   }
   repeat b (a*5) (a*20)
   {
      paper (100-b)
      line b b (50+b/3) (70+b/4)
      line 0 ((a-2)*33+100*(b-a*5)/(a*20-a*5)) ((a-2)*33+100*(b-a*5)/(a*20-a*5)) 0
   }
}

Let two lines fly in cooperative styles.
 
Part 9
p9.dbn
// Her program:

// This program makes a simple, vertical
// white line on almost black paper.
paper 85
pen 0
line 20 0 20 100

// My comments:
// What can I say? The line falls in the 
// middle of the left third of the page,
// which I vaguely remember is good from a
// design standpoint. The verticalness is
// a nice contrast.

Using Part 1 of Problem Set 1, you are asked to comment and improve on a colleague's work. The person you will choose is determined by your order in the pulldown menu of the main page. For example, Ben should comment on Bruce, Bruce on Nick, and all the way down to Hoeteck commenting on Ben (wrapped around). We don't have a form mechanism setup, so for now just put it inside your DBN buffer as a comment, and include a modified version of your colleague's program that reflects your suggestions.
 
Part 10
p10.dbn
// type program here
paper 0
// top half of lips
{
   repeat a 0 50
   {
      repeat b 50 100
      {
         pen (a*(3/2))
         {
            line 25 70 a 50
            line 75 70 b 50
         }
      }
   }
}
//bottom half of lips
{
   repeat c 0 25
   {
      repeat d 75 100
      {
         repeat e 30 50
         {
            pen (e*2)
            {
               line 25 30 c 50
               line d 50 75 30
               line 25 e 75 e
            }
         }
      }
   }
}

// My comments:

// Very very nice. Robot lips. The shading
// (the goal of the exercise) is very well
// done, it's easy to see intuitively that
// the light source is to the upper left, 
// and that there is a downwards slope to
// the bottom.

Do the same as above for Part 10 of Problem Set 1.