]> gitweb.michael.orlitzky.com - spline3.git/blobdiff - src/Grid.hs
Finish the precomputed_volume optimization.
[spline3.git] / src / Grid.hs
index 7325d2b5b0968f5860834e21b809e9b67995dba8..d9fa975eedc7498989d601394b7e686c72ff0d41 100644 (file)
@@ -57,7 +57,10 @@ cubes g
                  | i <- [0..xmax],
                    j <- [0..ymax],
                    k <- [0..zmax],
-                   let cube_ijk = Cube (h g) i j k (make_values fvs i j k)]
+                   let delta = h g,
+                   let tet_vol = (1/24)*(delta^(3::Int)),
+                   let cube_ijk =
+                         Cube delta i j k (make_values fvs i j k) tet_vol]
      where
        xmax = xsize - 1
        ymax = ysize - 1