Page 1 of 1

Rings

Posted: Wed Jan 21, 2015 4:58 pm
by DrChip
REM
REM Rings

graphics

centerx = Screen_Width()/2
centery = Screen_Height()/2

pi=3.1415
points = 20
size = 160
m=.1
mm=2
pstep = PI*2/points
ang = ang + PI/180

loop:
refresh off
graphics clear 0,0,0
mm=mm+m
IF mm>200 OR mm <1 THEN
m = -m
END IF

pstep = pi*2/points
ang = ang + PI/180
FOR p = 1 TO points
ang = ang + pstep
x1 = COS(ang)*size + centerX
y1 = SIN(ang)*size + centerY
x2 = COS(ang +2*pstep)*size + centerX
y2 = SIN(ang +2*pstep)*size + centerY
draw size 1
draw COLOR mm/500,mm/100+.20, mm/(rnd(255)+1)
draw circle x1,y1 to x2,y2
NEXT p
refresh on
GOTO loop

Re: Rings

Posted: Wed Jan 21, 2015 5:22 pm
by Mr. Kibernetik
Very interesting!
It could be a border for application icon! :)