Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
19
Task/Polyspiral/Zkl/polyspiral.zkl
Normal file
19
Task/Polyspiral/Zkl/polyspiral.zkl
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
w,h:=640,640;
|
||||
bitmap:=PPM(w,h,0xFF|FF|FF); // White background
|
||||
angleIncrement:=(3.0).toRad();
|
||||
while(True){
|
||||
r,angle:=0.0, 0.0;
|
||||
ao,len,inc:=w/2, 2.5, angleIncrement+(130.0).toRad();
|
||||
foreach c in (128){
|
||||
s,a:=r + len, angle + inc;
|
||||
x,y:=r.toRectangular(angle);
|
||||
u,v:=r.toRectangular(a);
|
||||
c=c.shiftLeft(21) + c.shiftLeft(10) + c*8; // convert c to a RGB
|
||||
bitmap.line(ao+x,ao+y, ao+u,ao+v, c);
|
||||
r,angle=s,a;
|
||||
}
|
||||
bitmap.writeJPGFile("polyspiral.zkl.jpg");
|
||||
bitmap.fill(0xFF|FF|FF); // White background
|
||||
angleIncrement=(angleIncrement + 0.05);
|
||||
Atomic.sleep(3);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue