4 deleted 99 characters in body
source | link

Update: Using Raster3D and a variation of func that returns 4-tuples

 data3C = RandomReal[1, {10, 6}]; 
 func3C = Nearest[{#, #2, #3} -> {##4, .03} & @@@ data3C];
 tbl3C = Table[  First[func3C[{x, y, z}]] // Quiet, {x, 0, 1, .01}, 
  {y, 0, 1, .01}, {z, 0, 1, .01}];

Examples:

 Row[Labeled[Graphics3D[Raster3D[tbl3C, ColorFunction -> #,
  Method -> {"InterpolateValues" -> True}],
 Background -> Black, ImageSize -> 400, 
 SphericalRegion -> True], #, Top] & /@
{Hue, RGBColor, (GrayLevel[#[[1]], .03] &)}, Spacer[5]]

enter image description hereVoronoi images

colorRules = Thread[# -> (ColorData[1, "ColorList"][[;; Length@#]])] &[
Flatten[tbl3C, 2] // DeleteDuplicates] /.  RGBColor -> List;
Row[Labeled[ Graphics3D[Raster3D[tbl3C /. colorRules, ColorFunction -> #,
  Method -> {"InterpolateValues" -> True}],
 Background -> Black, ImageSize -> 400, 
 SphericalRegion -> True], #, Top] & /@
{(RGBColor[#[[1]], #[[2]], #[[3]], .01] &),
(RGBColor[#[[1]], #[[2]], #[[3]], .03] &),
(RGBColor[#[[1]], #[[2]], #[[3]], .05] &)}, Spacer[5]]

enter image description hereVoronoi images at various opacities


Using version-9 built-in Image3D with @Mr.Wizard's func:

  data = RandomReal[1, {20, 4}]; 
  func = Nearest[{#, #2, #3} -> #4 & @@@ data];
  dta = Table[func[{x, y, z}] // Quiet, {x, 0, 1, .005}, {y, 0, 1, .005}, {z, 0,    1, .005}];

  Grid[Partition[
   Image3D[dta, 
   ImageSize -> 350, ColorFunction -> #, Background -> Black] & /@
   {"SunsetColorsOpacity", "RainbowOpacity", "WhiteBlackOpacity",
    (Append[Blend[{LightBlue, Blue, Yellow}, #], #] &)}, 2]]

enter image description hereWizard's example

Update: Using Raster3D and a variation of func that returns 4-tuples

 data3C = RandomReal[1, {10, 6}]; 
 func3C = Nearest[{#, #2, #3} -> {##4, .03} & @@@ data3C];
 tbl3C = Table[  First[func3C[{x, y, z}]] // Quiet, {x, 0, 1, .01}, 
  {y, 0, 1, .01}, {z, 0, 1, .01}];

Examples:

 Row[Labeled[Graphics3D[Raster3D[tbl3C, ColorFunction -> #,
  Method -> {"InterpolateValues" -> True}],
 Background -> Black, ImageSize -> 400, 
 SphericalRegion -> True], #, Top] & /@
{Hue, RGBColor, (GrayLevel[#[[1]], .03] &)}, Spacer[5]]

enter image description here

colorRules = Thread[# -> (ColorData[1, "ColorList"][[;; Length@#]])] &[
Flatten[tbl3C, 2] // DeleteDuplicates] /.  RGBColor -> List;
Row[Labeled[ Graphics3D[Raster3D[tbl3C /. colorRules, ColorFunction -> #,
  Method -> {"InterpolateValues" -> True}],
 Background -> Black, ImageSize -> 400, 
 SphericalRegion -> True], #, Top] & /@
{(RGBColor[#[[1]], #[[2]], #[[3]], .01] &),
(RGBColor[#[[1]], #[[2]], #[[3]], .03] &),
(RGBColor[#[[1]], #[[2]], #[[3]], .05] &)}, Spacer[5]]

enter image description here


Using version-9 built-in Image3D with @Mr.Wizard's func:

  data = RandomReal[1, {20, 4}]; 
  func = Nearest[{#, #2, #3} -> #4 & @@@ data];
  dta = Table[func[{x, y, z}] // Quiet, {x, 0, 1, .005}, {y, 0, 1, .005}, {z, 0,    1, .005}];

  Grid[Partition[
   Image3D[dta, 
   ImageSize -> 350, ColorFunction -> #, Background -> Black] & /@
   {"SunsetColorsOpacity", "RainbowOpacity", "WhiteBlackOpacity",
    (Append[Blend[{LightBlue, Blue, Yellow}, #], #] &)}, 2]]

enter image description here

Update: Using Raster3D and a variation of func that returns 4-tuples

 data3C = RandomReal[1, {10, 6}]; 
 func3C = Nearest[{#, #2, #3} -> {##4, .03} & @@@ data3C];
 tbl3C = Table[  First[func3C[{x, y, z}]] // Quiet, {x, 0, 1, .01}, 
  {y, 0, 1, .01}, {z, 0, 1, .01}];

Examples:

 Row[Labeled[Graphics3D[Raster3D[tbl3C, ColorFunction -> #,
  Method -> {"InterpolateValues" -> True}],
 Background -> Black, ImageSize -> 400, 
 SphericalRegion -> True], #, Top] & /@
{Hue, RGBColor, (GrayLevel[#[[1]], .03] &)}, Spacer[5]]

Voronoi images

colorRules = Thread[# -> (ColorData[1, "ColorList"][[;; Length@#]])] &[
Flatten[tbl3C, 2] // DeleteDuplicates] /.  RGBColor -> List;
Row[Labeled[ Graphics3D[Raster3D[tbl3C /. colorRules, ColorFunction -> #,
  Method -> {"InterpolateValues" -> True}],
 Background -> Black, ImageSize -> 400, 
 SphericalRegion -> True], #, Top] & /@
{(RGBColor[#[[1]], #[[2]], #[[3]], .01] &),
(RGBColor[#[[1]], #[[2]], #[[3]], .03] &),
(RGBColor[#[[1]], #[[2]], #[[3]], .05] &)}, Spacer[5]]

Voronoi images at various opacities


Using version-9 built-in Image3D with @Mr.Wizard's func:

data = RandomReal[1, {20, 4}]; 
func = Nearest[{#, #2, #3} -> #4 & @@@ data];
dta = Table[func[{x, y, z}] // Quiet, {x, 0, 1, .005}, {y, 0, 1, .005}, {z, 0, 1, .005}];

Grid[Partition[
 Image3D[dta, 
 ImageSize -> 350, ColorFunction -> #, Background -> Black] & /@
 {"SunsetColorsOpacity", "RainbowOpacity", "WhiteBlackOpacity",
  (Append[Blend[{LightBlue, Blue, Yellow}, #], #] &)}, 2]]

Wizard's example

3 added 1319 characters in body
source | link

Update: Using Raster3D and a variation of func that returns 4-tuples

 data3C = RandomReal[1, {10, 6}]; 
 func3C = Nearest[{#, #2, #3} -> {##4, .03} & @@@ data3C];
 tbl3C = Table[  First[func3C[{x, y, z}]] // Quiet, {x, 0, 1, .01}, 
  {y, 0, 1, .01}, {z, 0, 1, .01}];

Examples:

 Row[Labeled[Graphics3D[Raster3D[tbl3C, ColorFunction -> #,
  Method -> {"InterpolateValues" -> True}],
 Background -> Black, ImageSize -> 400, 
 SphericalRegion -> True], #, Top] & /@
{Hue, RGBColor, (GrayLevel[#[[1]], .03] &)}, Spacer[5]]

enter image description here

colorRules = Thread[# -> (ColorData[1, "ColorList"][[;; Length@#]])] &[
Flatten[tbl3C, 2] // DeleteDuplicates] /.  RGBColor -> List;
Row[Labeled[ Graphics3D[Raster3D[tbl3C /. colorRules, ColorFunction -> #,
  Method -> {"InterpolateValues" -> True}],
 Background -> Black, ImageSize -> 400, 
 SphericalRegion -> True], #, Top] & /@
{(RGBColor[#[[1]], #[[2]], #[[3]], .01] &),
(RGBColor[#[[1]], #[[2]], #[[3]], .03] &),
(RGBColor[#[[1]], #[[2]], #[[3]], .05] &)}, Spacer[5]]

enter image description here


Using version-9 built-in Image3D with @Mr.Wizard's func:

  data = RandomReal[1, {20, 4}]; 
  func = Nearest[{#, #2, #3} -> #4 & @@@ data];
  dta = Table[func[{x, y, z}] // Quiet, {x, 0, 1, .005}, {y, 0, 1, .005}, {z, 0,    1, .005}];

  Grid[Partition[
   Image3D[dta, 
   ImageSize -> 350, ColorFunction -> #, Background -> Black] & /@
   {"SunsetColorsOpacity", "RainbowOpacity", "WhiteBlackOpacity",
    (Append[Blend[{LightBlue, Blue, Yellow}, #], #] &)}, 2]]

enter image description here

Using version-9 built-in Image3D with @Mr.Wizard's func:

  data = RandomReal[1, {20, 4}]; 
  func = Nearest[{#, #2, #3} -> #4 & @@@ data];
  dta = Table[func[{x, y, z}] // Quiet, {x, 0, 1, .005}, {y, 0, 1, .005}, {z, 0,    1, .005}];

  Grid[Partition[
   Image3D[dta, 
   ImageSize -> 350, ColorFunction -> #, Background -> Black] & /@
   {"SunsetColorsOpacity", "RainbowOpacity", "WhiteBlackOpacity",
    (Append[Blend[{LightBlue, Blue, Yellow}, #], #] &)}, 2]]

enter image description here

Update: Using Raster3D and a variation of func that returns 4-tuples

 data3C = RandomReal[1, {10, 6}]; 
 func3C = Nearest[{#, #2, #3} -> {##4, .03} & @@@ data3C];
 tbl3C = Table[  First[func3C[{x, y, z}]] // Quiet, {x, 0, 1, .01}, 
  {y, 0, 1, .01}, {z, 0, 1, .01}];

Examples:

 Row[Labeled[Graphics3D[Raster3D[tbl3C, ColorFunction -> #,
  Method -> {"InterpolateValues" -> True}],
 Background -> Black, ImageSize -> 400, 
 SphericalRegion -> True], #, Top] & /@
{Hue, RGBColor, (GrayLevel[#[[1]], .03] &)}, Spacer[5]]

enter image description here

colorRules = Thread[# -> (ColorData[1, "ColorList"][[;; Length@#]])] &[
Flatten[tbl3C, 2] // DeleteDuplicates] /.  RGBColor -> List;
Row[Labeled[ Graphics3D[Raster3D[tbl3C /. colorRules, ColorFunction -> #,
  Method -> {"InterpolateValues" -> True}],
 Background -> Black, ImageSize -> 400, 
 SphericalRegion -> True], #, Top] & /@
{(RGBColor[#[[1]], #[[2]], #[[3]], .01] &),
(RGBColor[#[[1]], #[[2]], #[[3]], .03] &),
(RGBColor[#[[1]], #[[2]], #[[3]], .05] &)}, Spacer[5]]

enter image description here


Using version-9 built-in Image3D with @Mr.Wizard's func:

  data = RandomReal[1, {20, 4}]; 
  func = Nearest[{#, #2, #3} -> #4 & @@@ data];
  dta = Table[func[{x, y, z}] // Quiet, {x, 0, 1, .005}, {y, 0, 1, .005}, {z, 0,    1, .005}];

  Grid[Partition[
   Image3D[dta, 
   ImageSize -> 350, ColorFunction -> #, Background -> Black] & /@
   {"SunsetColorsOpacity", "RainbowOpacity", "WhiteBlackOpacity",
    (Append[Blend[{LightBlue, Blue, Yellow}, #], #] &)}, 2]]

enter image description here

2 added 11 characters in body
source | link

Using version-9 built-in Image3D with @Mr.Wizard's func:

  data = RandomReal[1, {20, 4}]; 
  func = Nearest[{#, #2, #3} -> #4 & @@@ data];
  dta = Table[func[{x, y, z}] // Quiet, {x, 0, 1, .02005}, {y, 0, 1, .02005}, {z, 0,    1, .02005}];

  Grid[Partition[
   Image3D[dta, 
   ImageSize -> 350, ColorFunction -> #, Background -> Black] & /@
   {"SunsetColorsOpacity", "RainbowOpacity", "WhiteBlackOpacity",
    (Append[Blend[{LightBlue, Blue, Yellow}, #], #] &)}, 2]]

enter image description hereenter image description here

Using version-9 built-in Image3D with @Mr.Wizard's func:

  data = RandomReal[1, {20, 4}]; 
  func = Nearest[{#, #2, #3} -> #4 & @@@ data];
  dta = Table[func[{x, y, z}] // Quiet, {x, 0, 1, .02}, {y, 0, 1, .02}, {z, 0,1, .02}];

  Grid[Partition[
   Image3D[dta, 
   ImageSize -> 350, ColorFunction -> #, Background -> Black] & /@
   {"SunsetColorsOpacity", "RainbowOpacity", "WhiteBlackOpacity",
    (Append[Blend[{LightBlue, Blue, Yellow}, #], #] &)}, 2]]

enter image description here

Using version-9 built-in Image3D with @Mr.Wizard's func:

  data = RandomReal[1, {20, 4}]; 
  func = Nearest[{#, #2, #3} -> #4 & @@@ data];
  dta = Table[func[{x, y, z}] // Quiet, {x, 0, 1, .005}, {y, 0, 1, .005}, {z, 0,    1, .005}];

  Grid[Partition[
   Image3D[dta, 
   ImageSize -> 350, ColorFunction -> #, Background -> Black] & /@
   {"SunsetColorsOpacity", "RainbowOpacity", "WhiteBlackOpacity",
    (Append[Blend[{LightBlue, Blue, Yellow}, #], #] &)}, 2]]

enter image description here

1
source | link