3
$\begingroup$

I understand this is a weird question, but I think this could be a place in which I could find the answer.

I'm trying to reprodice this image: enter image description here

with a java applet. I know that this image is a grid-Fresnel zone plate" but unfortunately I don't know the reference.

I've measured the white square and this is the result (in pixels):

  • the bigger dot is 8 pixel
  • the second bigger is 6
  • the third is 2

Now i have 8, 6, 2... How can I get the generating function of these numbers?

I hope it's clear, sorry but english is not my first language.

  • 0
    @Henry: Yeah, never mind that. I found a solution anyway.2011-04-02

1 Answers 1

5

EDIT2: After a bit of fiddling around, I found this one works best:

$I(x,y)=\frac{(1-\mbox{sign}(\cos(kx^2)))(1-\mbox{sign}(\cos(ky^2)))}{4}$

See the plot in Wolfram Alpha: plot.


Looking at the wikipage for zone plates, there is a formula for the opacity in the spherical case. But it is easy to adapt to other cases by changing $r=\sqrt{x^2+y^2}$ by another metric like $r=\max(|x|,|y|)$ or $r=|x|+|y|$. Then you just have to adjust the free parameter $k$.

So, you can try a formula of the following form:

$I(x,y)=\frac{1\pm \mbox{sign}(\cos(k\max(x^2,y^2))}{2}$

with $k$ a free parameter you can choose to try to fit what you have in your picture.

EDIT : Sorry, I made a mistake, since the function I propose you above gives concentric squares. The following formula should do the trick however:

$I(x,y)=\frac{2+\mbox{sign}(\sin(kx^2))+\mbox{sign}(\sin(ky^2))}{2} \; .$

  • 1
    Alternatively, you could use a construct like $(-1)^{\lfloor x\rfloor}$ for square waves... what to use depends on whether it's easier to compute a sine or a power in your environment...2011-04-07