Hello all, Thanks to whoever it was who recommended Jon Millington's excellent book, _Curve Stitching_. I love it! (By the way, I purchased mine from Amazon.com.) I just got the book today, but I've already had some fun "stitching" some of the projects in Logo. I haven't tried to translate any of the Qbasic programs yet. I have just tried to do some of the circle projects from scratch. Frankly, I was put off a little when I saw the trig functions in the Qbasic programs. Not that that is bad, it's just that I work with elementary and middle school kids. I would rather work things out with math that they are likely to know--at least at first. Anyway here are my efforts so far. I offer these not as good programming examples (heavens, no!), but more as an invitation to find improvements. I worked these out first in PowerMath Logo (much like LogoWriter), and then copied them over to UCBLogo. The last three procedures (cg, clearnames, and setc) are just to provide compatibilty. Cardioid is on page 44 and Nephroid in on page 45. ===============Curving Stitching Procedures Follow================ to cardioid cg st init setcircle 100 72 make "t 0 repeat 36 [make "t :t + 1 stitch :t :t * 2] repeat 36 [make "t :t + 1 stitch :t (:t - 36) * 2] end to nephroid cg st init setcircle 100 72 make "t 0 setc 2 repeat 24 [make "t :t + 1 stitch :t :t * 3] repeat 24 [make "t :t + 1 if (:t > 36) [setc 5] stitch :t (:t - 24) * 3] repeat 24 [make "t :t + 1 stitch :t (:t - 48) * 3] end to placepoint dot output pos end to dot pd fd 0 pu end to setplace pu make "pointlist se :pointlist butlast list placepoint [] end to setline :length :n pu repeat :n [fd :length / :n make "pointlist se :pointlist butlast list placepoint []] end to setcircle :radius :n pu rt 360 / :n repeat :n [ fd :radius make "pointlist se :pointlist butlast list placepoint [] bk :radius rt 360 / :n] end to stitch :a :b pu setpos item :a :pointlist seth towards item :b :pointlist pd setpos item :b :pointlist pu end to init clearnames make "pointlist [] end ;The following 3 procedures are to provide compatibility between LogoWriter and UCBLogo to cg cs end to clearnames erns end to setc :color setpencolor :color end Charles T. Smith Professional Educator and Logo Maniac 535 Cap Au Gris Troy, MO 63379 314-528-7074 mailto:MrChuc@math.fan.org http://math.fan.org/~turtle_family --------------------------------------------------------------- Please post messages to the Logo forum to logo-l@gsn.org. Mail questions about the list administration to logofdn@gsn.org. To unsubscribe send unsubscribe logo-l to majordomo@gsn.org.
Global SchoolNet Foundation -
Linking Kids Around the World!
Copyright GSN - All Rights Reserved
- Comments
& Questions
Visit GSN's
Global
Schoolhouse for more exciting learning resources!
Search our Site
-
Home