Professional Documents
Culture Documents
: ,
: -4
: 2
:
1.
2.
1.
. , y
. .
.
F=ma.
.
.
. : y
0,
.
F T F -
Y
X:
F X = F T + F
Y:
F Y = P + N = 0.
N = p
FT
X
P = mg
Y .
F .
F X = F T + F
: .
Page1
F T const .
. F T // F T F
F F X = F T F .
F T . F T F .
: F T F
.
F =0 . F >0
.
2. :
FX
d 2 x(t ) F X
a =
=>
=
2-
m
dt 2
m
. 1- 2
.
dx(t )
dt = u (t )
+ initial condition
t=0 x(0)= x0
u (0) = u0
(
)
du
t
F
X
=
dt
m
1- .
u (0) = u0
x(0)= x0
t .
Fx
Fx
Fx
U n +1 = U n +
dt
dt
t =
= const
m
m
m
x = x + u dt
un = dt const
x = un dt
n
n +1 n
dt x .
B
B( x1 , y2 )
C ( x2 , y2 )
A( x1 + x, y1 )
A( x1 , y1 )
D( x2 , y1 )
dt-
B( x1 + x, y2 )
C ( x2 + x, y2 )
D( x2 + x, y1 )
.
. A(x,y)
B( x1 , y1 ) .
D
B( x1 , y1 )
D C
.
A( x1 , y1 )
C
E
BF=a DF=FC=
a
.
2
: .
Page2
AE , DB,CB
C,D
. AE C,D :
a
C
(
x
+
r
a
,
y
+
)
C ( x + AB BF , y + FC )
a
2
AB = r ; BF = a ; FC = ;
=>
a
2
D( x + AB BF , y FC )
D ( x + r a, y )
2
a
a
C ( x + (r a) cos sin , y + (r a) sin + cos )
2
2
a
a
D( x + (r a) cos + sin , y (r a) sin + cos )
2
2
.
BE BE
AE
=
= sin
= cos
AB
r
r
a
a
(r a)
(r a)
C(x +
AE BE , y +
BE +
AE )
r
r
2r
2r
a
a
(r a)
(r a)
D( x +
AE + BE , y
BE +
AE )
.
r
r
2r
2r
AE = x1 x;
BE = y y1;
Delphi :
procedure TForm1.arrow(x0,y0,x1,y1,zew:integer; color:Tcolor);
begin
image1.Canvas.pen.color:=color;
image1.Canvas.MoveTo(round(x0),round(y0));
image1.Canvas.LineTo(round(x1),round(y1));
sr:=sqrt((x1-x0)*(x1-x0)+(y1-y0)*(y1-y0));
if sr<>0 then begin
sx:=(zew*(x0-x1)/sr)-((-zew div 2)*(y1-y0)/sr);
sy:=(zew*(y1-y0)/sr)+((-zew div 2)*(x0-x1)/sr);
image1.Canvas.MoveTo(round(x1),round(y1));
image1.Canvas.LineTo(round(x1)+round(sx),round(y1)-round(sy));
sx:=(zew*(x0-x1)/sr)-((zew div 2)*(y1-y0)/sr);
sy:=(zew*(y1-y0)/sr)+((zew div 2)*(x0-x1)/sr);
image1.Canvas.MoveTo(round(x1),round(y1));
image1.Canvas.LineTo(round(x1)+round(sx),round(y1)-round(sy));
end; end;
: .
Page3
3. :
1. .
2. . , , ,
.
3. . , , ,
.
4. .
5.
6. . : , ,
.
2.
.
y .
.
.
F=ma.
.
.
. H : y
P=-mg, 0 ..
X:
FX =0
Y:
F Y = mg.
X
.
.
F y = mg
. g=9.81 /* .
:
: .
Page4
Fy
d 2 y (t )
Fy
=>
=
2-
2
m
m
dt
. 1- 2 .
dy (t )
dt = u (t )
+ initial condition
t=0 y(0)= H
u (0) = 0
du (t ) = F X
dt
m
1- .
y(0)= H
u (0) = 0
t
.
u = gdt
g = 9.81 = const
U n +1 = U n gdt
u n = dt const
y = udt
y n +1 = y n + u n dt
g=
?
:Delphi .
1. . /Panel image ./
2. . , .
/Edit Updown/
3. . , ,
, . /edit /
4. . /Panel image
./
5. /Panel image ./
6. . : , ,
.
: .
Page5
2
: ( ) .
: -4
: 2
:
1.
2.
1.
.
y .
.
.
F=ma.
.
.
. H : y
P=-mg, 0 ..
X:
FX =0
Y:
F Y = mg.
X
.
.
F y = mg
. g=9.81 /* .
:
Fy
d 2 y (t )
Fy
=>
=
2-
2
m
m
dt
. 1- 2 .
g =
: .
Page6
dy (t )
dt = u (t )
+ initial condition
t=0 y(0)= H
u (0) = 0
du (t ) = F X
dt
m
1- .
y(0)= H
u (0) = 0
t
.
u = gdt
g = 9.81 = const
U n +1 = U n gdt
u n = dt const
y = udt
y n +1 = y n + u n dt
?
:Delphi .
1. . /Panel image ./
2. . , .
/Edit Updown/
3. . , ,
, . /edit /
4. . /Panel image
./
5. /Panel image ./
6. . : , ,
.
2.
. ,
,
.
.
F = kx
- , -
: .
Page7
2- .
F = ma or F = kx
a=
kx
m
2-
.
d 2x
kx
=
2
m
dt
1- 2 .
dx
= vx
dt
dv
kx
=
dt
m
.
x n +1 = x n + vx n dt
vx n +1 = vx n
k
x n dt
m
. /t=0/ / v = v 0 /
/ x = x 0 / . ,
.
.
?
sin .
.
.
.
y = A sin(
a x
)
b
- . b
. .
: .
Page8
=15 . b .
.
.
1. . TPanel Image
.
2. . , , , , 5
radio-
.
3. . ,
, ,
.
4. . , , ,
.
5. . , ,
.
: .
Page9
3
: H
( )
: -4
: 2
:
1. H
2.
H
. y x
.
.
.
F = ma
.
.
. H : y
P=-mg
.
.
FX =0
X:
F Y = mg.
Y:
X
.
.
: .
Page10
F y = mg
. g=9.81 /* .
v 0 x
v = v x + v y
. .
3. :
2- 2 .
Y:
g =
X:
0=
Fy
d 2 y (t )
=>
= g
m
dt 2
Fx
d 2 x(t )
=>
=0
m
dt 2
1- 2 .
Y:
dy (t )
dt = vy(t )
dvy(t ) = g
dt
X:
dx(t )
dt = vx(t )
dvx(t ) = 0
dt
+ initial condition
+ initial condition
t=0 y(0)= H
t=0 x(0)= 0
vy(0) = 0
vx(0) = v0
1-
. .
: .
Page11
t
.
vy n +1 = vy n gdt
Y:
y n +1 = y n + vy n dt
vx n +1 = vx n
X:
x n +1 = x n + vx n dt
vy = gdt
g = 9.81 = const
y = vy n dt
vy n = dt const
vx = 0
x = vx n dt
vy n = const
x,y
.
:Delphi .
1. . /Panel image ./
2. . ,
. /Edit Updown/
3. . ,
,
, ,
. /edit /
4. . /Panel image
./
5. /Panel image ./
6. . : , ,
.
: .
Page12
4
: ,
: -4
: 2
:
1.
.
, .
Px = mg sin
Py = mg cos
. x
.
X : Fx = Px + F
Y:
Fy = Py + N
Fx .
:
F = N = mg cos
.
:
0.5
0.53
-1 . :
Fx = ma
a=
Fx
m
: .
Page13
dx
dt = vx
d x Fx
=
+ initial condition
m
dt 2
dvx = Fx
dt
m
Initial condition:
t = 0, vx = 0, x = 0
Fx > 0 .
Fx = Px + F = mg sin mg cos
2
1.
2
L . a
A,B,C .
A
A(x,y)
(1)
.
I
. ( 2)
B
B ( x + AC , y BC )
: .
Page14
AC = L cos(a)
BC = L sin(a )
B ( x + L cos(a ), y L sin(a ))
(2)
.
C
C ( x + L cos(a ), y )
(3)
.
(1), (2), (3) . 4
.(M,N,P,Q )
M, Q M B 30 , Q
B 10 .
: .
Page15
4.
?
L m
.
.
?
P = mg
.
P = F1 + F2
F1 -
.
F2 -
.
?
:
F1 = mg sin
F2 = mg cos
?
.
.
. ,
.
5. :
?
.
/
/ ( x0 , y 0 )
.
: .
Page16
xa = x0
.
ya = y 0 + L
x,y .
.
x = L sin
y = L(1 cos )
.
X = x0 + L sin
(*)
Y = y 0 + L cos
(X,Y) .
?
.
.
:
.
)
vv (
:
Vv vv v :
.
v
.
.
: .
Page17
1- 2 .
d
=
dt
+
d
g
=
dt
L
n +1 = n + n dt
+ / t = 0, 0 = 0, 0 = /
g
n +1 = n n
L
,
.
(*) .
?
:Delphi
. / /
1. . /Standard page
components Panel Additional page components
image . Panel .
align client . Panel
Image- ./
2. . , ,
. / Standard page components
GroupBox Caption
. 3 Edit Win32 page components
3 Updown . Updown edit
Updown Associate Edit- . /
3. . ,
, ,
. . /edit Label
/
6. . : , ,
.
: .
Page18
. Form create .
.
. .
,
. . Timer
. Timer- enabled false
enabled:=true .
: .
Page19
5
:
. .
: -4
: 2
:
2.
M m
F = G
2-
R2
m v2
. Fz =
R
,
. .
.
: M- , m- , R- . G-
.
: (365 =
T=1), ( 1.496 1011 = R=1),
(1=m= 5.94 10 24 ) . ,
,
.
2
-
G = 6.67 10 11
2
M = 1.98 10 30
r = 3.84 10 8
mc = 7.33 10 22
2.
.
.
x = R cos t
y = R sin t
.
(x,y) .
.
: .
Page20
x1 = r cos t1
y1 = r sin t1
( x + x1, y + y1 ) .
t t1 t1 = 12 t .
12 .
.
. ,
.
Mm
F = G 2
R
x,y .
d 2 x GM
d 2x
x:
= 3 x
x:
=kx
GM
dt 2
R
dt 2
=
k
R3
d 2 y GM
d2y
x:
=
y
x
:
=ky
dt 2
R3
dt 2
1- 4 :
dx
= vx
dt
+ (t=0, x0 = R , v x 0 = 0 )
dv x
= kx
dt
dy
= vy
dt
+ (t=0, y 0 = 0 , v y 0 = v0 )
dv y
=ky
dt
:
x n +1 = x n + v xn dt
+ (t=0, x0 = R , v x 0 = 0 )
v xn+1 = v xn + k x n dt
y n +1 = y n + v yn dt
+ (t=0, y 0 = R , v y 0 = 0 )
v yn +1 = v yn + k y n dt
.
.
.
R = 1 .
m = 1 .
T = 1 :
3.84 10 8
r =
= 2.58 10 3 = 0.258 .
11
1.49 10
22
7.33 10
= 1.225 10 2 = 0.012
mc =
24
5.98 10
1.98 10 30
= 331103.7
M =
5.98 10 24
GM
6.67 10 6 331103.7
=
k
:
k
=
= 2.2
R3
13
: .
Page21
6.67 10 6
Gm
k
1
=
k
1
=
= 0,00038
r3
(0.258) 3
v0 =
GM
=
R
6.67 10 6 331103.7
= 1.486
1
Gm
6.67 10 6 1
=
= 0.005 .
r
0.258
4.
- / Panel Image ./
- Timer .
- Form- .
vc0 =
: .
Page22
6
: ,
: -4
: 2
:
1. Epicycloid
a b
.
.
Epicycloid . :
a=b
a = 2b
a = 3b
a = 4b
.
. 1 .P 1
1
a+b .
:
: .
Page23
(a + b) = b
b
.
a+b
2 .
P 1 :
x1 = b cos
y1 = b sin
1 :
b
)
a+b
b
y 2 = (a + b) sin(
)
a+b
x 2 = (a + b) cos(
P :
x P = x1 + x 2
y1 = y1 + y 2
2.
. .
1.
2.
3.
1. .
standard page components Tpanel
additonal page components
Image .
2. .
standard page components GroupBox standard page
: .
Page24
components 2 Edit .
Win32 page components 2 UpDown 2 Edit .
3. .
.
.
procedure TForm1.FormCreate(Sender:
TObject); .
procedure TForm1.FormCreate(Sender: TObject);
begin
mx1 := image2.Width div 2;
my1 := image2.Height div 2;
a:=StrToInt(Edit1.Text); b:=StrToInt(Edit2.Text);
t:=0; dt:=0.01; t1:=0;
Image2.Canvas.Brush.Color:=clWhite;
Image2.Canvas.FillRect(Rect(0,0,2*mx1,2*my1));
Caption := '';
GroupBox1.Caption :='';
Label1.Caption := ' ';
Label2.Caption := ' ';
Label3.Caption := '';
Label4.Caption := '';
BitBtn1.Caption :='';
BitBtn2.Caption :='';
BitBtn3.Caption :='';
end;
procedure TForm1.Edit1Change(Sender: TObject);
.
System page components Timer procedure
TForm1.Timer1Timer(Sender: TObject); .
1. Hypocycloid
a b
.
.
Hypocycloid . :
: .
Page25
.
. 1 .P
1 1
a-b .
:
(a b) = b
b
.
ab
2 .
P 1 :
x1 = b cos
y1 = b sin
1 :
b
)
ab
b
y 2 = (a b) sin(
)
ab
x 2 = (a b) cos(
P :
: .
Page26
x P = x1 + x 2
y1 = y1 + y 2
2.
. .
1. .
standard page components Tpanel
additonal page components
Image .
2. .
standard page components GroupBox standard page
components 2 Edit .
Win32 page components 2 UpDown 2 Edit .
3. .
.
.
procedure TForm1.FormCreate(Sender:
TObject); .
procedure TForm1.FormCreate(Sender: TObject);
begin
mx1 := image2.Width div 2;
my1 := image2.Height div 2;
a:=StrToInt(Edit1.Text); b:=StrToInt(Edit2.Text);
t:=0; dt:=0.01; t1:=0;
Image2.Canvas.Brush.Color:=clWhite;
Image2.Canvas.FillRect(Rect(0,0,2*mx1,2*my1));
Caption := '';
GroupBox1.Caption :='';
Label1.Caption := ' ';
Label2.Caption := ' ';
: .
Page27
Label3.Caption := '';
Label4.Caption := '';
BitBtn1.Caption :='';
BitBtn2.Caption :='';
BitBtn3.Caption :='';
end;
procedure TForm1.Edit1Change(Sender: TObject);
.
procedure TForm1.Edit1Change(Sender: TObject);
begin
a := StrToInt(Edit1.Text); b := StrToInt(Edit2.Text);
t := 0;
BitBtn2.Enabled := False;
Image2.Canvas.Brush.Color:=clWhite;
Image2.Canvas.FillRect(Rect(0,0,2*mx1,2*my1));
Image2.Canvas.Pen.Color:=clblue;
x1:=(a-b)*cos(t);
y1:=(a-b)*sin(t);
Circle(mx1,my1,Round(10*a),Image2);
Circle(mx1+Round(10*x1),my1-Round(10*y1),Round(10*b),Image2);
end;
: .
Page28
7
:
: -4
: 2
: 1.
3.
.
y = x .
2
.
.
4.
.
procedure BitBtn2Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure Timer1Timer(Sender: TObject);
procedure BitBtn1Click(Sender: TObject);
procedure arrow(x0,y0,x1,y1,zew:integer);
procedure TForm1.BitBtn2Click(Sender: TObject);
begin
form1.Close;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
mx:=image1.Width div 2;
my:=image1.Height div 2;
image1.Canvas.Brush.Color:=clwhite;
image1.Canvas.FillRect(rect(0,0,2*mx,2*my));
: .
Page29
with image1.Canvas do begin
pen.Color:=clblue;
pen.Style:=pssolid;
moveto(0,my);
lineto(2*mx,my);
moveto(mx,0);
lineto(mx,2*my);
end;
end;
procedure TForm1.Timer1Timer(Sender: TObject);
begin
image1.Canvas.Brush.Color:=clwhite;
image1.Canvas.FillRect(rect(0,0,2*mx,2*my));
with image1.Canvas do begin
pen.Color:=clblue;
pen.Style:=pssolid;
moveto(0,my);
lineto(2*mx,my);
moveto(mx,0);
lineto(mx,2*my);
end;
x:=-3;
y:=x*x*x-x*x-5*x+5;
image1.Canvas.moveto(mx+round(c*x),my-round(d*y));
while x<3.1 do begin
y:=x*x*x-x*x-5*x+5;
image1.Canvas.Pen.Color:=clred;
image1.Canvas.Pen.Style:=pssolid;
image1.Canvas.lineto(mx+round(c*x),my-round(d*y));
x:=x+0.1;
end;
k:=3*x0*x0-2*x0-5;
b:=(x0*x0*x0-x0*x0-5*x0+5)-k*x0;
y0:=x0*x0*x0-x0*x0-5*x0+5;
// y1:=k*x1+b;
image1.Canvas.Ellipse(mx-3+round(c*x0),my-3-round(d*y0),mx+3+round(c*x0),my+3-round(d*y0));
x1:=abs(k)/(sqrt(1+k*k))+x0;
y1:=abs(k)*k/(sqrt(1+k*k))+y0;
arrow(mx+round(c*x0),my-round(d*y0),mx+round(c*x1),my-round(d*y1),15);
x0:=x0+0.05;
if(x0>3) then
x0:=-3;
end;
procedure TForm1.BitBtn1Click(Sender: TObject);
begin
x0:=-3;
timer1.Enabled:=true;
end;
procedure TForm1.arrow(x0,y0,x1,y1,zew:integer);
begin
image1.Canvas.pen.color:=clblack;
image1.Canvas.MoveTo(round(x0),round(y0));
image1.Canvas.LineTo(round(x1),round(y1));
sr:=sqrt((x1-x0)*(x1-x0)+(y1-y0)*(y1-y0));
if sr<>0 then begin
sx:=(zew*(x0-x1)/sr)-((-zew div 2)*(y1-y0)/sr);
sy:=(zew*(y1-y0)/sr)+((-zew div 2)*(x0-x1)/sr);
image1.Canvas.MoveTo(round(x1),round(y1));
image1.Canvas.LineTo(round(x1)+round(sx),round(y1)-round(sy));
sx:=(zew*(x0-x1)/sr)-((zew div 2)*(y1-y0)/sr);
sy:=(zew*(y1-y0)/sr)+((zew div 2)*(x0-x1)/sr);
: .
Page30
image1.Canvas.MoveTo(round(x1),round(y1));
image1.Canvas.LineTo(round(x1)+round(sx),round(y1)-round(sy));
end; end;
end.
2.
: .
Page31
procedure TForm1.FormCreate(Sender: TObject);
begin
a := StrToFloat(Edit1.Text);
b := StrToFloat(Edit2.Text);
t := 0; co := StrToInt(Edit5.Text);
mx := Image1.Width div 2;
my := Image1.Height div 2;
Image1.Canvas.MoveTo(0, my); Image1.Canvas.LineTo(2*mx, my);
Image1.Canvas.MoveTo(mx, 0); Image1.Canvas.LineTo(mx, 2*my);
if (a < 11)and(b < 11) then
UpDown1.Max := 1000
else UpDown1.Max := 200;
Caption := ' ';
BitBTn1.Caption := '';
BitBTn2.Caption := '';
GroupBox1.Caption := '';
GroupBox2.Caption := ' ';
Label1.Caption :=' ';
Label2.Caption :=' ';
Label3.Caption :=' ';
Label4.Caption :='';
Label5.Caption :='';
end;
procedure TForm1.BitBtn1Click(Sender: TObject);
begin
Image1.Canvas.Brush.Color := clwhite;
Image1.Canvas.FillRect(Rect(0,0,Image1.Width,Image1.Height));
t := 0;
co := StrToInt(Edit5.Text);
a := StrToFloat(Edit1.Text);
b := StrToFloat(Edit2.Text);
Timer1.Enabled := True;
if (a < 11)and(b < 11) then
UpDown1.Max := 1000
else UpDown1.Max := 200;
c := Sqrt(a*a-b*b);
e := Sqrt(1-sqr(b/a));
Str(2*c:0:3, st1);
Edit3.Text := st1;
Str(e:0:6, st2);
Edit4.Text := st2;
end;
procedure TForm1.Edit1Change(Sender: TObject);
var sst: String;
begin
sst := edit1.Text;
if edit1.Text <> '' then
begin
if sst[length(sst)] = '.' then
begin
sst[length(sst)] := DecimalSeparator;
edit1.Text := sst;
edit1.SelStart := length(sst);
edit1.SelLength := 0;
end;
end;
end;
procedure TForm1.Edit1KeyPress(Sender: TObject; var Key: Char);
var pnt,Sep: Boolean;
: .
Page32
begin
if not (key in ['0'..'9', '.', #13, #8]) then
key := #0;
if (key = #13)or(key = #43) then
edit2.SetFocus;
pnt := False;
Sep := False;
if (key = ',') or (key = '.') then
pnt := True;
if (Pos(DecimalSeparator, Edit1.Text)<>0) then
sep := True;
if pnt and sep then
key := #0;
end;
procedure TForm1.Edit2KeyPress(Sender: TObject; var Key: Char);
var pnt,Sep: Boolean;
begin
if not (key in ['0'..'9', '.', #13, #8]) then
key := #0;
if (key = #13)or(key = #43) then
BitBtn1.SetFocus;
pnt := False;
Sep := False;
if (key = ',') or (key = '.') then
pnt := True;
if (Pos(DecimalSeparator, Edit2.Text)<>0) then
sep := True;
if pnt and sep then
key := #0;
end;
procedure TForm1.Edit2Change(Sender: TObject);
var sst: String;
begin
sst := edit2.Text;
if edit2.Text <> '' then
begin
if sst[length(sst)] = '.' then
begin
sst[length(sst)] := DecimalSeparator;
edit2.Text := sst;
edit2.SelStart := length(sst);
edit2.SelLength := 0;
end;
end;
end;
end.
: .
Page33
8
: ,
: -4
: 2
:
1.
2.
:
1.
.
.
(x,y)
(X,Y)
.
.
X = Ax + By + C
Y = Dx + Ey + F
A,B,..,F-
x = A1 X + B 1Y + C 1
1
1
1
y = D X + E Y + F
X A
Y = D
1 0
B C x
E F y
0 1 1
.
.
? .
:
: .
Page34
xi
x
i
y = ( A) y
1
1
x ii
xi
ii
y = (B ) y i
1
1
.
x ii
xi
x
ii
i
y = (B ) y = (B ) ( A) y
1
1
1
x ii
x
ii
y = C) y
1
1
. (C) (B)(A) .
.
.
X = x dx
Y = y dy
1 0 dx
0 1 dy .
0 0
1
:
x = X + dx
y = Y + dy
1 0 dx
0 1 dy .
0 0 1
: .
Page35
.
X = x / kx
Y = y / k y
0 .
1
0
1 / k x
1/ k y
0
0
0
:
x = Xk x
y = Yk y
kx
0
0
0
ky
0
0 .
1
X = x cos + y sin
Y = x sin + y cos
cos
sin
0
sin
cos
0
0 .
1
x = X cos Y sin
y = X sin + Y cos
cos
sin
0
sin
cos
0
0 .
1
2.
, .
.
.
: .
Page36
.
.
P .
r R . OYZ
r , P ii :
x ii = 0
ii
y = r cos .
z ii = r sin
Y R :
x i = x ii = 0
i
ii
y = R + y = R + r cos .
z i = z ii = r sin
r Z
P
.
x = x i cos + y i sin
i
i
i
y = x sin + y cos x = 0
z = zi
: .
x = ( R + r cos ) sin
y = ( R + r cos ) cos
z = r sin
Page37