LOGO

LOGO is a simple program language developed to help teach kids about arithmetic and geometry. Basically you get a turtle and tell it how to move and it leaves a line where it goes. Anyways I find it very useful for forming polygons and polygrams.

LOGO Primer
MSWLogo (Freeware Program)

Here's the function for a basic polygon

to polygon :size :side
repeat :side [fd :size rt 360/:side]
end

Heptagrams Here's the function for a polygram. Skip refers to the number of points the line will be reflected. For example the heptagrams here are reflected at points 3 and 2. Just play around with the skip values to get the idea. While doing so some will just generate a normal polygon. In those cases the polygram is the polygon repeated and rotated, e.g. a hexagram is just two triangles. I've racked my head on trying to have it draw those automatically just its not worth it. For those it's best to transfer the polygons to another program and rotate them manually.

to polystar :size :side :skip
repeat :side [fd :size rt (:skip*360/:side)]
end

Here is the program set for the Candlestick figure of the Zelator Grade.

to candlestick :size
repeat 7 [
   setpencolor [255 255 255]
   fd :size
   rt 360/7/2
   setpencolor [0 0 0]
   stick :size/2
   rt 360/7/2
]
rt 360/7/2
repeat 7 [
   fd :size*1.8
   rt 360*2/7
]
rt 360/7/2
repeat 7 [
   fd :size*2.25
   rt 360*3/7
]
end

to stick :size
circle :size
lt 360/3/2
triangle :size*13/15
rt 360/3/2
end

to circle :diameter
repeat 360 [fd :diameter*PI/360 lt 1]
end

to triangle :size
repeat 3 [fd :size lt 360/3]
end

To transfer the images from LOGO press the PrintScrn key to get a screen shot--press Alt+PrntScrn for just the current window. Then open an image editor and Paste it in (Ctrl+V or go to menus Edit -> Paste). Press Alt+PrinScrn for just the current window. Note that PrntScrn works for all programs not just LOGO.

Home
Last updated on 06-Jun-2006 11:00 AM