Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- r = 0.72;
- \[Phi] = N[13/8];
- earth[t_] := {Sin[2 Pi t], Cos[2 Pi t]};
- venus[t_] := r {Sin[\[Phi] 2 Pi t], Cos[\[Phi] 2 Pi t]};
- stars = RandomReal[1.5 {-1, 1}, {10, 2}];
- frame[tmax_] := (
- Graphics[{
- {White, Point[stars]},
- {White, Opacity[0.8],
- Table[
- Line[{earth[t], venus[t]}],
- {t, 0, Min[tmax, 8], 0.01}]
- },
- Opacity[If[tmax > 8, 9 - tmax, 1]],
- If[tmax < 8, EdgeForm[Black], {}],
- {White, Thickness[0.007], Circle[{0, 0}, 1], Circle[{0, 0}, r]},
- {Lighter@Blue, Disk[earth[tmax], 0.05]},
- {Lighter@Lighter@Orange, Disk[venus[tmax], 0.04]},
- {EdgeForm[], Yellow, Disk[{0, 0}, 0.1]}
- }, Background -> Black, PlotRange -> 1.5, ImageSize -> 500]
- );
- Manipulate[frame[t], {t, 0, 9}]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement