Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,16 @@
|
|||
fcn circle(x0,y0,r,rgb){
|
||||
x:=r; y:=0; radiusError:=1-x;
|
||||
while(x >= y){
|
||||
__sSet(rgb, x + x0, y + y0);
|
||||
__sSet(rgb, y + x0, x + y0);
|
||||
__sSet(rgb,-x + x0, y + y0);
|
||||
__sSet(rgb,-y + x0, x + y0);
|
||||
self[-x + x0, -y + y0]=rgb; // or do it this way, __sSet gets called as above
|
||||
self[-y + x0, -x + y0]=rgb;
|
||||
self[ x + x0, -y + y0]=rgb;
|
||||
self[ y + x0, -x + y0]=rgb;
|
||||
y+=1;
|
||||
if (radiusError<0) radiusError+=2*y + 1;
|
||||
else{ x-=1; radiusError+=2*(y - x + 1); }
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
ppm:=PPM(200,200,0xFF|FF|FF);
|
||||
ppm.circle(100,100,40,00); // black circle
|
||||
ppm.circle(100,100,80,0xFF|00|00); // red circle
|
||||
|
||||
ppm.write(File("foo.ppm","wb"));
|
||||
Loading…
Add table
Add a link
Reference in a new issue