473,395 Members | 1,977 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Making a zone plate in C++

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.
Apr 1 '08 #1
4 2837
On Apr 1, 9:04*am, Pieter <pieter.huy...@gmail.comwrote:

<snip>
>
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.
Apr 1 '08 #2
On 1 apr, 16:17, lbonaf...@yahoo.com wrote:
On Apr 1, 9:04*am, Pieter <pieter.huy...@gmail.comwrote:

<snip>
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.
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_supp...V01%5B1%5D.pdf
And indeed, maybe I should search for an other forum, but it's really
hard to find one.

Greets
Pieter
Apr 1 '08 #3
In message
<bf**********************************@e10g2000prf. googlegroups.com>,
Pieter <pi***********@gmail.comwrites
>On 1 apr, 16:17, lbonaf...@yahoo.com wrote:
>On Apr 1, 9:04*am, Pieter <pieter.huy...@gmail.comwrote:

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

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_supp...r_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?
--
Richard Herring
Apr 1 '08 #4
On 1 apr, 17:32, Richard Herring <ju**@[127.0.0.1]wrote:
In message
<bf5efa75-3b67-4bdd-bb65-72d0046cf...@e10g2000prf.googlegroups.com>,
Pieter <pieter.huy...@gmail.comwrites
On 1 apr, 16:17, lbonaf...@yahoo.com wrote:
On Apr 1, 9:04*am, Pieter <pieter.huy...@gmail.comwrote:
<snip>
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.
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_supp...r_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?

--
Richard Herring
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
Apr 2 '08 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: yawnmoth | last post by:
gmdate('F j, Y, g:i a',0) returns January 1, 1970, 12:00 am. How do I add to the second parameter of the date function to make it always return that same date, regardless of the time zone?...
2
by: Jason Priebe | last post by:
I'm a bit confused about SET TIME ZONE and its effect on PostgreSQL's date processing. In my experience with timestamps in all other *nix-based software systems, a timestamp is always a numeric...
2
by: MLH | last post by:
I would like to be able to look up any 5-digit ZIP in a table that would show the correct time zone for the area. For example, I would like to look up 91915 in the table and see something that...
3
by: Jon Davis | last post by:
The date string: "Thu, 17 Jul 2003 12:35:18 PST" The problem: // this fails on PST DateTime myDate = DateTime.Parse("Thu, 17 Jul 2003 12:35:18 PST"); Help? Jon
1
by: Clodoaldo Pinto Neto | last post by:
Hi all, I want to have the time zone string (like 'BRT') displayed after a date-time. The date column is of the type timestamp with time zone. But the time zone is not displayed. It works for...
4
by: rzimerman | last post by:
I'm hoping to write a program that will read any number of urls from stdin (1 per line), download them, and process them. So far my script (below) works well for small numbers of urls. However, it...
3
by: Satish Itty | last post by:
Hi all, I have a big problem in my hands and not sure how I can fix this. Any suggestions would be greatly appreciated. I have a .NET 3 tier app developed in VS2003 and .NET 1.1. the client is a...
0
by: HandleX609 | last post by:
http://i103.photobucket.com/albums/m135/handlex/RandomPhotos/Buttsex_to-Korn.jpg This is the snapshot stating the event for a certain zone. ...
7
by: Steve | last post by:
Hi All I have a windows application written in VB.net 2005 The users have to select a State of Australia, which I use to check they have the correct windows time zone selected in control panel...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.