

mapObj = containers.Map('KeyType','int32', 'ValueType','any');

for i=1:size(indices,1)/2
    mapObj(rawExV(3*i-2)+1) = [rawExV(3*i-1) rawExV(3*i)];
end

nV = size(VList, 1);
nF = size(FList, 1);
perTriRot = zeros(2,2,nF);
for fi=1:nF 
    perTriRot(:,:,fi) = [exR(4*fi-3) exR(4*fi-1); exR(4*fi-2) exR(4*fi)];
end

new_insideT = FList;
TV = VList;

new_outsideT = [];
num_insideV = 0;
boneRot = 90;

%defV = mosek_deform(new_insideT, new_outsideT, TV, mapObj, 1, false, 1, perTriRot, num_insideV, boneRot);
defV = mosek_deform_soft(new_insideT, new_outsideT, TV, mapObj, 1, false, 1, perTriRot, num_insideV, boneRot);

optiV = [defV zeros(nV,1)];

write2obj(optiV, FList, 'MosekM.obj');