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

Click For Summary

Discussion Overview

The discussion revolves around the mathematical and programming challenges of projecting and combining two topographical curves from the XZ and YZ planes onto the XY plane, while maintaining Z values corresponding to (X,Y) coordinates. Participants explore the implications of using specific functions and the methods for overlaying these functions in a topographical representation.

Discussion Character

  • Exploratory
  • Technical explanation
  • Mathematical reasoning

Main Points Raised

  • One participant describes their goal of combining two curves, f(x) = exp(-x^2) and f(y) = exp(-y^2), and seeks assistance with the mathematical pseudo-code for projecting these onto the XY plane.
  • Another participant suggests a method of combining the functions by using the product of their values, leading to the isotropic function f(x,y) = exp(-(x^2+y^2)), and notes that this approach may not hold if the system is more complex.
  • The original poster expresses uncertainty about how to handle the Z values when combining the two functions and questions whether to take the magnitude of the Z values.
  • A later reply introduces the concept of holographic representations for encoding 3D data onto a 2D surface and inquires about any constraints that might affect the projection.
  • Another participant shares their progress with code that calculates Z values based on the distance from the origin and expresses a desire to improve the code's presentation.

Areas of Agreement / Disagreement

Participants do not reach a consensus on the best method for combining the Z values or the implications of the proposed mathematical approaches. Multiple viewpoints and methods are presented without resolution.

Contextual Notes

There are limitations regarding the assumptions made about the functions and the potential complexity of the system, which may affect the validity of the proposed methods. The discussion also highlights the need for clarity on constraints that could influence the projection process.

swartzism
Messages
103
Reaction score
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
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.
 
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?
 
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.
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 8 ·
Replies
8
Views
2K
Replies
7
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 32 ·
2
Replies
32
Views
4K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 15 ·
Replies
15
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K