Quỹ đạo chuyển động của trái đất và sao kim

Description

Sao kim hoàn thành một chu kỳ quỹ đạo khoảng 224,65 ngày

71

code Asymtote

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
animation Anim;
unitsize(1cm);
pair O=(0,0);
real tv = 224.65;
real te = 365;
real rv = 0.72;
real re = 1;
pen stylo1=red, stylo2=orange;
real r1=0.21, r2=0.1;
path c1=circle(O,r1), c2=circle(O,r2);
real day =2920;
draw(circle(O,re),0.1bp+white);
draw(circle(O,rv),0.1bp+white);
for (real t=0; t<day;t=t+5) {
pair M=(re*cos(2pi*t/te),re*sin(2pi*t/te));
pair N=(rv*cos(2pi*t/tv),rv*sin(2pi*t/tv));
draw(M--N,0.1bp+white);
dotfactor=3;
save();
draw(M--N,0.5bp+orange);
fill(circle(M,0.05),0.5*blue);
radialshade(c1,stylo1,O,r1,stylo2,O,r2);
radialshade(circle(M,0.05),blue,M,0.05,white,M,0.01);
radialshade(circle(N,0.03),orange,N,0.02,white,N,0.005);
Anim.add();
restore();
}
Anim.movie(options="-delay 4 -loop 0 -layers OptimizePlus -alpha remove -density 800",BBox(2mm,FillDraw(black)));