0

Is there any C++ library which has function like isosurface for MatLab?

Here is the example of what I need:

clc
clear

n = 30;       

x = linspace(-125,125,n); 
y = linspace(-125,125,n); 
z = linspace(-260,25,n);

[X,Y,Z] = meshgrid(x,y,z);
[X2,Y2] = meshgrid(x,y);

quan=abs(3.15*exp(-(X2.^2+Y2.^2)/(2*(28.8)^2)));
Quan=repmat(quan,[1 1 n]);

P=-Z-10*Quan
pv=isosurface(X,Y,Z,P,0);

pa=patch(pv);
xi=pv.vertices(:,1);
yi=pv.vertices(:,2);
zi=pv.vertices(:,3);

[zn]=griddata(xi,yi,zi,X2,Y2);

surf(zn);
JasonMArcher
  • 14,195
  • 22
  • 56
  • 52
  • I dont need to visualise it. What i did in matlab was extracting isosurface from N*N*N matrix and then extracting N*N matrix from given structure so i could for example plot it using mesh command. – user1364012 May 02 '13 at 13:07
  • examples would be great to focus the discussion – Shai May 02 '13 at 13:13

0 Answers0