* DensityFunction now uses generics to deal with any type of map (Point3D for 3D, Double for 1D)