Get 20M+ Full-Text Papers For Less Than $1.50/day. Start a 14-Day Trial for You or Your Team.

Learn More →

A proposed modification to the absolute coordinates of Logo

A proposed modification to the absolute coordinates of Logo o22~ A Proposed Modification to the Coordinates of L o g o Absolute Dept. of David Rosenthal M a t h and C o m p u t e r Ithaca College I t h a c a ~ NY 1 4 8 5 0 Science Suppose a procedure c a l l e d SQ has b e e n d e f i n e d in L O G O as FORWORD 20 R I G H T 90 F O R W O R D 20 R I G H T 90 F O R W O R D 20 R I G H T 90 HOME. If one t y p e s D R A W SQ a s q u a r e w i l l a p p e a r on the s c r e e n . On the o t h e r h a n d if one t y p e s DRAW P E N U P F O R W O R D 10 P E N D O W N SQ t h e n we do not get a s q u a r e b e c a u s e the H O M E c o m m a n d m o v e s the t u r t l e b a c k to the o r i g i n . T h i s m e t h o d of o p e r a t i o n is certainly reasonable. Unfortunately it t e n d s to d e f e a t the capability of b e i n g a b l e to use a l r e a d y d e f i n e d pictures to build new pictures. This problem can be s o l v e d by c h a n g i n g the m e a n i n g of S E T X Y , S E T H E A D I N G , and H O M E . Namely, when a procedure is e n t e r e d a n e w c o o r d i n a t e s y s t e m is d e f i n e d u s i n g the t u r t l e s t a t e as " h o m e " . W h e n the p r o c e d u r e is e x i t e d the coordinate s y s t e m is r e s t o r e d to its p r e v i o u s state . For example, in the s t a t e m e n t DRAW PENUP FORWORD 10 P E N D O W N SQ u p o n entering the p r o c e d u r e SQ the t u r t l e s t a t e is x:O, y = 1 0 , and heading=O. H e n c e the H O M E c o m m a n d of SQ w o u l d m o v e t h e t u r t l e to x=O, y = 1 0 , w i t h h e a d i n g = O . The e f f e c t is t h a t a s q u a r e w o u l d a p p e a r 10 s t e p s a b o v e the o r i g i n . On t h e s u r f a c e it s e e m s as if t h i s m e t h o d is c o m p l e x . But it r e a l l y is q u i t e s i m p l e and y o u n g c h i l d r e n h a v e no d i f f i c u l t y with it. Why? The p o i n t is t h a t w h e n a p r o c e d u r e is b e i n g d e v e l o p e d H O M E , S E T X Y and S E T H E A D I N G all b e h a v e as t h e y n o r m a l l y do in LOGO (i.e. H O M E m o v e s the t u r t l e to x=O, y=O, and h e a d i n g = O ) . When a picture is used i n s i d e of a n o t h e r p i c t u r e it is s i m p l y translated or r o t a t e d d e p e n d i n g u p o n the t u r t l e s t a t e at the t i m e the p r o c e d u r e is c a l l e d . T h i s is r e a l l y w h a t the c h i l d e x p e c t s it to do. Because the n o r m a l L O G O c o o r d i n a t e s y s t e m is s t i l l s o m e t i m e s useful, it w o u l d be c o n v e n i e n t to h a v e a c c e s s to t h i s m e t h o d also. (For e x a m p l e , to r e i n t i a l i z e , some LOGO programs simply call themselves i n s t e a d of p o p p i n g b a c k out to the a p p r o p r i a t e level. So we m i g h t r e a l l y n e e d to p o s i t i o n t h e t u r t l e at a b s o l u t e x=O, y = O . ) O n e way to a c c o m p l i s h t h i s is to p r o v i d e a p a i r of commands w h i c h t o g g l e the s y s t e m b e t w e e n the " r e l a t i v e " coordinate s y s t e m and t h e L O G O " a b s o l u t e " coordinate system. Dan N o v a k , from Ibhaca College, and m y s e l f h a v e b u i l t a LOGO-like s y s t e m and we h a v e t r i e d t h e s e i d e a s out b o t h in t h e elemetary s c h o o l s a n d at a s u m m e r c o m p u t e r camp. The relative coordinate syste~ works very well. We t h i n k it is w o r t h p r o v i d i n g such a feature ir LOGO. SIGPLAN Notices, Vi9 #ii, November http://www.deepdyve.com/assets/images/DeepDyve-Logo-lg.png ACM SIGPLAN Notices Association for Computing Machinery

A proposed modification to the absolute coordinates of Logo

ACM SIGPLAN Notices , Volume 19 (11) – Nov 1, 1984

Loading next page...
 
