ddg.jupyter.k3d module

ddg.jupyter.k3d.to_drawable(convertible, color=8947848)[source]

Convert pyddg objects, points, curves and meshes to K3D objects.

Default conversion mode showing faces.

Parameters:
convertible:

The object to convert

color: int, hexadecimal between 0x000000 and 0xffffff

RGB color value as hexadecimal interger

Returns:
k3d.objects.Group
ddg.jupyter.k3d.to_tubes(convertible, color=0)[source]

Convert pyddg objects, points, curves and meshes to K3D objects.

Special conversion mode showing edges.

Parameters:
convertible:

The object to convert

color: int, hexadecimal between 0x000000 and 0xffffff

RGB color value as hexadecimal interger

Returns:
k3d.objects.Group
ddg.jupyter.k3d.to_spheres(convertible, color=0)[source]

Convert pyddg objects, points, curves and meshes to K3D objects.

Special conversion mode showing points as spheres.

Parameters:
convertible:

The object to convert

color: int, hexadecimal between 0x000000 and 0xffffff

RGB color value as hexadecimal interger

Returns:
k3d.objects.Group
ddg.jupyter.k3d.to_tubes_and_spheres(convertible, color=0)[source]

Convert pyddg objects, points, curves and meshes to K3D objects.

Special conversion mode showing points and edges as tubes and spheres.

Parameters:
convertible:

The object to convert

color: int, hexadecimal between 0x000000 and 0xffffff

RGB color value as hexadecimal interger

Returns:
k3d.objects.Group
ddg.jupyter.k3d.setup_plot()[source]

Setup and return a K3D plot.

Returns:
k3d.plot.Plot
ddg.jupyter.k3d.clear_plot(plot)[source]

Remove objects from plot

Parameters:
plot: k3d.plot.Plot

Plot from which to remove the objects from.

ddg.jupyter.k3d.show_3d(*drawables)[source]

Plot a 3D scene containing the drawables.

Parameters:
drawables: k3d.objects.Drawable

The objects to plot.

Returns:
k3d.plot.Plot
ddg.jupyter.k3d.show_2d(*drawables)[source]

Plot a 2D scene containing the drawables.

Parameters:
drawables: k3d.objects.Drawable

The objects to plot.

Returns:
k3d.plot.Plot