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

Geometry Plane

Geometry Plane

Displaying an image in a scene

Displaying an image in a scene

Directional Shadow 1

Directional Shadow 1

Spotlight Shadow

Spotlight Shadow

Spotlights

Spotlights

Look At

Look At

Look At (Instanced Mesh)

Look At (Instanced Mesh)

Volume and Mesh Slicing 1

Volume and Mesh Slicing 1

Panzoom Camera

Panzoom Camera

Text multiple grid

Text multiple grid

Text waterfall

Text waterfall

Transparency 1

Transparency 1

Transparency 2

Transparency 2

Volume Slice 1

Volume Slice 1

Volume Slice 2

Volume Slice 2

Validate transparency with and without bg

Validate transparency with and without bg

Validate dither

Validate dither

Validate transparency for the ordered2 blend mode

Validate transparency for the ordered2 blend mode

Validate weighted_plus

Validate weighted_plus

Reference Color

Reference Color

Depth Clipping

Depth Clipping

Image on Plane Geometry 1

Image on Plane Geometry 1

Validate view offset

Validate view offset