pygfx.geometries.plane_geometry

pygfx.geometries.plane_geometry(width=1, height=1, width_segments=1, height_segments=1)

Generate a plane.

Creates a flat (2D) rectangle in the local xy-plane that has its center at local origin. The plane may be subdivided into segments along the x- or y-axis respectively.

Parameters:
  • width (float) – The plane’s width measured along the x-axis.

  • height (float) – The plane’s width measured along the y-axis.

  • width_segments (int) – The number of evenly spaced segments along the x-axis into which the plane should be divided.

  • height_segments (int) – The number of evenly spaced segments along the y-axis into which the plane should be divided.

Returns:

plane – A geometry object representing the requested plane. Mathematically, it is an open orientable manifold.

Return type:

Geometry

Examples

Volume Slice 1

Volume Slice 1

Geometry Plane

Geometry Plane

Volume Slice 2

Volume Slice 2

Panzoom Camera

Panzoom Camera

Directional Shadow 1

Directional Shadow 1

Look At

Look At

Transparency 1

Transparency 1

Look At (Instanced Mesh)

Look At (Instanced Mesh)

Transparency 2

Transparency 2

Volume and Mesh Slicing 1

Volume and Mesh Slicing 1

Text waterfall

Text waterfall

Spotlights

Spotlights

Spotlight Shadow

Spotlight Shadow

Image on Plane Geometry 1

Image on Plane Geometry 1

Reference Color

Reference Color

Transparency

Transparency

Depth Clipping

Depth Clipping