3D-RecGAN-extended
3D-RecGAN-extended copied to clipboard
Meshgrid for 3D shapes
Hi there,
I am trying to plot the .mat file using meshgrid but output is blank. I would like to visualize the 3D shapes. You did it in the paper. Would you mind sharing code? if not could you please share anything which can help. Thnx.
Hi @samomin46 , in the paper, I use matlab to visualize the 3D voxel. Here's the code. Hope it's helpful for your research.
function mesh(vol)
threshold=0.5;
[d1,d2,d3]=size(vol);
figure;
[x,y,z]=meshgrid(1:1:d1,1:1:d2,1:1:d3);
p1=patch(isosurface(x,y,z,vol,threshold,'noshare'));
isonormals(x,y,z,vol,p1);
p1.FaceColor = 'red';
p1.EdgeColor = 'none';
camlight;
view(3);
lighting gouraud;
axis equal;
axis off;
end