• Welcome to Dark Bit Factory & Gravity.
 

STAR BURSTS . . . PRETTY.

Started by bikemadness, January 16, 2011

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

bikemadness

Okay, I'm hooked again.

Trawling through old unfinished ideas.

I could look at this all day.


open window 640,512
ang=pi/180
l=3
sp=5
bursts=18
stars=8
dim l(stars),sp(stars),b(stars)
dim x(stars),y(stars),a(stars)
dim burst(stars),bursts(stars)
dim rr(stars),gg(stars),bb(stars)
for c=1 to stars
b(c)=c*4
x(c)=int(ran(51))*10
y(c)=int(ran(64))*10
rr(c)=ran(1000)+200
gg(c)=ran(1000)+200
bb(c)=ran(1000)+200
burst(c)=360/bursts
next c
repeat
setdrawbuf vm
vm=1-vm
setdispbuf vm
clear window
for c=1 to stars
b(c)=b(c)+1
setrgb 1,rr(c)/b(c),gg(c)/b(c),bb(c)/b(c)
for a=1 to bursts
for d=1 to 2.5 step.5
m=cos(burst(c)*ang*(a+d))*(b(c)*(l/d))+y(c)
n=sin(burst(c)*ang*(a+d))*(b(c)*(l/d))+x(c)
o=cos(burst(c)*ang*(a+d))*((b(c)*(l/d))+(sp/2))+y(c)
p=sin(burst(c)*ang*(a+d))*((b(c)*(l/d))+(sp/2))+x(c)
'line m,n to o,p
dot m,n
fill circle m,n,2
next d
next a
if b(c)*l>100 then
b(c)=1
x(c)=int(ran(51))*10
y(c)=int(ran(64))*10
rr(c)=ran(1000)+200
gg(c)=ran(1000)+200
bb(c)=ran(1000)+200
endif
next c
until (1=0)


Have a Yahappy day.
I don't know what is wrong with the world - but I know how to fix it.

rain_storm

simple but effective. Nice job keeping the code compact.

Challenge Trophies Won:

benny!

[ mycroBLOG - POUET :: whatever keeps us longing - for another breath of air - is getting rare ]

Challenge Trophies Won:

Jim

#3
Benny, this is yabasic, there's no way to make an executable.
You have to use the emulator
You will need to disable the 'force flush rate' setting in the options to see anything with this one.

Jim
Challenge Trophies Won:

Shockwave

This looks surprisingly good considering the simplicity of the code.

It's easily portable so maybe it would be cool to code a version of this in some other language and apply some blurring to it too.

Nice one Bikemadness. K+
Shockwave ^ Codigos
Challenge Trophies Won:

Wenlock

Oddly the circles have to  be at least radius 3 to be visible on the PS3.

Wenlock
YABASIC ROOLZ!

Galileo