# Examples from pyvista.ImageData.dimensionality
# ==============================================

# A single point has `0` dimensionality.
import pyvista as pv
mesh = pv.PointSet([[0.0, 0.0, 0.0]])
mesh.dimensionality

# With two points, the dimensionality is `1`.
mesh = pv.PointSet([[0.0, 0.0, 0.0], [1.0, 1.0, 1.0]])
mesh.dimensionality

# Two-dimensional `ImageData` (i.e. where one of its dimensions is one) has
# a dimensionality of `2`.
mesh = pv.ImageData(dimensions=(100, 100, 1))
mesh.dimensionality

# A `Plane()` also has dimensionality of `2`, even if it's arbitrarily
# rotated in space.
mesh = pv.Plane().rotate_vector((1, 2, 3), 30)
mesh.dimensionality

# A `Cube()` has a dimensionality of 3.
mesh = pv.Cube()
mesh.dimensionality

# ----------------------------------------------------------------------
# Generated by sphinx-examples-as-code https://github.com/pyvista/sphinx-examples-as-code

