|
vedenev <vedenev.maxim@gmail.com> wrote in message <db8acbe1-6a20-484e-a1fa-d76816dfb40c@y24g2000yqb.googlegroups.com>...
> Your data is point cloud, your need to convert it to volume data that
> requared for issosurface. Here example of convert with nearest point
> in for loop:
>
> n=1000;
>
> x=rand(1,n);
> y=rand(1,n);
> z=rand(1,n);
> v=5*rand(1,n);
> %scatter3(x,y,z,v);
>
> % mesh:
> xx=0:0.2:1;
> yy=0:0.2:1;
> zz=0:0.2:1;
> [X,Y,Z] = meshgrid(xx,yy,zz);
>
> % use closest point:
> V=zeros(size(X));
> for nc=1:n
> d2=(X-x(nc)).^2+...
> (Y-y(nc)).^2+...
> (Z-z(nc)).^2;
> [tmp ind]=min(d2(:));
> V(ind)=v(nc);
> end
>
> isosurface(X,Y,Z,V,2);
>
>
> -----------------------------------------
> Maxim Vedenev, MATLAB Custom Programming
> vedenev@ngs.ru
> http://simulations.narod.ru/
Thanks very much for your reply.
Sorry I'm not quite sure I follow it exactly, what is v?
You define it as:
v=5*rand(1,n);
%scatter3(x,y,z,v);
but I don't know how to relate that to my data.
Thank again.
|