Voiko taidetta tehdä sattuman avulla?
Ehkä jonkinlaista, kun piirtää barin kahdeksaan paikkaan symmetrisesti.
program image;
uses graph, wincrt,sysutils;
var gd,gm : integer;
PathToDriver : string;
x,y,
dx,dy,
width,color,half : word;
PROCEDURE PutBar(a,b:word);
BEGIN
Bar(a-half,b-half,a+half,b+half);
END;
begin
Randomize;
gd:=detect;
gm:=0;
PathToDriver:=' ';
InitGraph(gd,gm,PathToDriver);
if GraphResult<>grok then
halt;
x:= trunc(GetMAxX/2);
y:= trunc(GetMAxY/2);
dx:=0;
dy:=0;
width:=5;
half:=trunc(width/2);
color:=0;
REPEAT
BEGIN
dx:=dx-width-1+(random(2*width+1)+1);
dy:=dy-width-1+(random(2*width+1)+1);
color:=Random(65535);
SetFillStyle(SolidFill,color);
PutBar(x+dx,y+dy); {let's draw}
PutBar(x-dx,y+dy); {the bar sym-}
PutBar(x-dx,y-dy); {metrically in}
PutBar(x+dx,y-dy); {eight places}
PutBar(x+dy,y+dx);
PutBar(x-dy,y+dx);
PutBar(x-dy,y-dx);
PutBar(x+dy,y-dx);
IF KeyPressed THEN halt(2);
if (dx>x) or (dx<-dx) THEN dx:=0;
if (dy>y) or (dy<-dy) THEN dy:=0;
END;
UNTIL FALSE;
CloseGraph;
end.En usko että nuo noin 1000 merkkiä ovat menneet tuohon järjestykseen sattuman johdosta.
Aihe on jo aika vanha, joten et voi enää vastata siihen.