Thread View: comp.lang.logo
4 messages
4 total messages
Started by Eyal Peleg
Wed, 30 Sep 1992 23:11
LOGO riddle/task/thing to think about
Author: Eyal Peleg
Date: Wed, 30 Sep 1992 23:11
Date: Wed, 30 Sep 1992 23:11
30 lines
1423 bytes
1423 bytes
hi all,
Here is a little logo problem to think about,
I know its not simple to solve using LOGO WRITER in CGA mode,
I am not sure how hard will it be on other logo implementations.
Here goes:
Your mission if you will choose to accept it is:
Draw a vertical line that starts from home [0 0] and ends at [0 90],
This line should not be a continuous one but should be 4 pixels on and 1 off
something like "---- ---- ---- ---- ---- ...."
When you answer please include the following:
1) What logo did you use
(what resolution both screen and logo window
for example LOGOWRITER 2.0 CGA (640x200) (+-160,+-95) )
2) Your solution/s
3) How much time it took you to solve reach them
4) How many and what kind of other (not working) solutions did you try
5) your opinion of this problem
EASY STREET :
if its too difficult for you try the same but horizontal (heading 90)
THOUGH ONES :
if its too simple for you try the same with heading 45 deg
GOOD LUCK
eyal peleg
s2874066@techst02.technion.ac.il
Re: LOGO riddle/task/thing to think about
Author: Brian Harvey
Date: Thu, 01 Oct 1992 13:59
Date: Thu, 01 Oct 1992 13:59
18 lines
1564 bytes
1564 bytes
s2874066@techst02.technion.ac.il (Eyal Peleg) writes: > Draw a vertical line that starts from home [0 0] and ends at [0 90], > This line should not be a continuous one but should be 4 pixels on and 1 off > something like "---- ---- ---- ---- ---- ...." Boy, when I read this message the first time I thought "that's trivial, what's the deal?" But when I actually tried it I learned two things, one was the fencepost problem about pixels, and the other is that it's even harder in Berkeley Logo, because it tries to set the aspect ratio according to what the graphics hardware says is right, and for my CGA laptop that comes out some non-integer ratio. (Berkeley Logo tries to arrange things so that FD 100 fits within the splitscreen graphics area. For CGA that turns out to mean that one vertical turtle step is only (about) half a screen pixel. If I make it exactly half a screen pixel, I can get the desired dotted line with PD FD 2 PU FD 3!! If I use the setting that Berkeley Logo comes up with on its own, there's no way I can get uniform dotted lines. You can't win.)
Re: LOGO riddle/task/thing to think about
Author: dale.e.parson
Date: Thu, 01 Oct 1992 16:20
Date: Thu, 01 Oct 1992 16:20
45 lines
3226 bytes
3226 bytes
In article <1af08oINN3cc@agate.berkeley.edu> bh@anarres.CS.Berkeley.EDU (Brian Harvey) writes: >s2874066@techst02.technion.ac.il (Eyal Peleg) writes: >> Draw a vertical line that starts from home [0 0] and ends at [0 90], >> This line should not be a continuous one but should be 4 pixels on and 1 off >> something like "---- ---- ---- ---- ---- ...." > >Boy, when I read this message the first time I thought "that's trivial, what's >the deal?" But when I actually tried it I learned two things, one was the >fencepost problem about pixels, and the other is that it's even harder in >Berkeley Logo, because it tries to set the aspect ratio according to what the >graphics hardware says is right, and for my CGA laptop that comes out some >non-integer ratio. > >(Berkeley Logo tries to arrange things so that FD 100 fits within the >splitscreen graphics area. For CGA that turns out to mean that one >vertical turtle step is only (about) half a screen pixel. If I make it >exactly half a screen pixel, I can get the desired dotted line with >PD FD 2 PU FD 3!! If I use the setting that Berkeley Logo comes up with >on its own, there's no way I can get uniform dotted lines. You can't win.) No problem at all with Berkeley Logo on a sparc running X11. I bet my kids wish they had this machine. I haven't had a chance to run it on my goofy almost EGA card at home. I wrote the driver for that one, & I suspect the resolution at 640 x 400 is good enough, but the dithered colors are another matter. At certain angles they come unglued, giving underlying undithered colors. I've considered tripling the lines widths to get rid of incomplete dithering on some line angles, but I've decided the real solution is to: 1) stay with skinny lines & use clean colors (I've got 8 clean & 8 dithered with that board), the clean ones suffice for most of our uses 2) spring for a real machine with EVGA one of these days (is EVGA at the top or superseded? has the Christmas price drop come yet? it's been half year since I last checked, and my sparc is spoiling me for at home work) CGA is like tiling. The turtle drops bricks on the sidewalk. Dale Parson, Bell Labs, dale@mhcnet.att.com ---------------------------------------------------------------------- | "These words are too solid, they don't move fast enough | | to catch the blur in the brain that flies by, and is gone..." | ---------------------------------------------------------------------- | Suzanne Vega | ----------------------------------------------------------------------
Re: LOGO riddle/task/thing to think about
Author: David Kressen
Date: Mon, 12 Oct 1992 21:00
Date: Mon, 12 Oct 1992 21:00
9 lines
851 bytes
851 bytes
Ok, Harvey: That's what I did, and you are absolutely right! My nomitor is 13" RGB; resolution 640 horiz pixels by 480 "vertical lines" (don't they call 'em pixels both ways?) Scaling down to the portion of the screen used by the turtle, that's 495 X 221 pixels - exactly the same as turtlesteps, after allowing for your "fencepost" effect. Thanks for your clear explanation of the 3/2 vs 4/1 fd count! Dave Kressen
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads