[LUG.ro Mix] A NEW KIND OF NOISE (fwd)
Horacio Castellini
lugro-mix@lugro.org.ar
Tue, 18 May 2004 08:59:04 -0300 (ART)
Lo vuelvo a re-enviar a ver si "granitecanyon" no jode... Esto está en
basic pero puede llevarse a C y usar las xlib...
---------- Forwarded message ----------
Date: Fri, 14 May 2004 15:56:32 GMT
From: Roger Bagula <tftn@earthlink.net>
Newsgroups: sci.fractals, sci.nonlinear
Subject: A NEW KIND OF NOISE
This was an idea I had that is based on the rabbit and the turtle race
( one of the Greek paradoxes):
Every time the probability gets near one , you divide it by about two
and start over. The result is that most of the noise is very nearly zero
( so much so that true basic see the first part of the 2000 array as zero).
The "spikes" of noise are near the end.
I use a random choice of the array and a random sign to make it
a symmetrical noise.
The irrational rotation gives it the size randomness within each scale.
For those familiar with noise theory this is more like a Levy "flight"
noise.
True BASIC PROGRAM:
SET MODE "color"
SET WINDOW 0,1922,0,1062
SET BACKGROUND COLOR "white"
SET COLOR "black"
LET irr=Pi-3
RANDOMIZE
REM for plot k=1920
LET k=1920
! LET k=65
LET sum=0
DIM a( 2000)
PRINT" SIERPINSKI RANDOM NOISE: a new kind or randomness"
PRINT" by Roger L. Bagula 14 May 2004©"
FOR n=1 to k
REM IRRATIONAL ROTATION BASED ON PI
LET a(n)=Mod(n*irr,1)
REM sums the array as a probability
LET sum=sum+a(n)
IF sum>=1 then
LET oldsum=sum
LET sum=0
REM when ever the probability get near one it is scaled back (
VERY NEAR A SCALE OF 2 !)
FOR j=1 to n
LET a(j)=a(j)/(1+oldsum)
LET Sum=Sum+a(j)
NEXT j
END IF
NEXT n
LET a(k+1)=1-sum
LET sum1=0
LET sum2=0
FOR i=1 to k+1
LET sum1=sum1+a(i)
REM sign picked at random"
IF rnd>0.5 then LET s=1 else LET s=-1
REM number from the scaled noise array picked at random
PLOT i,s*a(1+Int(Rnd*(k+1)))*50000+1024/2;
REM If a(i)<>0 then the entropy is taken as this sum ( from a Ulam book)
IF a(i)>0 then LET sum2=sum2-a(i)*log(a(i))
NEXT i
PRINT "entropy",sum2
PRINT "last" , a(k+1)
END
--
Respectfully, Roger L. Bagula
tftn@earthlink.net, 11759Waterhill Road, Lakeside,Ca 92040-2905,tel:
619-5610814 :
URL : http://home.earthlink.net/~tftn
URL : http://victorian.fortunecity.com/carmelita/435/