6:Image1.Canvas.Pen.Color:=clLime;
7:Image1.Canvas.Pen.Color:=clGreen;
8:Image1.Canvas.Pen.Color:=clBlue;
9:Image1.Canvas.Pen.Color:=clFuchsia;
end;
Image1.Canvas.Ellipse(x4,y4,x5,y5);
end;
procedure TForm3.SpeedButton2Click(Sender: TObject);
begin
Form4:=TForm4.Create(Application);
Form4.ShowModal;
Form4.Free;
SpeedButton2.visible:=false;
end;
end.
unit Unit4;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls, StdCtrls, Buttons, Common,Math;
type
TForm4 = class(TForm)
Image1: TImage;
Timer1: TTimer;
Button1: TButton;
Label1: TLabel;
-----------------------
Label32: TLabel;
procedure FormCreate(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure Timer1Timer(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
Mas = array[1 311] of real;
var
Form4: TForm4;
ZA,ZB,ZP : Mas;
ZAG,ZBG : integer;
ZAM,ZBM,x,y,x3,y3 : real;
x4,y4,x5,y5,x0,y0,x1,y1,x2,y2,g :variant;
implementation
{$R *.dfm}
procedure TForm4.FormCreate(Sender: TObject);
var i : integer;
begin
Timer1.Enabled:=true;
Image1.Canvas.Brush.Color:=clBlack;
Image1.Canvas.Brush.Style:=bsSolid;
Image1.Canvas.Rectangle(0,0,2020,505);
Image1.Canvas.pen.color:=clWhite;
Image1.Canvas.Moveto (0,0);
Image1.Canvas.LineTo (2000,0);
Image1.Canvas.LineTo (2000,500);
Image1.Canvas.LineTo (0,500);
Image1.Canvas.LineTo (0,0);
Image1.Canvas.MoveTo(0,278);
Image1.Canvas.LineTo (2000,278);
//ruscu
Image1.Canvas.MoveTo(2000,0);
Image1.Canvas.LineTo (2005,0);
Image1.Canvas.MoveTo(2000,56);
Image1.Canvas.LineTo (2005,56);
Image1.Canvas.MoveTo(2000,111);
Image1.Canvas.LineTo (2005,111);
Image1.Canvas.MoveTo(2000,167);
Image1.Canvas.LineTo (2005,167);
Image1.Canvas.MoveTo(2000,222);
Image1.Canvas.LineTo (2005,222);
Image1.Canvas.MoveTo(2000,278);
Image1.Canvas.LineTo (2005,278);
Image1.Canvas.MoveTo(2000,334);
Image1.Canvas.LineTo (2005,334);
Image1.Canvas.MoveTo(2000,388);
Image1.Canvas.LineTo (2005,388);
Image1.Canvas.MoveTo(2000,444);
Image1.Canvas.LineTo (2005,444);
Image1.Canvas.MoveTo(2000,500);
Image1.Canvas.LineTo (2005,500);
//ruscu
Image1.Canvas.MoveTo(2000,500);
Image1.Canvas.LineTo (2000,505);
Image1.Canvas.MoveTo(1916,500);
Image1.Canvas.LineTo (1916,505);
Image1.Canvas.MoveTo(1834,500);
Image1.Canvas.LineTo (1834,505);
Image1.Canvas.MoveTo(1750,500);
Image1.Canvas.LineTo (1750,505);
Image1.Canvas.MoveTo(1666,500);
Image1.Canvas.LineTo (1666,505);
Image1.Canvas.MoveTo(1584,500);
Image1.Canvas.LineTo (1584,505);
Image1.Canvas.MoveTo(1500,500);
Image1.Canvas.LineTo (1500,505);
Image1.Canvas.MoveTo(1416,500);
Image1.Canvas.LineTo (1416,505);
Image1.Canvas.MoveTo(1334,500);
Image1.Canvas.LineTo (1334,505);
Image1.Canvas.MoveTo(1250,500);
Image1.Canvas.LineTo (1250,505);
Image1.Canvas.MoveTo(1166,500);
Image1.Canvas.LineTo (1166,505);
Image1.Canvas.MoveTo(1084,500);
Image1.Canvas.LineTo (1084,505);
Image1.Canvas.MoveTo(1000,500);
Image1.Canvas.LineTo (1000,505);
Image1.Canvas.MoveTo(916,500);
Image1.Canvas.LineTo (916,505);
Image1.Canvas.MoveTo(834,500);
Image1.Canvas.LineTo (834,505);
Image1.Canvas.MoveTo(750,500);
Image1.Canvas.LineTo (750,505);
Image1.Canvas.MoveTo(666,500);
Image1.Canvas.LineTo (666,505);
Image1.Canvas.MoveTo(584,500);
Image1.Canvas.LineTo (584,505);
Image1.Canvas.MoveTo(500,500);
Image1.Canvas.LineTo (500,505);
Image1.Canvas.MoveTo(416,500);
Image1.Canvas.LineTo (416,505);
Image1.Canvas.MoveTo(334,500);
Image1.Canvas.LineTo (334,505);
Image1.Canvas.MoveTo(250,500);
Image1.Canvas.LineTo (250,505);
Image1.Canvas.MoveTo(166,500);
Image1.Canvas.LineTo (166,505);
Image1.Canvas.MoveTo(84,500);
Image1.Canvas.LineTo (84,505);
Image1.Canvas.MoveTo(0,500);
Image1.Canvas.LineTo (0,505);
//Image1.Canvas.TextOut(10,30,'Boo');
//And
ZA[1]:=0.07; ZB[1]:=29.02; ZP[1]:=1.5;
ZA[2]:=1.09; ZB[2]:=35.34; ZP[2]:=1.5;
ZA[3]:=2.03; ZB[3]:=42.17; ZP[3]:=1.5;
ZA[4]:=0.38; ZB[4]:=30.48; ZP[4]:=0.5;
ZA[5]:=0.56; ZB[5]:=38.26; ZP[5]:=0.5;
ZA[6]:=1.37; ZB[6]:=48.34; ZP[6]:=0.5;
ZA[7]:=23.01; ZB[7]:=42.16; ZP[7]:=0.5;
ZA[8]:=23.47; ZB[8]:=46.24; ZP[8]:=0.5;
---------------------------------------------
//Lup
ZA[311]:=15.21; ZB[311]:=-36.13; ZP[311]:=0.5;
//ZA[]:=; ZB[]:=; ZP[]:=;
for i:=1 to 311 do
begin
ZAG:=Trunc(ZA[i]);ZAM:=frac(ZA[i])/0.6;
ZA[i]:=ZAG+ZAM;
ZBG:=Trunc(ZB[i]);ZBM:=frac(ZB[i])/0.6;
ZB[i]:=ZBG+ZBM;
if ZB[i]<=0 then
ZB[i]:=abs(ZB[i])+50
else ZB[i]:=50-ZB[i];
y:=500-(((90-ZB[i])/90)*500);
x:=((24-ZA[i])/24)*2000;
x0:=int(x);
y0:=int(y);
if ZP[i]=0.5 then
Image1.Canvas.Pixels[x0,y0]:=clWhite
else begin
Image1.Canvas.Pen.Color:=clWhite;
Image1.Canvas.Brush.Style:=bsSolid;
Image1.Canvas.Brush.Color:=clWhite;
x1:=int(x-ZP[i]);
y1:=int(y-ZP[i]);
x2:=int(x+ZP[i]);
y2:=int(y+ZP[i]);
Image1.Canvas.Ellipse(x1,y1,x2,y2);
end;
end;
case ZPL1 of
1: Label1.Caption:='Меркурій';
2: Label1.Caption:='Венеру';
4: Label1.Caption:='Марс';
5: Label1.Caption:='Юпітер';