5
$\begingroup$

Please suggest how to plot gridlines that passes through centre of contour plot (green line in image):

w0 = 1000*10^-6; l = 8; λ = 532*10^-9; rx = .004; we = 100*10^-6;
qw[r_?NumericQ, ϕ_?NumericQ] := ((r Sqrt[2])/w0)^Abs[l] 
     Exp[-r^2/w0^2] Cos[(l ϕ + .000002* Exp[-1 r^2/(100 we^2)]*(Pi/λ))]^2

ContourPlot[Evaluate[qw[Sqrt[x^2 + y^2], ArcTan[x, y]]], {x, -rx, rx }, {y, -rx, rx},
     Mesh -> None, PlotPoints -> 40, PlotRange -> All, 
     ImageSize -> {400, 400}, PlotRange -> All, 
     PerformanceGoal -> {"Speed", "Quality"}, ColorFunction -> "Rainbow"]

enter image description here

$\endgroup$
1
  • $\begingroup$ Well, a related problem that is easy to solve is to draw lines in the direction of steepest descent, since this direction is given by the gradient. We could use NDSolve to find those lines. For this problem, we would have to do something similar but instead of the gradient, we would need to figure out the direction of "slowest" descent. Unfortunately, I can't think of a way to get that direction other than taking small steps and minimizing the gradient as a function direction at every step, which is a bit cumbersome to implement. $\endgroup$
    – C. E.
    Aug 24, 2018 at 21:59

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.