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
    What do you mean "8 pixels"? You mean the area has 8 pixels? Or a side has length 8 pixels? Why can't you find all values of the pixels and "fit",using for instance [Integer sequences](http://oeis.org/)?2011-04-02
  • 0
    The problem you have is that these numbers are not really integers. If you take a diagonal from the centre, you get something like 12 black, 1 grey, 6 white, 1 grey, 4 black, 1 grey, 3 white, 1 grey, 3 black, 1 grey, 2 white, 1 grey, 2 black, 1 grey, 2 white, 1 grey, etc. You are not going to be able to reproduce this using integer sequences.2011-04-02
  • 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
    BON! SUPER BON!2011-04-02
  • 0
    wow! perffect, thanks! Two remained doubt (sorry for my poor math background): 1) why $sign(sin(x^2))$ give a square? 2) how can i achive parametric formulas $x = \dots$, $y=\dots$ ?2011-04-02
  • 0
    I think you better use the very first formula. The others were just trials. Anyway, are you asking why the end result gives squares or are you asking why I use $x^2$? The $x^2$ is giving the right decreasing behaviour for the size of the white pixel blocks. It follows from the laws of diffraction on the [zone plate page](http://en.wikipedia.org/wiki/Zone_plate). The squares in the figure follow from how I combine the functions.2011-04-03
  • 0
    thanks! sorry for the late, i'm asking why if i plot in wolframalpha $sign(sin(x^2))$ it plot a square wave..2011-04-04
  • 0
    Well, the $\sin$ function is obviously a harmonic wave. The sign function just takes the sign of a number. Since $\sin$ oscillates between positive and negative values, the sign jumps from $+1$ to $-1$ and back, which results in a square wave or block wave.2011-04-04
  • 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