Making a zone plate in C++

P

Pieter

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.
 
L

lbonafide

PS: Sorry if my english is not always correct or did some misspelling.

Your English is fine, I just have no idea what a zone plate is. Maybe
someone else here will, but you may be better asking in a forum or
group dedicated to your field.
 
P

Pieter

<snip>




Your English is fine, I just have no idea what a zone plate is.  Maybe
someone else here will, but you may be better asking in a forum or
group dedicated to your field.

Hi, thx for the quick response.
I already searched the web for some information, but the most is going
over the use of zone plate in optics. I found a pdf wich gives you a
very good impression of what a zone plate is and also a the end there
is a program which can create zone plates, but if you look at the
figures in the pdf you'll have a good impression of what a zone plate
is. The one I want to build can be found at page 10.
Link: http://www.omnitek.tv/admin/old_support/OmniTek_White_Paper_2_Zone_Plate_Generator_V01[1].pdf
And indeed, maybe I should search for an other forum, but it's really
hard to find one.

Greets
Pieter
 
R

Richard Herring

In message
Hi, thx for the quick response.
I already searched the web for some information, but the most is going
over the use of zone plate in optics. I found a pdf wich gives you a
very good impression of what a zone plate is and also a the end there
is a program which can create zone plates, but if you look at the
figures in the pdf you'll have a good impression of what a zone plate
is. The one I want to build can be found at page 10.
Link:
http://www.omnitek.tv/admin/old_support/OmniTek_White_Paper_2_Zone_Plate
_Generator_V01%5B1%5D.pdf
And indeed, maybe I should search for an other forum, but it's really
hard to find one.

You asked about doing this, whatever it is, "in C++", but that
qualification appears to be irrelevant, as the code you posted was basic
floating-point arithmetic which wouldn't be substantively different in
Fortran, Java or Visual Basic. That really does suggest that you've
picked the wrong group to ask this question. Possibly somewhere in
comp.graphics.* (e.g. algorithms?) would be more appropriate?
 
P

Pieter

In message





You asked about doing this, whatever it is, "in C++", but that
qualification appears to be irrelevant, as the code you posted was basic
floating-point arithmetic which wouldn't be substantively different in
Fortran, Java or Visual Basic. That really does suggest that you've
picked the wrong group to ask this question. Possibly somewhere in
comp.graphics.* (e.g. algorithms?) would be more appropriate?

Sorry that I asked the question, just thought it was in the correct
group. I'am so familiar with all these groups and will follow the
given advise, I will ask my question in an other group.

Thanks for the replies.
Pieter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,682
Members
48,796
Latest member
Greg L.

Latest Threads

Top