Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Modulated Transfer Function

  1. Jun 13, 2012 #1
    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, lets 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,

  2. jcsd
  3. Jun 13, 2012 #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.
  4. Jun 13, 2012 #3


    User Avatar
    Science Advisor

    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?
  5. Jun 13, 2012 #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 (Text):
    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);

    % 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);

    % Plot surface
    Very poorly written code so far, but I just wanted it to work. I'm gonna make it pretty and nice.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook