From N V Fitton, ideas to share with my students at Northern Virginia Community College, Alexandria campus.
I teach mathematics and computer science.

Friday, October 14, 2005

201 sample executables for Project 3

Here are sample executables to help you complete the StringArt project.

The first one, JustDots, shows the dots to be connected. Do the four corners first, then fill in the gaps evenly.

The second, Both, shows dots and lines connecting them. It's good to see both together. I made my dots and line-endings coincide, but that's just for show. When you do it you will see what I mean. You can include both or not in your show.

The third, JustLines, shows my finished product.

Each of my programs exhibits randomness in the choice of orientation (three ways), in the locations of the corners, and in the number of intermediate dots.

I cleaned up rounding error and unhappy landings outside the desired quadrants. The note in the corner is for my own reference: I produced it with a line similar to this:

g.drawMessage("H " + Integer.toString(n), x, y);

And I certainly didn't write everything at once! I wrote each version separately in teenitesy steps and then combined the results.

You could make add randomness with color, too. I chose to let that go for another day.

Your requirements: three kinds of string art, with some randomness in their execution, occurring in random order in an applet. Yours can be the same kinds of string art that I made or others; you have quite a lot of freedom here. I do want to see programs of comparable or greater complexity.

I got the applets to work OK again in Internet Explorer by doing Tools/ Internet Options/ Advanced, turning on Java v 1.5, and turning off all of the Microsoft VM choices.

0 Comments:

Post a Comment

<< Home