On Thursday 08 April 2010 10:32:18 pm Bert Freudenberg wrote:
On 08.04.2010, at 18:52, K. K. Subramaniam wrote:
On Thursday 08 April 2010 02:47:13 pm Bert Freudenberg wrote:
In fact, turtle graphics might be the one intrinsically useful application of the repeat tile. If that is so, how about moving it to the pen category?
Repeat is convenient outside of pen drawing.
Do you have an example?
A couple of them.
I have seen kids drag turnBy:5 tiles multiple times into a script, then try to use the repeat tile before they stumble on the fact that repeat 5 turnBy: 5 is same as turnBy: 25. Understanding angular magnitudes seems to take more 'cooking' time than that for linear magnitudes. Is it because one has to run one's eye over 'empty space' to gage angles? I don't know.
When placing elements along a circle, it is easier to use repeat tile than to dup individual tiles.
self heading: 0. 12 timesRepeat: [ self dosomething. self turnBy: 30 ]. or self heading: 0. 60 timesRepeat: [ self dosomething. self turnBy: 6 ].
(Sorry for delayed response. It is summer vacation time for my kids).
Subbu