Court Geometry

The court module defines the dimensions, landmarks, and coordinate system of an official padel court. On this page, we'll dive into the different classes and methods you can use to interact with court geometry programmatically.

The CourtDimensions model

The CourtDimensions dataclass houses the official measurements of the court. All units are expressed in meters.

Official FIP CourtDimensions Blueprint
Official FIP court plan (20.0m × 10.0m), Enclosure Variant 1 (3.0m) vs Variant 2 (4.0m) side walls, and net height profile (0.88m center / 0.92m posts).

Properties

  • Name
    length
    Type
    float
    Description

    The total length of the padel court (20.0 m by default).

  • Name
    width
    Type
    float
    Description

    The total width of the padel court (10.0 m by default).


Coordinate Systems

PadelKit supports two spatial reference frames via CoordinateSystem:

  • CoordinateSystem.CENTERED (default): Origin (0.0, 0.0, 0.0) lies at the center of the net on the court floor, with X in [-5.0, 5.0] and Y in [-10.0, 10.0].
  • CoordinateSystem.CORNER_BASED: Origin (0.0, 0.0, 0.0) lies at floor_near_left, shifting horizontal coordinates by (+5.0m, +10.0m) so X is in [0.0, 10.0] and Y is in [0.0, 20.0].
CoordinateSystem.CENTERED vs CoordinateSystem.CORNER_BASED
Comparison of CoordinateSystem.CENTERED (origin at net center) and CoordinateSystem.CORNER_BASED (origin at floor_near_left).

The Court model

The Court class is the main geometry model. By default, it uses CoordinateSystem.CENTERED where (0.0, 0.0) is at the midpoint of the net. The X axis represents the width, and the Y axis represents the length.

Properties

  • Name
    dimensions
    Type
    CourtDimensions
    Description

    An instance of the CourtDimensions class containing the physical measurements.


classmethodCourt.fip_standard()

Standard Initialization

This class method allows you to easily instantiate a Court using the standard measurements established by the International Padel Federation (FIP).

By default, an FIP court is 20.0m in length and 10.0m in width.

Instantiation

classmethod
fip_standard
from padelkit import Court

court = Court.fip_standard()

Output structure

Court(
  dimensions=CourtDimensions(length=20.0, width=10.0)
)

methodcourt.point()

Get a landmark coordinate

This method allows you to retrieve the exact (x, y) coordinates of a specific standard landmark on the court.

Required arguments

  • Name
    name
    Type
    CourtLandmark | str
    Description

    The name of the landmark. This can be an instance of the CourtLandmark Enum (e.g., CourtLandmark.CENTER) or its string equivalent (e.g., "center").

Usage

method
point
from padelkit import Court

court = Court.fip_standard()
net_center = court.point("center")

Output

(0.0, 0.0)

methodcourt.landmarks_2d()

List all landmarks

This method returns a dictionary containing all the standardized 2D positions of the court landmarks. It's useful if you need to draw the court or access multiple points at once.

Usage

method
landmarks_2d
from padelkit import Court

court = Court.fip_standard()
all_points = court.landmarks_2d()

Output (abridged)

{
  "center": [0.0, 0.0],
  "net_left": [-5.0, 0.0],
  "net_right": [5.0, 0.0],
  "floor_near_left": [-5.0, -10.0],
  "floor_near_right": [5.0, -10.0],
  "floor_far_left": [-5.0, 10.0],
  "floor_far_right": [5.0, 10.0]
}

Was this page helpful?