Introduction to Digital Arts & Sciences
Fall, 2010
CAP 3027
HW 04
Summary
Modify DisplayImage.java so that...
- The title-bar describes the assignment (CAP 3027 2010 - HWxx - your name)
- The File menu has the following selections
- Directed random walk plant
- Exit
When the Directed random walk plant options is selected, the program shall
- Prompt the user for the image's size (height == width)
- Prompt the user for the number of stems
- Prompt the user for the number of steps per stem
- Prompt the user for the transmission probability [0.0,1.0]
- Prompt the user for the maximum rotation increment [0.0,1.0]
- Prompt the user for the growth segment increment
- Create a BufferedImage
- Set the background color to white
- Run the directed random walk plant algorithm discussed in class
- Display the image
Even if you know more, you are limited to using the techniques
covered up to this point in class.
Note
I'd suggest attacking this problem by working on one stem at a
time—don't start drawing the seond stem until the first is
finished—because it's a lot simpler to get a working
program that way. Then, if you have the time/inclination, save a
back-up copy (always save backup copies!), and modify your
program so that all the stems are "growing" at the same
time—i.e., every stem grows 1 step before growing their
second step, etc. This will give you a head start on a future
version where we'll be animating the plant's growth.
This website is an original work, Copyright © 2010 by
Dave Small. All rights reserved.