Black Sea Volumetric Rendering
6.837 Computer Graphics   Bill Wallis and Michael Dewberry


Previous Next


Processing the data

The seafloor mesh data was massaged from its raw form into a Matlab matrix for us. This made manipulation of the data much easier, yet some steps still had to be taken.

Take a section of Z:
  Z256 = Z(1:256,1:256);
  (Volumizer ideally wants square textures in a power-of-two size.)

Get just the wreck:
  SITE = Z(45:210,65:230);
  size(SITE) is [166 166]
Make site 256x256:
  [XA YA] = meshgrid(1:256/166:256,1:256/166:256);
  [XI YI] = meshgrid(1:1:256,1:1:256);
  SITE256 = interp2(XA,YA,SITE,XI,YI);                  
Look at it, it's pretty:
  mesh(SITE256);
  daspect([20 20 1]);
Now what are the X and Y extents of SITE256?
  X(45,65) is 22.1031
  X(210,230) is 38.5651
  Y(45,65) is 21.3257
  Y(210,230) is 37.8188
Save it:
  fid = fopen('site.bin','wb');
  fwrite(fid,SITE256,'float64')

Another Perl script, mz5.pl (source) is used to turn this binary matrix file into a three-dimensional tiff.  

   

 



Previous Next