/lp/association-for-computing-machinery/a-proposed-modification-to-the-absolute-coordinates-of-logo-VLu50BipHK

References

References for this paper are not available at this time. We will be adding them shortly, thank you for your patience.

Publisher
Association for Computing Machinery
Copyright
Copyright © 1984 by ACM Inc.
ISSN
0362-1340
DOI
10.1145/948606.948609
Publisher site
See Article on Publisher Site

Abstract

o22~ A Proposed Modification to the Coordinates of L o g o Absolute Dept. of David Rosenthal M a t h and C o m p u t e r Ithaca College I t h a c a ~ NY 1 4 8 5 0 Science Suppose a procedure c a l l e d SQ has b e e n d e f i n e d in L O G O as FORWORD 20 R I G H T 90 F O R W O R D 20 R I G H T 90 F O R W O R D 20 R I G H T 90 HOME. If one t y p e s D R A W SQ a s q u a r e w i l l a p p e a r on the s c r e e n . On the o t h e r h a n d if one t y p e s DRAW P E N U P F O R W O R D 10 P E N D O W N SQ t h e n we do not get a s q u a r e b e c a u s e the H O M E c o m m a n d m o v e s the t u r t l e b a c k to the o r i g i n . T h i s m e t h o d of o p e r a t i o n is certainly reasonable. Unfortunately it t e n d s to d e f e a t the capability of b e i n g a b l e to use a l r e a d y d e f i n e d pictures to build new pictures. This problem can be s o l v e d by c h a n g i n g the m e a n i n g of S E T X Y , S E T H E A D I N G , and H O M E . Namely, when a procedure is e n t e r e d a n e w c o o r d i n a t e s y s t e m is d e f i n e d u s i n g the t u r t l e s t a t e as " h o m e " . W h e n the p r o c e d u r e is e x i t e d the coordinate s y s t e m is r e s t o r e d to its p r e v i o u s state . For example, in the s t a t e m e n t DRAW PENUP FORWORD 10 P E N D O W N SQ u p o n entering the p r o c e d u r e SQ the t u r t l e s t a t e is x:O, y = 1 0 , and heading=O. H e n c e the H O M E c o m m a n d of SQ w o u l d m o v e t h e t u r t l e to x=O, y = 1 0 , w i t h h e a d i n g = O . The e f f e c t is t h a t a s q u a r e w o u l d a p p e a r 10 s t e p s a b o v e the o r i g i n . On t h e s u r f a c e it s e e m s as if t h i s m e t h o d is c o m p l e x . But it r e a l l y is q u i t e s i m p l e and y o u n g c h i l d r e n h a v e no d i f f i c u l t y with it. Why? The p o i n t is t h a t w h e n a p r o c e d u r e is b e i n g d e v e l o p e d H O M E , S E T X Y and S E T H E A D I N G all b e h a v e as t h e y n o r m a l l y do in LOGO (i.e. H O M E m o v e s the t u r t l e to x=O, y=O, and h e a d i n g = O ) . When a picture is used i n s i d e of a n o t h e r p i c t u r e it is s i m p l y translated or r o t a t e d d e p e n d i n g u p o n the t u r t l e s t a t e at the t i m e the p r o c e d u r e is c a l l e d . T h i s is r e a l l y w h a t the c h i l d e x p e c t s it to do. Because the n o r m a l L O G O c o o r d i n a t e s y s t e m is s t i l l s o m e t i m e s useful, it w o u l d be c o n v e n i e n t to h a v e a c c e s s to t h i s m e t h o d also. (For e x a m p l e , to r e i n t i a l i z e , some LOGO programs simply call themselves i n s t e a d of p o p p i n g b a c k out to the a p p r o p r i a t e level. So we m i g h t r e a l l y n e e d to p o s i t i o n t h e t u r t l e at a b s o l u t e x=O, y = O . ) O n e way to a c c o m p l i s h t h i s is to p r o v i d e a p a i r of commands w h i c h t o g g l e the s y s t e m b e t w e e n the " r e l a t i v e " coordinate s y s t e m and t h e L O G O " a b s o l u t e " coordinate system. Dan N o v a k , from Ibhaca College, and m y s e l f h a v e b u i l t a LOGO-like s y s t e m and we h a v e t r i e d t h e s e i d e a s out b o t h in t h e elemetary s c h o o l s a n d at a s u m m e r c o m p u t e r camp. The relative coordinate syste~ works very well. We t h i n k it is w o r t h p r o v i d i n g such a feature ir LOGO. SIGPLAN Notices, Vi9 #ii, November

Journal

ACM SIGPLAN NoticesAssociation for Computing Machinery

Published: Nov 1, 1984

There are no references for this article.