ObjectCount = 0
PixelCloud(k).active = 1
PixelCloud(k).size = 3
PixelCloud(k).acceleration.x = 0
PixelCloud(k).acceleration.y = 0
PixelCloud(k).velocity.x = 0
PixelCloud(k).velocity.y = 0
PixelCloud
(k
).position.x
= (RND - .5) * _WIDTH * .9 PixelCloud
(k
).position.y
= (RND - .5) * _HEIGHT * .9 CALL SetPixelShade
(k
, 0, 0, 255, 150)
whirlyparameter = 0
whirlyparameter
= whirlyparameter
+ ATN(1) / 10 IF whirlyparameter
> 16 * ATN(1) THEN whirlyparameter
= whirlyparameter
- 16 * ATN(1)
CALL CalculateInfluence
(k
)
dt = 2
damp = .25
brownian = .25
PixelCloud(i).velocity.x = damp * PixelCloud(i).velocity.x + dt * PixelCloud(i).acceleration.x
PixelCloud(i).velocity.y = damp * PixelCloud(i).velocity.y + dt * PixelCloud(i).acceleration.y
PixelCloud
(i
).position.x
= PixelCloud
(i
).position.x
+ dt
* PixelCloud
(i
).velocity.x
+ (RND - .5) * brownian
PixelCloud
(i
).position.y
= PixelCloud
(i
).position.y
+ dt
* PixelCloud
(i
).velocity.y
+ (RND - .5) * brownian
IF (PixelCloud
(i
).position.y
<= -_HEIGHT / 2 + 2 * PixelCloud
(i
).size
+ 1) THEN PixelCloud
(i
).position.y
= _HEIGHT / 2 - 2 * PixelCloud
(i
).size
IF (PixelCloud
(k
).active
= 1) THEN x = PixelCloud(k).position.x
y = PixelCloud(k).position.y
s = PixelCloud(k).size
CALL clinebf
(x
- s
, y
- s
, x
+ s
, y
+ s
, _RGBA(PixelCloud
(k
).shadered
, PixelCloud
(k
).shadegreen
, PixelCloud
(k
).shadeblue
, PixelCloud
(k
).shadealpha
))
t = whirlyparameter
x
= Level
(k
).position.x
+ Level
(k
).amplitude.x
* SIN(Level
(k
).frequency
* t
) y
= Level
(k
).position.y
+ Level
(k
).amplitude.y
* SIN(Level
(k
).frequency
* t
) s = Level(k).size
CALL clinebf
(x
- s
, y
- s
, x
+ s
, y
+ s
, _RGBA(Level
(k
).shadered
, Level
(k
).shadegreen
, Level
(k
).shadeblue
, Level
(k
).shadealpha
))
cpoint = TheReturn
PixelCloud(i).shadered = r
PixelCloud(i).shadegreen = g
PixelCloud(i).shadeblue = b
PixelCloud(i).shadealpha = a
Level(i).shadered = r
Level(i).shadegreen = g
Level(i).shadeblue = b
Level(i).shadealpha = a
mx
= xx
- xx
MOD (3 * 2.5) my
= yy
- yy
MOD (3 * 2.5) ObjectCount = ObjectCount + 1
Level(ObjectCount).size = 3
Level(ObjectCount).position.x = mx
Level(ObjectCount).position.y = my
Level(ObjectCount).amplitude.x = 0
Level(ObjectCount).amplitude.y = 70
Level(ObjectCount).frequency = .5
CALL SetObjectShade
(ObjectCount
, 0, 255, 0, 255)
FOR yy
= -250 - 70 TO -250 + 70 mx
= xx
- xx
MOD (3 * 2.5) my
= yy
- yy
MOD (3 * 2.5) ObjectCount = ObjectCount + 1
Level(ObjectCount).size = 3
Level(ObjectCount).position.x = mx
Level(ObjectCount).position.y = my
Level(ObjectCount).amplitude.x = 0
Level(ObjectCount).amplitude.y = 0
Level(ObjectCount).frequency = 0
CALL SetObjectShade
(ObjectCount
, 255, 0, 0, 255)
FOR yy
= -250 - 70 TO -250 + 70 mx
= xx
- xx
MOD (3 * 2.5) my
= yy
- yy
MOD (3 * 2.5) ObjectCount = ObjectCount + 1
Level(ObjectCount).size = 3
Level(ObjectCount).position.x = mx
Level(ObjectCount).position.y = my
Level(ObjectCount).amplitude.x = 0
Level(ObjectCount).amplitude.y = 0
Level(ObjectCount).frequency = 0
CALL SetObjectShade
(ObjectCount
, 255, 0, 0, 255)
sz = Level(ObjectCount).size
sz = 3
mb1 = 0
mb2 = 0
mb3 = 0
mb1 = -1
mx
= mx
- mx
MOD (sz
* 2.5) my
= my
- my
MOD (sz
* 2.5) ObjectCount = ObjectCount + 1
Level(ObjectCount).size = sz
Level(ObjectCount).position.x = mx
Level(ObjectCount).position.y = my
CALL SetObjectShade
(ObjectCount
, 255, 0, 0, 255) mb2 = -1
mx
= mx
- mx
MOD (sz
* 2.5) my
= my
- my
MOD (sz
* 2.5) ObjectCount = ObjectCount + 1
Level(ObjectCount).size = sz
Level(ObjectCount).position.x = mx
Level(ObjectCount).position.y = my
CALL SetObjectShade
(ObjectCount
, 0, 0, 255, 255) mb3 = -1
mx
= mx
- mx
MOD (sz
* 2.5) my
= my
- my
MOD (sz
* 2.5) ObjectCount = ObjectCount + 1
Level(ObjectCount).size = sz
Level(ObjectCount).position.x = mx
Level(ObjectCount).position.y = my
Level(ObjectCount).frequency = 1
CALL SetObjectShade
(ObjectCount
, 0, 255, 0, 255)
ObjectCount = ObjectCount - 1
IF (ObjectCount
< 0) THEN ObjectCount
= 0
x = PixelCloud(i).position.x
y = PixelCloud(i).position.y
dx = 2 * PixelCloud(i).size
dy = 2 * PixelCloud(i).size
WPoint(7) = cpoint(x - dx, y + dy)
WPoint(8) = cpoint(x, y + dy)
WPoint(9) = cpoint(x + dx, y + dy)
WPoint(4) = cpoint(x - dx, y)
WPoint(6) = cpoint(x + dx, y)
WPoint(1) = cpoint(x - dx, y - dy)
WPoint(2) = cpoint(x, y - dy)
WPoint(3) = cpoint(x + dx, y - dy)
xr
= (WRed
(6) - WRed
(4) + (WRed
(9) + WRed
(3)) / SQR(2) - (WRed
(7) + WRed
(1)) / SQR(2)) yr
= (WRed
(8) - WRed
(2) + (WRed
(7) + WRed
(9)) / SQR(2) - (WRed
(1) + WRed
(3)) / SQR(2)) 'xg = (WGreen(6) - WGreen(4) + (WGreen(9) + WGreen(3)) / SQR(2) - (WGreen(7) + WGreen(1)) / SQR(2))
'yg = (WGreen(8) - WGreen(2) + (WGreen(7) + WGreen(9)) / SQR(2) - (WGreen(1) + WGreen(3)) / SQR(2))
xg
= -(WGreen
(6) - WGreen
(4) + (WGreen
(9) + WGreen
(3)) / SQR(2) - (WGreen
(7) + WGreen
(1)) / SQR(2)) yg
= -10 * (WGreen
(8) - 0 + (WGreen
(7) + WGreen
(9)) / SQR(2) - (0 + 0) / SQR(2)) yg
= 10 * (0 - WGreen
(2) + (0 + 0) / SQR(2) - (WGreen
(1) + WGreen
(3)) / SQR(2)) xb
= (WBlue
(6) - WBlue
(4) + (WBlue
(9) + WBlue
(3)) / SQR(2) - (WBlue
(7) + WBlue
(1)) / SQR(2)) yb
= (WBlue
(8) - WBlue
(2) + (WBlue
(7) + WBlue
(9)) / SQR(2) - (WBlue
(1) + WBlue
(3)) / SQR(2)) x = xr + xg + xb
y = yr + yg + yb
IF (xr
^ 2 + yr
^ 2 > xb
^ 2 + yb
^ 2) AND (xr
^ 2 + yr
^ 2 > 15) THEN PixelCloud(i).shadered = PixelCloud(i).shadered + 128
IF (PixelCloud
(i
).shadered
>= 255) THEN PixelCloud
(i
).shadered
= 255 PixelCloud(i).shadeblue = PixelCloud(i).shadeblue - 128
IF (PixelCloud
(i
).shadeblue
<= 0) THEN PixelCloud
(i
).shadeblue
= 0
IF (xb
^ 2 + yb
^ 2 > xr
^ 2 + yr
^ 2) THEN PixelCloud(i).shadered = PixelCloud(i).shadered - 128
IF (PixelCloud
(i
).shadered
<= 0) THEN PixelCloud
(i
).shadered
= 0 PixelCloud(i).shadeblue = PixelCloud(i).shadeblue + 128
IF (PixelCloud
(i
).shadeblue
>= 255) THEN PixelCloud
(i
).shadeblue
= 255
y = y - 2 * (PixelCloud(i).shadered - PixelCloud(i).shadeblue) / 255
PixelCloud(i).acceleration.x = 0
PixelCloud
(i
).acceleration.x
= -x
/ SQR(x
* x
+ y
* y
) PixelCloud(i).acceleration.y = 0
PixelCloud
(i
).acceleration.y
= -y
/ SQR(x
* x
+ y
* y
)
PixelCloud(i).shadered = PixelCloud(i).shadered - 5
IF (PixelCloud
(i
).shadered
<= 0) THEN PixelCloud
(i
).shadered
= 0 PixelCloud(i).shadeblue = PixelCloud(i).shadeblue + 5
IF (PixelCloud
(i
).shadeblue
>= 255) THEN PixelCloud
(i
).shadeblue
= 255