function Out = CompleteCuboid(Data)
    % complete cuboid
    % Data: numFrames x 9 (3 cuboid corners * 3D)

    EdgeSizes = [78, 39, 19.5]; % Longest to shortest in mm
    Out = zeros(size(Data, 1), 8 * 3); % numFrames x 24 (8 cuboid corners * 3D)

    for i = 1:size(Data, 1)
        P1 = Data(i, 1:3);
        P2 = Data(i, 4:6);
        P3 = Data(i, 7:9);

        % Guarantees: Annotation has three points 1-2-3
        % a: 2-1 vector is the longest cuboid edge
        % b: 2-3 is the second longest
        % c: The cross product of the above pointing away from the camera is the third longest side
        a = P1 - P2; a = a / norm(a); % 1 to 2, longest side
        b = P3 - P2; b = b / norm(b); % 2 to 3, second longest
        c = cross(a, b); c = c / norm(c);
        % Make sure it points away from camera
        if(c(3) < 0)
            c = c * -1;
        end

        % Find the 8 corners now
        P4 = P1 + c * EdgeSizes(3);
        P5 = P2 + c * EdgeSizes(3);
        P6 = P3 + c * EdgeSizes(3);
        P7 = P3 + a * EdgeSizes(1);
        P8 = P7 + c * EdgeSizes(3);
        Out(i, :) = [P1, P2, P3, P4, P5, P6, P7, P8]; 
    end
end