cube.vertices = [
    -1 -1 -1
    1 -1 -1
    -1 1 -1
    1 1 -1
    -1 -1 1
    1 -1 1
    -1 1 1
    1 1 1];
cube.quads = [
    5 6 8 7
    7 8 4 3
    3 4 2 1
    1 2 6 5
    6 2 4 8
    1 5 7 3];

q = size(cube.quads,1);
n = 2*q;
cube.triangles = zeros(n, 3);
for i=1:q
    cube.triangles(2*i-1, :) = [cube.quads(i,1), cube.quads(i,2), cube.quads(i,3)];
    cube.triangles(2*i, :) = [cube.quads(i,1), cube.quads(i,3), cube.quads(i,4)];
end

scale = [1 1 1];
m = size(cube.vertices,1);
for i=1:m
    cube.vertices(i,:) = cube.vertices(i,:) .* scale;
end

[COM, I] = mass_properties(cube)
