procedures for YEHUDA'S ROBE
This MicroWorlds project is a slight modification of a program developed by Yehuda Katz using MSWLogo. It has been adapted by Wendy Petti.
For more information, please contact:
Yehuda Katz yehuka@softhome.net
Wendy Petti wpetti@mathcats.com
* * * * * * * * * *
Yehuda's original "robe" procedures, written for MSWLogo
to main
Wendy Petti's "robe" adaptation, written for MicroWorlds,
requiring three buttons (samples, go, stopall), two textboxes
(x_value, y_value), and two sliders (size?, multiple).
The black background with x and y axes has been preserved with
the "freezebg" command.
to go
cs ht setpc 4
pu draw 0 -.9
end
to draw :x :y
dot se :x :y
draw 18-:y-abs :x :x
end
to dot :ll
setpos :ll
setpixel pencolor
end
* * * * * * * * * * *
cg ht setc 10
setpensize 2
pu draw x_value y_value
end
to draw :x :y
dot :x :y
setc color + .1
draw size? - :y - abs multiple / 100 * :x :x
end
to dot :x :y
setpos se :x :y
pd fd 1 pu
end
to samples
announce [Once the show has started, it won't stop unless you
click "stopall." It is worth watching!
So sit back and enjoy the show!]
sample1
sample2
sample3
sample4
sample5
sample6
sample7
sample8
sample9
end
to sample1
text1, ct showtext settext1 [sample 1]
setx_value 0
sety_value -.9
setsize? 18
setmultiple 100
launch [go]
wait 260 hidetext
cancel [go]
end
to sample2
text1, ct showtext settext1 [sample 2]
setx_value 60
sety_value 6.2
setsize? 18
setmultiple 100
launch [go]
wait 80 hidetext
cancel [go]
end
to sample3
text1, ct showtext settext1 [sample 3]
setx_value 70
sety_value 6.2
setsize? 18
setmultiple 100
launch [go]
wait 270 hidetext
cancel [go]
end
to sample4
text1, ct showtext settext1 [sample 4]
setx_value 50
sety_value -.9
setsize? 18
setmultiple 80
launch [go]
wait 80 hidetext
cancel [go]
end
to sample5
text1, ct showtext settext1 [sample 5]
setx_value 50
sety_value 1.1
setsize? 30
setmultiple 67
launch [go]
wait 400 hidetext
wait 50
cancel [go]
end
to sample6
text1, ct showtext settext1 [sample 6]
setx_value 50
sety_value -.9
setsize? 18
setmultiple 127
launch [go]
wait 250 hidetext
cancel [go]
end
to sample7
text1, ct showtext settext1 [sample 7]
setx_value 50
sety_value -.9
setsize? 10
setmultiple 100
launch [go]
wait 200 hidetext
cancel [go]
end
to sample8
text1, ct showtext settext1 [sample 8]
setx_value 0
sety_value -.9
setsize? 18
setmultiple 115
launch [go]
wait 265 hidetext
cancel [go]
end
to sample9
text1, ct showtext settext1 [sample 9]
setx_value 0
sety_value -.9
setsize? 18
setmultiple 125
launch [go]
wait 310 hidetext
cancel [go]
end
to startup
text1, hidetext
cg
setx_value 0
sety_value -.9
setsize? 18
setmultiple 100
announce [Click on "samples" to see 9 different figures drawn with
colored dots, controlled by changing the 4 variables. You will
see the numbers change in the textboxes and on the sliders for
each sample figure. Some of the samples take awhile to evolve.]
announce [Please don't try to change the variables while the show
is running, but after it is over, you can change the variables and
click "go" to experiment. Use decimal numbers for the y_value.
You can use negative numbers, too. (Now click OK or hit Enter.)]
end