Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var
- t, bmp, x, y: Integer;
- a, b, r: Extended;
- cnv: TCanvas;
- begin
- t := GetSystemTime;
- bmp := BitmapFromString(360, 360, '');
- DisplayDebugImgWindow(360, 360);
- cnv := GetBitmapCanvas(bmp);
- with cnv do
- for y := 0 to 360 do
- for x := 0 to 360 do
- begin
- if (x = 180) or (y = 180) then
- Continue;
- a := Abs(180 - x);
- b := Abs(180 - y);
- r := 90 - Tan(b / a);
- Pixels[x, y] := HSLToColor(a * 2, b * 2, r / 3.6);
- end;
- SafeDrawBitmap(bmp, GetDebugCanvas, 0, 0);
- FreeBitmap(bmp);
- t := GetSystemTime - t;
- Writeln('Took ' + IntToStr(t) + 'ms to generate image');
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement