Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- StepA = 1;
- LimA = 20;
- StepB = 4;
- LimB = 6;
- Raio = 0.5;
- EspSetas = 0.01;
- Pos1[x_, y_] := -x
- Pos2[x_, y_] := y + If[OddQ[(x)], 0, StepB/2]
- t = 0;
- myring[a_, b_] :=
- Graphics[Rotate[
- Arrow@Table[{-Pos1[a, b] + Raio*Cos[u],
- Pos2[a, b] + Raio*Sin[u]}, {u, 0, 2 \[Pi] + t*2 \[Pi]/180,
- 2 \[Pi]/180}], {{-1, 0}, {1, 0}}]];
- myRingSet =
- Show[Table[myring[a, b], {a, 0, LimA, StepA}, {b, 0, LimB, StepB}]];
- a = Graphics[{{Red, Opacity[1],
- Table[Circle[{Pos1[a, b], -Pos2[a, b]}, 0.8*Raio], {a, 0, LimA,
- StepA}, {b, 0, LimB, StepB}]}, {Thickness[0.01],
- Table[Arrow[{{Pos1[a, b], -Pos2[a, b]}}], {a, 0, LimA,
- StepA}, {b, 0, LimB, StepB}]}}];
- s = Show[a, myRingSet, ImageSize -> 400,
- BaseStyle -> Arrowheads[0.014], Frame -> True, FrameTicks -> None,
- Axes -> False];
- ao = AbsoluteOptions[a, PlotRange];
- Manipulate[
- Show[s, PlotRange -> {{i, i - Subtract @@ ao[[1, 2, 1]]/2},
- ao[[1, 2, 2]]}, PlotRangePadding -> 1], {i, Min @@ ao[[1, 2, 1]],
- Max @@ ao[[1, 2, 1]] + Subtract @@ ao[[1, 2, 1]]/2}]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement