Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Manipulate[
- Graphics[{
- FaceForm[White],
- EdgeForm[Directive[Thickness[0.01], RGBColor[0.14, 0.27, 0.55]]],
- Disk[{-0.1 t, 0}, {1 - 0.1 t, 0.9}],
- FaceForm[GrayLevel[0.85]],
- Disk[{-0.92, 0}, {0.075, 0.4}],
- {RGBColor[0.756, 0.517, 0.10`], Opacity[0.5], Thick,
- Table[
- If[Abs[x] <= a,
- Block[{p1, p2, u},
- {
- p1 = {-1.4, x};
- p2 = {-1, x};
- u = (f - p2);
- u = u/Norm[u];
- Line[{p1, p2}], Line[{p2, p2 + (2 - 0.2 t) u}]
- }
- ]
- ,
- {
- Block[{p1, p2, p3},
- {
- p1 = {-1.4, x};
- p2 = {-1.2, x};
- Line[{p1, p2}]}
- ]
- }
- ], {x, -0.25, 0.25, 0.02}]},
- {Black, Thickness[0.02], Line[{{-1.2, 1.1}, {-1.2, a + 0.02}}],
- Line[{{-1.2, -1.1}, {-1.2, -a - 0.02}}]}
- }, Background -> RGBColor[0.4, 0.76, 0.9],
- PlotRange -> {{-1.4, 1.1}, {-1.1, 1.1}}]
- , {{t, 0, "Deformation"}, 0, 1.7}, {{a, 0.25, "Pinhole"}, 0.03,
- 0.25}, Initialization :> (f = {1, 0})]
Advertisement
Add Comment
Please, Sign In to add comment