| Author |
Comment/Response |
J.E
|
09/21/07 00:17am
Hi all,
Now I am trying to get a spot diagram for spherical aberration. Here is the code.
\[Theta] := RandomReal[]*2 \[Pi]
\[Rho] := RandomReal[]^(1/2)
x := \[Rho]*Cos[\[Theta]]
y := \[Rho]*Sin[\[Theta]]
y1 := (x^2 + y^2)*y
x1 := (x^2 + y^2)*x
t4 = ListPlot[
Table[(i = x1; j = y1; If[i^2 + j^2 < 1, {i, j}]), {4000}],
PlotRange -> {{-1, 1}, {-1, 1}}];
Show[t1, t4]
Mathematically, spherical aberration is given by the derivative of rho^4, so 4*rho^3 is what I want to plot. I simply ignore a coefficient 4.
I suppose to see circular spot having high density at the center but I could not see it. However, if I use
ListPolarPlot[Table[\[Rho]^3, {4000}],
PlotRange -> {{-1, 1}, {-1, 1}}];
I can see what I want. Only difference is whether I use polar coordinate. If someone know a problem, could you help me?
Thanks,
URL: , |
|