picogl.core.draw.teapot

Draw the teapot using built-in GLUT primitives.

Attributes

NORMAL_SAMPLE_COUNT

NORMAL_RADIUS

NORMAL_LENGTH

Functions

draw_teapot(wireframe_mode)

Draw the teapot using built-in OpenGL primitives.

coordinate_pair_for_vector(origin, vector, length) → tuple[molib.pdb.coordinate.coordinate.Coordinate3D, molib.pdb.coordinate.coordinate.Coordinate3D]

Return the start and end coordinates of a vector.

generate_normal_lines([count, radius, length]) → list[tuple[molib.pdb.coordinate.coordinate.Coordinate3D, molib.pdb.coordinate.coordinate.Coordinate3D]]

Generate radial normal vectors around a circle.

draw_normals() → None

Draw normal vectors.

draw_teapot_with_normals(wireframe_mode, show_normals)

Draw the teapot using built-in OpenGL primitives.

Module Contents

picogl.core.draw.teapot.NORMAL_SAMPLE_COUNT = 12[source]
picogl.core.draw.teapot.NORMAL_RADIUS = 0.5[source]
picogl.core.draw.teapot.NORMAL_LENGTH = 0.2[source]
picogl.core.draw.teapot.draw_teapot(wireframe_mode)[source]

Draw the teapot using built-in OpenGL primitives.

picogl.core.draw.teapot.coordinate_pair_for_vector(origin: molib.pdb.coordinate.coordinate.Coordinate3D, vector: molib.pdb.coordinate.coordinate.Coordinate3D, length: float) → tuple[molib.pdb.coordinate.coordinate.Coordinate3D, molib.pdb.coordinate.coordinate.Coordinate3D][source]

Return the start and end coordinates of a vector.

picogl.core.draw.teapot.generate_normal_lines(count: int = NORMAL_SAMPLE_COUNT, radius: float = NORMAL_RADIUS, length: float = NORMAL_LENGTH) → list[tuple[molib.pdb.coordinate.coordinate.Coordinate3D, molib.pdb.coordinate.coordinate.Coordinate3D]][source]

Generate radial normal vectors around a circle.

picogl.core.draw.teapot.draw_normals() → None[source]

Draw normal vectors.

picogl.core.draw.teapot.draw_teapot_with_normals(wireframe_mode, show_normals)[source]

Draw the teapot using built-in OpenGL primitives.