daily pastebin goal
0%
SHARE
TWEET

Untitled

a guest Feb 18th, 2019 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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.  ]
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top