fork(1) download
  1. var
  2. i: integer;
  3. a, b, cx, cy, x, y: Integer;
  4. fi, t: Double;
  5. begin
  6. cx := 300;
  7. cy := 300;
  8. a := 200;
  9. b := 100;
  10. fi := Pi/6;
  11. for i := 0 to 2 * 628 do begin
  12. t := i / 200;
  13. x := Round(a * Cos(t) * Cos(fi) - b * Sin(t) * Sin(fi) + cx);
  14. y := Round(a * Cos(t) * Sin(fi) + b * Sin(t) * Cos(fi) + cy);
  15. Canvas.Pixels[x, y] := clRed;
  16. end;
  17.  
  18. t := ArcTan(-b / a * Tan(fi));
  19. x := Round(a * Cos(t) * Cos(fi) - b * Sin(t) * Sin(fi) + cx);
  20. y := Round(a * Cos(t) * Sin(fi) + b * Sin(t) * Cos(fi) + cy);
  21. Canvas.Ellipse(x-3, y-3, x+4, y+4);
  22. t := Pi + ArcTan(-b / a * Tan(fi));
  23. x := Round(a * Cos(t) * Cos(fi) - b * Sin(t) * Sin(fi) + cx);
  24. y := Round(a * Cos(t) * Sin(fi) + b * Sin(t) * Cos(fi) + cy);
  25. Canvas.Ellipse(x-3, y-3, x+4, y+4);
  26. t := ArcTan(b / a * Cot(fi));
  27. x := Round(a * Cos(t) * Cos(fi) - b * Sin(t) * Sin(fi) + cx);
  28. y := Round(a * Cos(t) * Sin(fi) + b * Sin(t) * Cos(fi) + cy);
  29. Canvas.Ellipse(x-3, y-3, x+4, y+4);
  30. t := Pi + ArcTan(b / a * Cot(fi));
  31. x := Round(a * Cos(t) * Cos(fi) - b * Sin(t) * Sin(fi) + cx);
  32. y := Round(a * Cos(t) * Sin(fi) + b * Sin(t) * Cos(fi) + cy);
  33. Canvas.Ellipse(x-3, y-3, x+4, y+4);
  34.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Free Pascal Compiler version 3.0.0+dfsg-10 [2016/12/12] for x86_64
Copyright (c) 1993-2015 by Florian Klaempfl and others
Target OS: Linux for x86-64
Compiling prog.pas
prog.pas(15,5) Error: Identifier not found "Canvas"
prog.pas(15,28) Error: Identifier not found "clRed"
prog.pas(18,26) Error: Identifier not found "Tan"
prog.pas(21,4) Error: Identifier not found "Canvas"
prog.pas(22,31) Error: Identifier not found "Tan"
prog.pas(25,4) Error: Identifier not found "Canvas"
prog.pas(26,25) Error: Identifier not found "Cot"
prog.pas(29,4) Error: Identifier not found "Canvas"
prog.pas(30,30) Error: Identifier not found "Cot"
prog.pas(33,4) Error: Identifier not found "Canvas"
prog.pas(34) Fatal: Unexpected end of file
Fatal: Compilation aborted
Error: /usr/bin/ppcx64 returned an error exitcode
stdout
Standard output is empty