# Two tripods in 3D (one real and one imaginary)

For reference see incontrastsRef.html.

Only plot the contrast: Note: at first time do not use close(1); close(2); init; guideSetGrid3D; close(1); close(2); q3D = twoTripodsRealImag3D(seti.gridROI(1,:),seti.gridROI(2,:), seti.gridROI(3,:), seti); figure(1); contourPlotROI(q3D, seti, 'real'); figure(2); contourPlotROI(q3D, seti, 'imag'); figure(24): plane in imaginary part to control overlap...: seca = -(1-3.5/8); A = reshape(q3D,[91 91 91]); B = A(ind,:,:); P = imag(B); B = squeeze(P); B = transpose(B); figure(3); imagesc(B); colorbar; axis square; axis xy;

    function q = twoTripodsRealImag3D(X1,X2,X3, varargin)

    % 3D cube-like object

    seti = varargin{end};
    R = seti.rCD/2;

    p = -4/8; % start position
    l = 7/8; % length
    w = 1/8; % width

    pl = p+l;
    pw = p+w;
    s = l-w; % shift
    % ps = p+s;

First Tripod (real)

    q1 = 1.0.*arm(R,X1,X2,X3,[p,pl,p,pw,p,pw]); % (x-axis-direction) (first horizontal arc of tripod) (front bottom)
    q2 = 0.8.*arm(R,X1,X2,X3,[p,pw,pw,pl,p,pw]); % (y-axis-direction)
    q3 = 0.6.*arm(R,X1,X2,X3,[p,pw,p,pw,pw,pl]); % (z-axis-direction)

    % *Second Tripod (imaginary)*
    q4 = 1.0.*arm(R,X1,X2,X3,[p,pl,p,pw,p+s,pw+s]); % (x-axis-direction) (back top (+s in x2 and +s in x3))
    q5 = 0.8.*arm(R,X1,X2,X3,[p+s,pw+s,pw,pl,p+s,pw+s]); % (y-axis-direction)
    q6 = 0.6.*arm(R,X1,X2,X3,[p+s,pw+s,p,pw,p,pl-w]); % (z-axis-direction)

    q = q1 + q2 + q3 + 1i.*(q4 + q5 + q6);
    q = double(q);

    end

    function res = arm(R,X1,X2,X3,lim)
    % lim : vector of size 1 x 6 with limits for X1, X2 and X3
    lim = R*lim;
    res = ((lim(1) <= X1) & (X1 < lim(2)) & (lim(3) <= X2) & (X2 < lim(4)) & (lim(5) <= X3) & (X3 < lim(6)));
    end