Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ParametricPlot[{{Cos[t] (2 + 7 Cos[2 t] - Cos[4 t])/8, Sin[t]^3 (3 - 2 Cos[2 t])/4},
- 3/2 {1, Cos[t]} Sin[t]/(1 + Cos[t]^2)}, {t, 0, 2 Pi},
- Axes -> None, PlotRangePadding -> 0.1,
- Background -> ColorData["Legacy", "Antique"], PlotStyle -> Black,
- PlotPoints -> 500, MaxRecursion -> 0] /. Line[pts_] :>
- (With[{thick = (Abs@
- Sin[Mod[ArcTan @@ Subtract @@ # + 3/4 Pi,
- 2 Pi]])}, {PointSize[thick*0.035 + RandomReal[.007]],
- Thickness[thick*.031 + 0.004], Line[#], Point[First[#]]}] & /@
- Partition[pts, 2, 1])
- p1 = ParametricPlot[{Cos[phi], Sin[phi]}, {phi, 0, 2 Pi}];
- p1 /. Line[pts_] :>
- ({Thickness[(Abs@Sin[Mod[ArcTan @@ Subtract @@ #, 2 Pi]])*0.02], Line[#]} & /@
- Partition[pts, 2, 1])
- infty = ParametricPlot[{2 Cos[1/2 t], Sin[t]}, {t, 0, 4 Pi}]
- Manipulate[
- Show[infty /.
- Line[pts_] :> ({Thickness[(Abs@Sin[
- Mod[ArcTan @@ Subtract @@ # + direction, 2 Pi]])*
- maxThickness + baseThickness], Line[#]} & /@
- Partition[pts, 2, 1]),
- PlotRange -> {{-3, 3}, {-2, 2}}, AspectRatio -> Automatic,
- Axes -> False],
- {direction, 0, 2 Pi},
- {{baseThickness, 0.005}, 0, 0.02},
- {{maxThickness, 1/50.}, 1/100., 1/30.}
- ]
- text = First[First[ImportString[ExportString[Style["L",
- FontFamily -> "Poetica"], "PDF"], "PDF"]]];
- Graphics[{Gray, Translate[text, .5 {1, 1}], Red, text}, Frame -> True]
- lst = Module[{l = Cases[text, FilledCurve[a__] :> {EdgeForm[Black], Darker[Red],
- FilledCurve[a]}, Infinity]}, Table[Graphics[{l /. {x_Real, y_Real} :>
- {x 6 Cos[x/12 + t], y 6 Sin[x/12 + t]}}, Frame -> False, PlotRange -> All,
- ImageSize -> {400, 400}], {t, 0, 2 [Pi], .1}]];
- Export["L.gif", lst]
- ParametricPlot[{
- (* modified hypotrochoid *)
- {Cos[t] (2 + 7 Cos[2 t] - Cos[4 t])/8, Sin[t]^3 (3 - 2 Cos[2 t])/4},
- (* lemniscate of Bernoulli *)
- 3/2 {1, Cos[t]} Sin[t]/(1 + Cos[t]^2)},
- {t, 0, 2 Pi}, Axes -> None, Background -> ColorData["Legacy", "Mint"],
- PlotStyle -> Directive[ColorData["Legacy", "OliveDrab"],
- AbsoluteThickness[3]]
- ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement