Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function TPFromOval(cx, cy, mx, my: Integer): TPoint;
- var
- m: Integer;
- begin
- m := Random(my + 1);
- if (RBool) then
- m := -m;
- Result.y := cy + m;
- m := Random(Round(Sqrt(Sqr(my) - Sqr(m)) * (mx / my)) + 1);
- if (RBool) then
- m := -m;
- Result.x := cx + m;
- end;
- var
- t: TPoint;
- begin
- Writeln('Oh hey!');
- DisplayDebugImgWindow(200, 200);
- Wait(50);
- GetDebugCanvas.Rectangle(50, 50, 150, 150);
- repeat
- t := TPFromOval(100, 100, 50, 50);
- GetDebugCanvas.Pixels[t.x, t.y] := clRed;
- Wait(1);
- until false;
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement