Many functions in UCBLogo/MSWLogo (and perhaps other logos) will take a varying number of arguments. To force a function to use an alternative number of arguments use ()'s. The non-paren form of ARCTAN assumes one argument but will alternatively take the 2 argument form. to sq :n op :n * :n end to staredge :tangle :slope rt :tangle fd :slope lt 2 * :tangle fd :slope rt :tangle end to stargon :n :R :notch local "side local "height local "tangle local "slope make "side 2 * :R * (sin 180 / :n) make "height :notch * :R * (cos 180 / :n) make "tangle (arctan :height :side / 2) make "slope sqrt (sq (:side / 2) + sq :height) pu fd :R rt 180 - (90 * (:n - 2) / :n) pd repeat :n[(staredge :tangle :slope) rt 360 / :n] lt 180 - (90 * (:n - 2) / :n) pu bk :R pd end OMihich@aol.com wrote: > > Hi, > Working through Visual Modeling I got stucked in the stargon procedure on page > 140. The problem is probably with arctan which takes one input. > Here are the procedures: > > to sq :n > op :n * :n > end > > to staredge :tangle :slope > rt :tangle > fd :slope > lt 2 * :tangle > fd :slope > rt :tangle > end > > to stargon :n :R :notch > local "side > local "height > local "tangle > local "slope > make "side 2 * :R * (sin 180 / :n) > make "height :notch * :R * (cos 180 / :n) > make "tangle arctan :height :side / 2 > make "slope sqrt (sq (:side / 2) + sq :height) > pu > fd :R > rt 180 - (90 * (:n - 2) / :n) > pd > repeat :n[(staredge :tangle :slope) rt 360 / :n] > lt 180 - (90 * (:n - 2) / :n) > pu > bk :R > pd > end > > Thank you for your help. > > Orlando > --------------------------------------------------------------- > 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. -- =============================================================== George Mills email: mills@softronix.com http://www.softronix.com The www page contains some very powerful educational software. Our single most important investment is our kids. --------------------------------------------------------------- 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