volume

AbstractPlotting.volumeFunction
volume(volume_data)

Plots a volume. Available algorithms are:

  • :iso => IsoValue
  • :absorption => Absorption
  • :mip => MaximumIntensityProjection
  • :absorptionrgba => AbsorptionRGBA
  • :additive => AdditiveRGBA
  • :indexedabsorption => IndexedAbsorptionRGBA

Attributes

Available attributes and their defaults for Volume{T} where T are:

  algorithm       :mip
  ambient         Float32[0.55, 0.55, 0.55]
  color           "nothing"
  colormap        :viridis
  colorrange      (0, 1)
  diffuse         Float32[0.4, 0.4, 0.4]
  isorange        0.05
  isovalue        0.5
  lightposition   :eyeposition
  linewidth       1
  nan_color       RGBA{Float32}(0.0f0,0.0f0,0.0f0,0.0f0)
  overdraw        false
  shininess       32.0f0
  specular        Float32[0.2, 0.2, 0.2]
  ssao            false
  transparency    false
  visible         true
source

Examples

using GLMakie

r = LinRange(-1, 1, 100)
cube = [(x.^2 + y.^2 + z.^2) for x = r, y = r, z = r]
cube_with_holes = cube .* (cube .> 1.4)

volume(cube_with_holes, algorithm = :iso, isorange = 0.05, isovalue = 1.7)