A reiteration of my Problem 2 from Assignment 1. After seeing a lot of triangles, I wanted to have a little more fun with this simple problem. I attempted to draw a triangle in DBN without really drawing triangles. Here are three results!

My first attempt is something which I call: "Three pieces of paper that are haphazardly set down so that a triangle is formed!" After seeing Adrienne's portrait from Assignment 1, I noticed that part of the fun in DBN is watching the program draw. So I paid more attention to the order in which I drew things in order to make my drawings more entertaining.

My second attempt was to draw a triangle without actually using straight lines that make the edges of a triangle. (Hopefully you'll notice that I tried to make the process - in addition to the final product - more appealing by drawing in a logical fashion.)

I can't really take the credit for the last one, since I've seen this design somewhere else before. Still, it was tougher to implement in DBN than the previous two examples mostly because drawing a circle in DBN was a lot tougher than other polygons.

I actually used the Circle function on Page 146 of Design by Numbers to implement the circle. I did write a new CirclePixels function so that the circle would be filled in, rather than empty inside. The new function is as follows:

//Fills in the circle, rather than outline
Command CirclePixels CX CY DX DY V
{
Pen V
Line (CX-DX) (CY+DY) (CX-DX) (CY-DY)
Line (CX+DX) (CY+DY) (CX+DX) (CY-DY)
Line (CX+DY) (CY+DX) (CX+DY) (CY-DX)
Line (CX-DY) (CY+DX) (CX-DY) (CY-DX)
}