3D-RecGAN-extended icon indicating copy to clipboard operation
3D-RecGAN-extended copied to clipboard

Meshgrid for 3D shapes

Open samomin46 opened this issue 4 years ago • 1 comments

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.

samomin46 avatar Apr 15 '20 15:04 samomin46

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

Yang7879 avatar Apr 22 '20 18:04 Yang7879