[Thread Prev] [Thread Next]
I started out to do a little demo for a class and now I can't figure out how
to make this work (of course it grew from my original idea and that
complicates matters :-).
I would like the following program to draw an octagon and color it in using
the slider to set the size of the side of the octagon. That part works fine.
Then I decided I wanted it to draw 10 octagons in a row, each 10 steps larger
than the last. I cannot figure out how to set the slider bigger with each
iteration. The code is below and the project is attached. What am I missing?
to octagon
pd ht repeat 8 [fd slider1 rt 45]
pu rt 90 fd 2 * slider1 setc random 50 fill
setc "black home
end
to octagon2
repeat 10 [pd ht repeat 8 [fd slider1 rt 45]
pu rt 90 fd 2 * slider1 setc random 50 fill
setc "black home] set slider1 [slider1 + 10]
end
Attachment:
octagon slider.mw2
Description: Binary data
Previous by thread:
Morse Code
Next by thread:
RE: Octagon
To save an attachment to your computer, PC users should right-click (Mac users, click and hold the mouse button) on the link and then choose 'save target as' from the pop-up menu. A window will then pop up in which you can choose a location for the file.
|