colour_visuals.VisualRGBScatter3D#
- class colour_visuals.VisualRGBScatter3D(RGB: ArrayLike, colourspace: RGB_Colourspace | str | Sequence[RGB_Colourspace | LiteralRGBColourspace | str] = 'sRGB', model: LiteralColourspaceModel | str = 'CIE xyY', colour: ArrayLike | None = None, opacity: float = 1, size: float = 2, **kwargs: Any)[source]#
Bases:
MixinPropertyColour,MixinPropertyColourspace,MixinPropertyKwargs,MixinPropertyModel,MixinPropertyOpacity,MixinPropertySize,VisualCreate a 3D RGB scatter visual.
- Parameters:
RGB (ArrayLike) – RGB colourspace array.
colourspace (RGB_Colourspace | str | Sequence[RGB_Colourspace | LiteralRGBColourspace | str]) – RGB colourspace of the RGB array.
colourspacecan be of any type or form supported by thecolour.plotting.common.filter_RGB_colourspaces()definition.model (LiteralColourspaceModel | str) – Colourspace model, see
colour.COLOURSPACE_MODELSattribute for the list of supported colourspace models.colour (ArrayLike | None) – Colour of the visual, if None, the colour is computed from the visual geometry.
opacity (float) – Opacity of the visual.
size (float) – Size of the visual points.
kwargs (Any) – See the documentation of the supported conversion definitions.
Attributes
colourspacemodelcolouropacitysizekwargs
Methods
Examples
>>> import os >>> import pylinalg as la >>> from colour.utilities import suppress_stdout >>> from wgpu.gui.auto import WgpuCanvas >>> with suppress_stdout(): ... canvas = WgpuCanvas(size=(960, 540)) ... scene = gfx.Scene() ... scene.add( ... gfx.Background( ... None, gfx.BackgroundMaterial(np.array([0.18, 0.18, 0.18])) ... ) ... ) ... visual = VisualRGBScatter3D(np.random.random([24, 32, 3])) ... visual.local.rotation = la.quat_from_euler((-np.pi / 4, 0), order="XY") ... camera = gfx.PerspectiveCamera(50, 16 / 9) ... camera.show_object(visual, up=np.array([0, 0, 1]), scale=1.25) ... scene.add(visual) ... if os.environ.get("CI") is None: ... gfx.show(scene, camera=camera, canvas=canvas)
- __init__(RGB: ArrayLike, colourspace: RGB_Colourspace | str | Sequence[RGB_Colourspace | LiteralRGBColourspace | str] = 'sRGB', model: LiteralColourspaceModel | str = 'CIE xyY', colour: ArrayLike | None = None, opacity: float = 1, size: float = 2, **kwargs: Any) None[source]#
- property RGB: NDArray#
Getter and setter property for the RGB colourspace array.
- Parameters:
value – Value to set the RGB colourspace array with.
- Returns:
RGB colourspace array.
- Return type: