Aliasing? (was Re: Spiral)
Chris
nospam at [127.0.0.1]
Fri May 31 03:22:06 EDT 2002
In article <3CF6B93D.8E607A23 at engcorp.com>, Peter Hansen
<peter at engcorp.com> writes
>Chris wrote:
>> I've written a small QBASIC program which draws a spiral. Here is the
>> code:
>> SCREEN 12
>> CLS
>> FOR t = 1 TO 400 STEP .01
>> x = .5 * t * COS(t)
>> y = .5 * t * SIN(t)
>> PSET (x + 320, y + 240)
>> NEXT t
>> I noticed that it generated some interesting patterns, probably as a
>> result of rounding errors. These can be explored further by making the
>> spiral tighter.
>This sounds a lot like a moire pattern, which is an aspect of the
>phenomenon called "aliasing". I found a reasonable explanation of this
>and some examples in this PDF:
>http://www-2.cs.cmu.edu/afs/andrew/scs/cs/15-463/pub/www/notes/aliasing.pdf
>With pixelized graphical output devices, aliasing manifests itself
>as strange optical patterns formed when you have closely spaced adjacent
>lines which are not vertical or horizontal, and the effect becomes
>even more pronounced with certain kinds of curves, perhaps such as
>your spirals.
Peter - that's fascinating - thanks. I haven't come across Fourier
Transforms since crystallography at university! Very interesting.
I love these unpredictable visual effects.
--
Chris
More information about the Python-list
mailing list