Hi,
I'm currently making a basic pattern generator. When you open the
program it draws the selected pattern in a box, you can make the box
also bigger and smaller just by dragging at the corners.
So I also want to implent a zone plate, but I can't get it to work.
Already found following formula: phi = (k*phi) + (kx*x) + (ky*y) +
(kt*t), the last section with kt*t I will not use that.
So I started really simple and just implemted the section with x and
cam to the following formula:
double MaxFreq = 1;
double MinFreq = 0.1;
double step = (MaxFreq - MinFreq)/ (Box.right/2);
double minstep = MinFreq;
q = (((x*minstep)-(127.5))/(127.5));
z = 127.5 + (sin(pi*q)*127. 5);
The minstep is the step between two x's, in this way it is possible to
go from one frequency to an other.
But in my opion there is something wrong with this formula, because
there's now relation between the numbers that I enter for the begin
and end frequency.
Hope that you understand a bit of what I'm doing or maybe I totolly
wrong and is this not the right method to make a zone plate. Is there
somebody who already made a zone plate in C++ and maybe want to share
it with me or give me some instruction?
Thanks a lot already
Pieter
PS: Sorry if my english is not always correct or did some misspelling.
I'm currently making a basic pattern generator. When you open the
program it draws the selected pattern in a box, you can make the box
also bigger and smaller just by dragging at the corners.
So I also want to implent a zone plate, but I can't get it to work.
Already found following formula: phi = (k*phi) + (kx*x) + (ky*y) +
(kt*t), the last section with kt*t I will not use that.
So I started really simple and just implemted the section with x and
cam to the following formula:
double MaxFreq = 1;
double MinFreq = 0.1;
double step = (MaxFreq - MinFreq)/ (Box.right/2);
double minstep = MinFreq;
q = (((x*minstep)-(127.5))/(127.5));
z = 127.5 + (sin(pi*q)*127. 5);
The minstep is the step between two x's, in this way it is possible to
go from one frequency to an other.
But in my opion there is something wrong with this formula, because
there's now relation between the numbers that I enter for the begin
and end frequency.
Hope that you understand a bit of what I'm doing or maybe I totolly
wrong and is this not the right method to make a zone plate. Is there
somebody who already made a zone plate in C++ and maybe want to share
it with me or give me some instruction?
Thanks a lot already
Pieter
PS: Sorry if my english is not always correct or did some misspelling.
Comment