Guest User

Untitled

a guest
Feb 18th, 2019
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. θnew[r0_] := ArcTan[r Sin[θ]/(r Sin[θ] - r0)]
  2.  
  3. field =
  4. {FullSimplify[Cos[num (θ + α)] Cos[θ] + Sin[num (θ + α)] Sin[θ]],
  5. FullSimplify[-Cos[num (θ + α)] Sin[θ] + Sin[num (θ + α)] Cos[θ]]} /.
  6. num -> 1 /. α -> Pi/2 /. θ -> θnew[0.5]
  7.  
  8. VectorPlot[
  9. Evaluate @ TransformedField["Polar" -> "Cartesian", field, {r, θ} -> {x, y}],
  10. {x, -1, 1}, {y, -1, 1},
  11. RegionFunction -> Function[{x, y}, x^2 + y^2 > .2]]
  12.  
  13. Manipulate[
  14. StreamPlot[
  15. Evaluate[
  16. s/3 ( Grad[1/Sqrt[(x + s)^2 + y^2], {x, y}] -
  17. Grad[1/Sqrt[(x - s)^2 + y^2], {x, y}]) + {0.2, 0}],
  18. {x, -4, 4}, {y, -4, 4}, StreamMarkers -> "Pointer",
  19. StreamPoints -> Fine],
  20. {s, 0, 2}
  21. ]
Add Comment
Please, Sign In to add comment