pytransform3d.camera.make_world_grid

pytransform3d.camera.make_world_grid(n_lines=11, n_points_per_line=51, xlim=(- 0.5, 0.5), ylim=(- 0.5, 0.5))[source]

Generate grid in world coordinate frame.

The grid will have the form

+----+----+----+----+----+
|    |    |    |    |    |
+----+----+----+----+----+
|    |    |    |    |    |
+----+----+----+----+----+
|    |    |    |    |    |
+----+----+----+----+----+
|    |    |    |    |    |
+----+----+----+----+----+
|    |    |    |    |    |
+----+----+----+----+----+

on the x-y plane with z=0 for all points.

Parameters:
n_linesint, optional (default: 11)

Number of lines

n_points_per_lineint, optional (default: 51)

Number of points per line

xlimtuple, optional (default: (-0.5, 0.5))

Range on x-axis

ylimtuple, optional (default: (-0.5, 0.5))

Range on y-axis

Returns:
world_gridarray-like, shape (2 * n_lines * n_points_per_line, 4)

Grid as homogenous coordinate vectors

Examples using pytransform3d.camera.make_world_grid

Camera Projection

Camera Projection

Camera Projection
Camera Transform

Camera Transform

Camera Transform