Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- θnew[r0_] := ArcTan[r Sin[θ]/(r Sin[θ] - r0)]
- field =
- {FullSimplify[Cos[num (θ + α)] Cos[θ] + Sin[num (θ + α)] Sin[θ]],
- FullSimplify[-Cos[num (θ + α)] Sin[θ] + Sin[num (θ + α)] Cos[θ]]} /.
- num -> 1 /. α -> Pi/2 /. θ -> θnew[0.5]
- VectorPlot[
- Evaluate @ TransformedField["Polar" -> "Cartesian", field, {r, θ} -> {x, y}],
- {x, -1, 1}, {y, -1, 1},
- RegionFunction -> Function[{x, y}, x^2 + y^2 > .2]]
- Manipulate[
- StreamPlot[
- Evaluate[
- s/3 ( Grad[1/Sqrt[(x + s)^2 + y^2], {x, y}] -
- Grad[1/Sqrt[(x - s)^2 + y^2], {x, y}]) + {0.2, 0}],
- {x, -4, 4}, {y, -4, 4}, StreamMarkers -> "Pointer",
- StreamPoints -> Fine],
- {s, 0, 2}
- ]
Add Comment
Please, Sign In to add comment