Data update

This commit is contained in:
Ingy döt Net 2026-02-01 16:33:20 -08:00
parent 5150844a7d
commit 4bb20c9b71
7735 changed files with 38060 additions and 199180 deletions

View file

@ -1,35 +0,0 @@
procedure Circle
( Picture : in out Image;
Center : Point;
Radius : Natural;
Color : Pixel
) is
F : Integer := 1 - Radius;
ddF_X : Integer := 0;
ddF_Y : Integer := -2 * Radius;
X : Integer := 0;
Y : Integer := Radius;
begin
Picture (Center.X, Center.Y + Radius) := Color;
Picture (Center.X, Center.Y - Radius) := Color;
Picture (Center.X + Radius, Center.Y) := Color;
Picture (Center.X - Radius, Center.Y) := Color;
while X < Y loop
if F >= 0 then
Y := Y - 1;
ddF_Y := ddF_Y + 2;
F := F + ddF_Y;
end if;
X := X + 1;
ddF_X := ddF_X + 2;
F := F + ddF_X + 1;
Picture (Center.X + X, Center.Y + Y) := Color;
Picture (Center.X - X, Center.Y + Y) := Color;
Picture (Center.X + X, Center.Y - Y) := Color;
Picture (Center.X - X, Center.Y - Y) := Color;
Picture (Center.X + Y, Center.Y + X) := Color;
Picture (Center.X - Y, Center.Y + X) := Color;
Picture (Center.X + Y, Center.Y - X) := Color;
Picture (Center.X - Y, Center.Y - X) := Color;
end loop;
end Circle;

View file

@ -1,5 +0,0 @@
X : Image (1..16, 1..16);
begin
Fill (X, White);
Circle (X, (8, 8), 5, Black);
Print (X);

View file

@ -1,33 +0,0 @@
local canvas = require "canvas"
local function trunc(x) return x >= 0 ? math.floor(x) : math.ceil(x) end
local function circle(c, cx, cy, r, col)
local d = trunc((5 - r * 4) / 4)
local x = 0
local y = r
repeat
c:set(cx + x, cy + y, col)
c:set(cx + x, cy - y, col)
c:set(cx - x, cy + y, col)
c:set(cx - x, cy - y, col)
c:set(cx + y, cy + x, col)
c:set(cx + y, cy - x, col)
c:set(cx - y, cy + x, col)
c:set(cx - y, cy - x, col)
if d < 0 then
d += 2 * x + 1
else
d += 2 * (x - y) + 1
y -= 1
end
++x
until x > y
end
local c = canvas.new(400, 400)
c:fill(0xffffff) -- white background
-- Draw a blue circle with centre at (200, 200) and radius 100.
circle(c, 200, 200, 100, 0xff0000)
io.contents("mybmp.bmp", c:tobmp()) -- save to a bitmap file