Matlab-like isosurface library for c++ -
is there c++ library has function isosurface matlab?
here example of 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);
Comments
Post a Comment