Article View: comp.lang.logo
Article #228aspect ratio (was: LOGO riddle/task/something to think about)
From: Eyal Peleg
Date: Wed, 07 Oct 1992 00:27
Date: Wed, 07 Oct 1992 00:27
80 lines
2811 bytes
2811 bytes
In article <1992Sep30.231110.27259@discus.technion.ac.il> I wrote: >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 a most common answer was something like to solve_the_problem cs repeat 18 [pendown forward 4 penup forward 1] end and it was refered to as trivial on most LOGO implementation this does not work because of resolution problems the problem can be summorized by: 1 turtle step =/= 1 pixel and normaly they are not even multiples of each other (integer multiples) trying to solve it myself (i dont have an answer) on the logowriter CGA mode i wrote something like this: to drawit :ratio repeat 9 [pendown forward 4 * :ratio penup forward 1 * :ratio] end to goback :ratio pu back 45 * :ratio left 90 forward 2 right 90 end to test :from :upto :step if :from > :upto [stop] drawit :from goback :from test sum :from :step :upto :step end and tested it with test 0.7 2 0.05 and none of the lines looked as expected can someone please tell me how big is a pixel in turtle steps ?? (in logowriter CGA mode) and another question for those who wrote logowriter why wasnt .setaspect included ? i would appriciate any information regarding away to draw small drawings on logo i need to draw stuff about the size of 10*10 pixels and i just cant thanks eyal peleg
Technical Details
Message-ID:
<1992Oct7.002753.14062@discus.technion.ac.il>Path:
arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!zaphod.mps.ohio-state.edu!wupost!micro-heart-of-gold.mit.edu!bu.edu!wang!newsShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!zaphod.mps.ohio-state.edu!wupost!micro-heart-of-gold.mit.edu!bu.edu!wang!news From: s2874066@techst02.technion.ac.il (Eyal Peleg) Newsgroups: comp.lang.logo Subject: aspect ratio (was: LOGO riddle/task/something to think about) Message-ID: <1992Oct7.002753.14062@discus.technion.ac.il> Date: 7 Oct 92 00:27:53 GMT Sender: news@wang.com Organization: Technion, Israel Inst. of Technology Lines: 80