Skip to content

data.py

rerun_demo.data

Simple data to be used for Rerun demos.

color_grid = build_color_grid() module-attribute

Default color grid

rect_pyramid = build_rect_pyramid() module-attribute

Default rect pyramid data

color_spiral = build_color_spiral() module-attribute

Default color spiral

def build_color_grid(x_count=10, y_count=10, z_count=10, twist=0)

Create a cube of points with colors.

The total point cloud will have x_count * y_count * z_count points.

Parameters:

Name Type Description Default
x_count

Number of points in each dimension.

10
y_count

Number of points in each dimension.

10
z_count

Number of points in each dimension.

10
twist

Angle to twist from bottom to top of the cube

0

def build_rect_pyramid(count=20, width=100, height=100)

Create a stack of N colored rectangles.

Parameters:

Name Type Description Default
count

Number of rectangles to create.

20
width

Width of the base of the pyramid.

100
height

Height of the pyramid.

100

def build_color_spiral(num_points=100, radius=2, angular_step=0.02, angular_offset=0, z_step=0.1)

Create a spiral of points with colors along the Z axis.

Parameters:

Name Type Description Default
num_points

Total number of points.

100
radius

The radius of the spiral.

2
angular_step

The factor applied between each step along the trigonemetric circle.

0.02
angular_offset

Offsets the starting position on the trigonemetric circle.

0
z_step

The factor applied between between each step along the Z axis.

0.1