to banner setlabelfont[[MS Sans Serif] -20 0 0 400 0 0 0 0 3 2 1 34] setpc 1 label "www.numeracysoftware.com end to border cs pu fd 250 lt 90 fd 350 rt 180 pd setpc 1 setpensize[5 5] repeat 2[fd 700 rt 90 fd 500 rt 90] end to carret lt 90 bk 35 rt 90 end to carret2 lt 90 bk 50 rt 90 end to carret3 lt 90 bk 25 rt 90 end to clock :points :jump ifelse :points < 5 [print [The number of points must be at least 5.] Halt] [] ifelse :points < :jump [print [The jump must be less than the number of points.] Halt] [] cs ht pu lt 90 fd 150 rt 90 bk 50 setpencolor 0 setpensize[10 10] make "xpos (array :points 0) make "ypos (array :points 0) make "count 0 repeat :points[fd 1200/:points setitem :count :xpos xcor setitem :count :ypos ycor pd fd 0.5 bk 1 fd 0.5 pu rt 360/:points make "count :count + 1] setpensize[1 1] make "count 0 repeat :points + 1[wait 20 setxy item :count :xpos item :count :ypos pd make "count :count + :jump make "count remainder :count :points] end to clocks border pu fd 30 lt 90 bk 10 rt 90 setlabelfont[[MS Sans Serif] -20 0 0 400 0 0 0 0 3 2 1 34] setpc 4 fd 280 label [CLOCKS] bk 280 carret label [The clock faces in this activity don't have to have twelve points - you can] carret3 label [decide how many points they have.] carret label [The turtle moves around the clock, joining the points with straight lines.] carret3 label [But he doesn't have to visit every point.] carret3 label [He might visit every 2nd point, or every 3rd point, or every 5th point.] carret label [You choose how many points on the clock face and how the turtle visits them.] carret label [In the Commander Window type CLOCK followed by two numbers separated] carret3 label [by a space, and then press ENTER or click on the EXECUTE button.] carret label [For example] fd 270 label [CLOCK 10 3] bk 270 carret label [The first number is the number of points on the clock face (e.g. 10)] carret3 label [and the second number is how the turtle visits them (e.g. every 3rd point).] carret2 label [With 10 points, how many different patterns does the turtle produce?] carret label [What about other numbers of points?] carret fd 200 banner HT end Make "count 4 Make "xpos {-150 -131.45898 -96.191865 -47.650845 9.412545 69.412545 126.475936 175.016956 210.284071 228.82509 228.82509 210.284071 175.016956 126.475936 69.412545 9.412545 -47.650845 -96.191865 -131.45898 -150}@0 Make "ypos {9.999999 67.06339 115.60441 150.871525 169.412545 169.412545 150.871525 115.60441 67.06339 9.999999 -50 -107.06339 -155.60441 -190.871525 -209.412545 -209.412545 -190.871525 -155.60441 -107.06339 -49.999999}@0