0
$\begingroup$

Now I am a little confused about the reason my plot seems to be not symmetrical. I believe the plot should like several circles while it is not. Here is my code. And the picture looks like this.

DensityPlot[BesselJ[1, Sqrt[x^2 + y^2]], {x, -20, 20}, {y, -20, 20}, 

Mesh -> False] enter image description here

And when I expand the region, it seems to be worse:

DensityPlot[BesselJ[1, Sqrt[x^2 + y^2]], {x, -200, 200}, {y, -200, 200},Mesh -> False]

enter image description here

I wonder if anyone knows the reason why it looks like that?

$\endgroup$

closed as off-topic by Bob Hanlon, m_goldberg, halirutan Jul 24 '18 at 13:30

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – Bob Hanlon, m_goldberg, halirutan
If this question can be reworded to fit the rules in the help center, please edit the question.

6
$\begingroup$

The Bessel functions are highly oscillating and

DensityPlot[BesselJ[1, Sqrt[x^2 + y^2]], {x, -200, 200}, {y, -200, 200}, 
 Mesh -> All]

enter image description here

shows you that the triangle grid on which this is plotted is much too coarse. The grid cannot capture details, if the maximum edge length of each triangle is not smaller than "half the wavelength".

Try

DensityPlot[BesselJ[1, Sqrt[x^2 + y^2]], {x, -20, 20}, {y, -20, 20}, 
 PlotPoints -> 100]

enter image description here

For the second plot, the number of buckles within the plot range is so large that we have to crank up the PlotPoints even more:

DensityPlot[
 BesselJ[1, Sqrt[x^2 + y^2]], {x, -200, 200}, {y, -200, 200}, 
 Mesh -> None, PlotPoints -> 300]

enter image description here

$\endgroup$
4
$\begingroup$

The documentation for DensityPlot states:

Mathematica graphics

Animate[
 DensityPlot[
  BesselJ[1, Sqrt[x^2 + y^2]]
  , {x, -20, 20}
  , {y, -20, 20}
  , Mesh -> False
  , PlotPoints -> k
  , PlotLabel -> StringTemplate["PlotPoints->``"][k]
  ]
 , {k, 2, 50, 1}
 ]

enter image description here

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.