Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- \[Theta] = Pi/3;
- f[x_, y_] :=
- 0.8 Sin[xt] Cos[yt] /. {xt -> x Cos[\[Theta]] - y Sin[\[Theta]],
- yt -> y Cos[\[Theta]] + x Sin[\[Theta]]};
- g = Derivative[1, 0][f];
- n = 70; r = 0.85;
- Manipulate[
- Show[
- Graphics[{
- FaceForm[RGBColor[0.95, 0.95, 1.0]],
- EdgeForm[
- Directive[Thickness[0.01],
- RGBColor[0.6365758754863813, 0.8532539864194705,
- 0.970244907301442]]],
- Polygon[
- Join[{{-1, 5}},
- Table[{x, f[x, y]}, {x, 0, 4 Pi, (4 Pi)/50}], {{4 Pi + 1,
- 5}}]],
- Table[
- Block[{p1, p2, p3, m, sin1, sin2, cos2, d\[Theta], xt},
- p1 = {x, 4}; p2 = {x, f[x, y]}; m = g[x, y]; sin1 = m;
- sin2 = r sin1; d\[Theta] = ArcSin[sin1] - ArcSin[sin2];
- cos2 = Sqrt[1 - sin1^2];
- p3 = p2 + (p2[[2]] + 3) {Sin[d\[Theta]]/Cos[d\[Theta]], -1};
- xt = p3[[1]];
- {RGBColor[0.781048294804303, 0.6390783550774395,
- 0.42232394903486686], Line[{p1, p2}], White, Line[{p2, p3}],
- Opacity[0.2], FaceForm[White], EdgeForm[],
- Rectangle[{xt - 2 (4 Pi/n), -3.5}, {xt + 2 (4 Pi/n), -3}]}
- ]
- , {x, 0, 4 Pi, (4 Pi)/n}]},
- Background ->
- RGBColor[0.10379186694132907, 0.2430914778362707,
- 0.49544518196383613], PlotRange -> {{0.5, 4 Pi - 0.5}, {-3.5, 4}}]
- ]
- , {y, 0, 4 Pi}]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement