Errors from the DBN Book
Changes are denoted in boldface type


Page 51, example 4
Printing error, first printing

Paper 0
Set G 100
Pen G
Set H 100
Line H 0 H 100


Page 52, third paragraph
Printing error, first printing

Remember that the computer reads the program in sequence; when A is referenced in the first program . . .

Page 70, first paragraph and examples 1, 2, and 3
Printing error, first printing

Addition is primarily used to shift the position of a point either upward or to the right. For example, if a horizontal line rests at 40 points from the bottom of the sheet, adding 10 to the vertical dimensions of the starting and ending points raises the line upward to 50 points.
Paper 0
Pen 100
// horizontal line at 40
Line 30 40 70 40

Paper 0
Pen 100
// horizontal line shifted to 50
Line 30 50 70 50

Paper 0
Pen 100
//
// left endpoint of the horizontal
// line shifted by 10 to the right
//
Line 40 50 70 50


Page 85, example 2
Printing error, first printing

Paper 0
// 5 dots  5 examples
Set [45 30] 25
Set [55 30] 65
Set [65 30] 100
Set [75 30] 70
Set [85 30] 40


Page 101, example 4
Printing error, first printing

Paper 0
// shifted horizontally
Repeat A 0 100
{
	Set [((A/2)+20) A] A
}


Page 107, last paragraph
Printing error, first printing

The fact that a dotted line can be created using a Repeat distinguishes it from the result of . . .

Page 126, example 3
Error in program, first and second printings

Paper 50
Pen 0
Set C 0
Line 0 50 33 50
Same? C 100
{
	Pen 60
	Line 33 50 66 66
}
// if C is not 100 then link downwards
NotSame? C 100
{
	Pen 40
	Line 33 50 66 33
}
Pen 100
Line 66 33 100 33
Pen 30
Line 66 66 100 66


Page 126, example 4
Error in program, first and second printings

Paper 50
Pen 0
Set C 100
Line 0 50 33 50
Same? C 100
{
	Pen 60
	Line 33 50 66 66
}
// if C is not 100 then link downwards
NotSame? C 100
{
	Pen 40
	Line 33 50 66 33
}
Pen 100
Line 66 33 100 33
Pen 30
Line 66 66 100 66



Page 192, example 2
Error in program, first and second printing

Fast
Paper 100
Pen 0
// spread out flare positions
// and shade based upon height
Line 0 0 100 0
Forever
{ 
    Repeat A 1 26
    {
	Same? < Key A > 100
	{
		Set [A 0] ([A 0]+1)
		Set V (100-[A 0])
	    	Set [(A*3) [A 0]] V
	} 
    }
}


Page 246, example 1
Error in program, first printing

// Blinn spline approximation
Paper 0
Number BlSine A
{
   Set B 50
   Smaller? A 50
   {
    Smaller? A 25
    {
       	Set T (A*4)
	Set T2 (T*T)
	Set T3 (T*T*T)
	Set B (100-134*T2/10000+34*T3/1000000)
	Set B (B/2+50) 
    }
    NotSmaller? A 25
    {
	Set T ((50-A)*4)
	Set T2 (T*T)
	Set T3 (T*T*T)
	Set B (100-134*T2/10000+34*T3/1000000)
	Set B (50-B/2) 
    }
  }
  NotSmaller? A 50
  {
          Smaller? A 75
	  {
	    Set T ((A-50)*4) 
	    Set T2 (T*T)
	    Set T3 (T*T*T)
	    Set B (100-134*T2/10000+34*T3/1000000)
	    Set B (50-B/2)
	  }
	  NotSmaller? A 75
	  {
	    Set T ((100-A)*4)
	    Set T2 (T*T)
	    Set T3 (T*T*T)
	    Set B (100-134*T2/10000+34*T3/1000000)
	    Set B (B/2+50)
	  }
   }
   Value B
}
// draw it
Repeat C 0 100
{
     Set [C <BlSine C>] 100
}





 


 

Design By Numbers is Copyright 1999-2001, Massachusetts Institute of Technology.
DBN was developed by the Aesthetics and Computation Group at the MIT Media Laboratory.