[Home] [Back to Message Index]

Global SchoolNet - Automated Message Archive

Re: LOGO-L> Berkeley Logo




George Mills (mills@softronix.com)
Mon, 20 Jan 1997 10:40:11 -0500

Ricky Koons wrote:
>
> Under Berkeley Logo (for DOS), I expect the following commands will draw
> a square and then clear it. Actually the four sides of the square are
> cleared but the four coners remain visible. Why?
>
> TO SQ
> REPEAT 4 [ FD 120 RT 90]
> END
> SQ
> PENREVERSE
> SQ

See the posted reply I did just a couple days ago Titled
"Problems with DOT" The reason FD 0 works in UCBLogo
is the same reason a Square does not come out square with
a reverse pen (i.e. it draws the 4 corner twice). The
reason FD 0 does not work in MSWLogo is the same reason
a Square comes out Square in reverse pen (i.e. it draws
the 4 corners once).

You can compensate for it though:

to reversesquare :size
penreverse
repeat 4 [pu fd 1 pd fd :size-1 rt 90]
end

The above assumes a penwidth of 1.

SideBar:

Geometry is "analog" (continuous), the screen (pixels) is "digital"
or discrete. It's basically a Analog to Digital conversion
(Rasterization) artifact. And if you apply a common rule used in
electronics, you need greater than twice the sampling rate to not
loose any information. That is, Logo should really should use multiple
pixels as the lowest resolution, so it has more room to maneuver.

-- 
===============================================================
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.