LOGO-L> Logo 15-Word Challenge Update 
Author Message
 LOGO-L> Logo 15-Word Challenge Update

Quote:

>For example, Yehuda's Square Spiral program uses PX and WRAP mode to produce
>a suprising effect:
>   px for[x 1 1000000][fd :x rt 90]

What a gem, it's beautiful, thanks Yehuda!

Quote:
>Change the 90 to 89.99 and you'll get a completely different effect.

Thanks for the tip, Keith. Here is another variation on the theme:-

make "x 1
repeat 150 [fd :x rt 89 make "x :x + 1]

-- Bill Kerr
---------------------------------------------------------------





Tue, 12 Oct 1999 03:00:00 GMT  
 LOGO-L> Logo 15-Word Challenge Update

Some time ago I posted a stupid comment. Nobody has corrected me and
may be it was the best way - just to ignore it.
Nevertheless I'd like to correct my mistake.

Quote:

> > Date:          Thu, 24 Apr 1997 02:29:52 -0400 (EDT)

> > Subject:       LOGO-L> Logo 15-Word Challenge Update

> > Here is an update on the Logo 15-Word Challenge.

>> [...]
> > MSW Logo allows the PX (PENREVERSE) command which causes the pen to reverse
> > the background color. This is very useful in producing complex moire patterns
> > with very few commands.

> I'm afraid, MSW Logo works somewhat different.
>[...]
> So what you say is correct when the pen is black and the background
> is white  and vice versa, but not for any color combination.

Sorry, MSW Logo does exactly what was told there - in px mode the pen
reverses the backgroung color in it's path.

Sending this last (I think) message for today, I can't but recall the
lines of one famous Russian poet Anna Akhmatova. In translation they
might sound like these:
"... I've taught women to speak... How can I force them to keep
silence?" :-)

Olga.

---------------------------------------------------------------





Fri, 15 Oct 1999 03:00:00 GMT  
 LOGO-L> Logo 15-Word Challenge Update

Quote:

> Some time ago I posted a stupid comment. Nobody has corrected me and
> may be it was the best way - just to ignore it.
> Nevertheless I'd like to correct my mistake.


> > > Date:          Thu, 24 Apr 1997 02:29:52 -0400 (EDT)

> > > Subject:       LOGO-L> Logo 15-Word Challenge Update

> > > Here is an update on the Logo 15-Word Challenge.

> >> [...]
> > > MSW Logo allows the PX (PENREVERSE) command which causes the pen to reverse
> > > the background color. This is very useful in producing complex moire patterns
> > > with very few commands.


> > I'm afraid, MSW Logo works somewhat different.
> >[...]
> > So what you say is correct when the pen is black and the background
> > is white  and vice versa, but not for any color combination.

> Sorry, MSW Logo does exactly what was told there - in px mode the pen
> reverses the backgroung color in it's path.

Sorry I did not catch that.
Note that when MSWLogo reverses colors it is inverting the number
that the color represents.

For example:

white is [255 255 255] or in binary [11111111 11111111 11111111]
black is [  0   0   0] or in binary [00000000 00000000 00000000]

So when you invert white (all 1's) you get black (all 0's).

red   is [255   0   0] or in binary [11111111 00000000 00000000]

What's the invert of red? Cyan

Cyan  is [  0 255 255] or in binary [00000000 11111111 11111111]

One more:

Some color xxx is [  8  16  32] or in binary [00001000 00010000
00100000]

and it's invert is:

Invert of color xxx is [247  239  223] or in binary [11110111 11101111
11011111]

To calculate what that color is given the original:

Invert of color xxx is (list 255-8  255-16  255-32)
or using bit operations
Invert of color xxx is (list bitand (bitnot 8) 255  bitand (bitnot 16)
255  bitand (bitnot 32) 255)

The point is you can predict or test (using PIXEL command) for the
inverted color.

Quote:
> Sending this last (I think) message for today, I can't but recall the
> lines of one famous Russian poet Anna Akhmatova. In translation they
> might sound like these:
> "... I've taught women to speak... How can I force them to keep
> silence?" :-)

> Olga.

> ---------------------------------------------------------------




--
===============================================================
George Mills

http://www.softronix.com
The www page contains some very powerful educational software.
Our single most important investment is our kids.

---------------------------------------------------------------





Fri, 15 Oct 1999 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. LOGO-L> Logo 15-Word Challenge Update

2. LOGO-L> Logo 15-word challenge update

3. LOGO-L> Logo 15-Word Challenge Update

4. LOGO-L> Re: Logo 15-Word Challenge

5. LOGO-L> Logo 15-Word Challenge

6. LOGO-L> Logo 15-Word Challange Update

7. LOGO-L> Re: 15-Word Challenge

8. LOGO-L> 15-Word Challenge Final Report

9. LOGO-L> 15-Word Challenge WINNERS

10. LOGO-L> 15-Word Challenge Rule Revision

11. [Fwd: LOGO-L> 15-Word Challenge WINNERS]

12. LOGO-L> 15-Word Lissajous using repcount

 

 
Powered by phpBB® Forum Software