# Examples from pyvista.DataSet.area
# ==================================

# Get the area of a square of size 2x2.
# Note 5 points in each direction.
import pyvista as pv
mesh = pv.ImageData(dimensions=(5, 5, 1))
mesh.area

# A mesh with 3D cells does not have an area.  To get
# the outer surface area, first extract the surface using
# `extract_surface()`.
mesh = pv.ImageData(dimensions=(5, 5, 5))
mesh.area

# Get the area of a sphere. Discretization error results
# in slight difference from `pi`.
mesh = pv.Sphere()
mesh.area

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

