Racket Paint

Introduction

    This is the first fully functional GUI program I ever made. I wrote it in a functional programming language called Racket, using the graphics library "Picturing-Programs" by Stephen Bloch. Before I get into any more detail about the program, I'd like to share a little anecdote to explain its significance.

    In my first computer science class, my instructor (Johnny Martin) had the class use an IDE called Dr.Racket. With it, we were able to do some fun things with programming.

    First we learned about variables and started assigning pictures and shapes to them. It was pretty straight forward. Next we learned how to use functions to manipulate the variables. We could then do things like change the color, size, and orientation of the shapes. This made things a lot more interesting. Later on I think we got into animation but that's as far as we got in class.

    I however, went a little further, studying outside of class. I got really into it and figured out how to use mouse and keyboard input. This allowed me to make programs with a lot more functionality. Driven by intrigue, I started developing my own, more complex programs outside of class. This was one of them.

Functionality

    When you start the program, the help screen is shown so that you know the controls (shown in figure A). There is a color palette at the top of the window that can be used to change the color of the brush. To the right of the palette is a circle with a brush stroke sample in it. When the help screen is off, you may use the draw area. Lines are created through a series of overlapping dots. The space between each dot is determined by how fast the program is running. Making long and fast strokes exacerbates this issue. Other than that, everything works as detailed in the help screen.

Downloads