How Can You Project and Combine Two Topographical Curves onto the XY Plane?

In summary, you are trying to overlay two functions in different planes and need help with the pseudo code.
  • #1
swartzism
103
0
My question is a lot simpler than the whole process, but I've reached a plateau and need a push. My issue is that I want to take 2 curves, one in the XZ-plane, the other in the YZ-plane, combine them and project them down to the XY plane, but make it topographical (i.e. contain Z values given an (X,Y) coordinate).

I'm working with a very simple case of f(x) = exp(-x^2) and f(y) = exp(-y^2), so identical curves, just in different planes. The f(x) will give coordinates in (x,z) form, and f(y) gives (y,z). I'll worry about the programming, I just need help with the pseudoocode mathematics.

I'm not sure how to go about overlaying the two functions. I believe this should be a projection-type problem. I essentially have two vectors, let's call them fcnx (XZ) and fcny (YZ). The x and y values from the two will give me my (x,y) coordinate as desired, the z values are where I'm having my brain fart. Should I be taking the magnitude of the two z values? (sqrt(z1^2 + z2^2)?)

Any help?

Thanks in advance,

MS
 
Technology news on Phys.org
  • #2
One way to look at the problem is that at each value of x, say x_0, you reproduce the function of y: f(x, 0) = exp(-x^2), f(0, y) = exp(-y^2), f(x0, y) = f(x0, 0)*f(0, y) and so on.

The end effect is f(x,y) = f(x, 0) * f(0, y) = exp(-x^2) * exp(-y^2) = exp(-(x^2+y^2)) = exp(-r^2) where r^2 = x^2+y^2 is the distance from the origin, so this is a nice isotropic function.

If your optics are more complicated, then your MTF can be anisotropic and the assumption that the MTF can be written as a product of the functions along the x- and y-axes breaks down.

In that case you have to work out the MTF as function of both coordinates from the beginning. Knowing only the projections of functions along the coordinate axes is not enough.
 
  • #3
swartzism said:
My question is a lot simpler than the whole process, but I've reached a plateau and need a push. My issue is that I want to take 2 curves, one in the XZ-plane, the other in the YZ-plane, combine them and project them down to the XY plane, but make it topographical (i.e. contain Z values given an (X,Y) coordinate).

I'm working with a very simple case of f(x) = exp(-x^2) and f(y) = exp(-y^2), so identical curves, just in different planes. The f(x) will give coordinates in (x,z) form, and f(y) gives (y,z). I'll worry about the programming, I just need help with the pseudoocode mathematics.

I'm not sure how to go about overlaying the two functions. I believe this should be a projection-type problem. I essentially have two vectors, let's call them fcnx (XZ) and fcny (YZ). The x and y values from the two will give me my (x,y) coordinate as desired, the z values are where I'm having my brain fart. Should I be taking the magnitude of the two z values? (sqrt(z1^2 + z2^2)?)

Any help?

Thanks in advance,

MS

Hey swartzism and welcome to the forums.

Are you aware of holographic representations of information? These are general ways of encoding 3D data on a 2D projection-like surface.

If you have constraints (like for example you have a minimum lattice structure for your representation), then you can use this to construct a specific projection operator that will preserve bijectivity information when going from 3D to 2D.

Do you have any such constraints?
 
  • #4
chiro - I don't believe so.

I've got my code doing what I want it to do so far. I don't believe that this is a real MTF from what I've read.

Code:
dim = 28;

fcnx    = zeros(1,dim);
fcny    = zeros(1,dim);
zval    = zeros(dim,dim);

% Fills 'dimension' matrix
dim_mtx = linspace(-1,1,dim);

% Define values for 2 functions fcnx (XZ), fcny (YZ)
for indx = 1:dim
    fcnx(indx) = exp(-dim_mtx(indx).^2);
    fcny(indx) = exp(-dim_mtx(indx).^2);
end

% Calculate Z values in a function zval using distance from the origin of (xi,yi)
for indx = 1:dim
    for jndx = 1:dim
        dist = sqrt(dim_mtx(indx).^2 + dim_mtx(jndx).^2);
        zval(indx,jndx) = sqrt((fcnx(indx)*dim_mtx(indx)/dist).^2 + (fcny(jndx)*dim_mtx(jndx)/dist).^2);
    end
end

% Plot surface
surf(zval,'DisplayName','zval');figure(gcf)

Very poorly written code so far, but I just wanted it to work. I'm going to make it pretty and nice.
 
  • #5


The Modulated Transfer Function is a mathematical tool used to describe the process of combining two signals or functions. In your case, you are looking to combine two curves in different planes and project them onto the XY plane, while also including z-values.

To do this, you can use the following steps:

1. Start by defining your two functions, f(x) and f(y), as exp(-x^2) and exp(-y^2), respectively.

2. Next, create two vectors, fcnx and fcny, which represent the (x,z) and (y,z) coordinates of your curves, respectively.

3. Now, for each (x,y) coordinate, you will need to find the corresponding z-value. This can be done by taking the average or maximum of the z-values from fcnx and fcny at that particular (x,y) coordinate.

4. Once you have the (x,y,z) coordinates for each point, you can plot them on a 3D surface to create a topographical representation of your combined curves.

In terms of the pseudo-code mathematics, you can use the following steps:

1. Define your functions f(x) and f(y) as exp(-x^2) and exp(-y^2), respectively.

2. Create two vectors, fcnx and fcny, which represent the (x,z) and (y,z) coordinates of your curves, respectively.

3. For each (x,y) coordinate, find the corresponding z-value by taking the average or maximum of the z-values from fcnx and fcny.

4. Plot the (x,y,z) coordinates on a 3D surface to create a topographical representation of your combined curves.

I hope this helps to push you past your plateau and continue making progress on your project. Good luck!
 

Related to How Can You Project and Combine Two Topographical Curves onto the XY Plane?

1. What is a Modulated Transfer Function?

A Modulated Transfer Function (MTF) is a quantitative measure of a system's ability to transfer or reproduce spatial frequencies accurately. It is commonly used in optical engineering to evaluate the performance of imaging systems and lenses.

2. How is MTF measured?

MTF is typically measured by projecting a pattern of alternating black and white lines onto the system and analyzing the resulting image. The MTF is then calculated by comparing the contrast of the lines in the projected pattern to the contrast of the lines in the resulting image.

3. What factors affect MTF?

MTF can be affected by a variety of factors, including the quality and design of the optical components, the wavelength of light used, and the alignment and stability of the system. Other factors such as environmental conditions and manufacturing defects can also impact MTF.

4. How is MTF used in practical applications?

In addition to evaluating the performance of imaging systems, MTF is also used in the design and optimization of optical components and systems. It can also be used to assess the effects of various factors, such as lens coatings and image processing algorithms, on the final image quality.

5. What are the limitations of using MTF?

While MTF is a useful tool for evaluating the performance of optical systems, it does have some limitations. It does not take into account other factors that can affect image quality, such as noise and distortion. Additionally, MTF measurements may not accurately reflect real-world performance, as they are often based on idealized conditions and may not account for variations in actual usage scenarios.

Similar threads

  • Programming and Computer Science
Replies
4
Views
1K
  • Calculus and Beyond Homework Help
Replies
8
Views
763
  • Precalculus Mathematics Homework Help
Replies
15
Views
1K
Replies
3
Views
1K
  • Introductory Physics Homework Help
Replies
6
Views
2K
Replies
1
Views
1K
Replies
32
Views
3K
  • Calculus and Beyond Homework Help
Replies
9
Views
1K
Replies
8
Views
649
Back
Top