ddg.jupyter package

Module contents

ddg.jupyter.clear_plot(plot)[source]

Remove objects from plot

Parameters:
plot: k3d.plot.Plot

Plot from which to remove the objects from.

ddg.jupyter.convert(convertible, color=8947848, curve_sampling=(100, 0.1), surface_sampling=(30, 0.1), subspace_size=100, curve_radius=0.015, point_radius=0.05)[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

curve_samplingtuple of an int and a float

(default=_default_curve_sampling) Determines the sample number and stepsize for curves

surface_samplingtuple of an int and a float

(default=_default_surface_sampling) Determines the sample number and stepsize for surfaces

subspace_sizefloat

(default=_default_subspace_size) Determines the size of subspaces

curve_radiusfloat (default=_default_curve_radius)

Radius for curves, set as bobj.data.bevel_depth

point_radiusfloat (default=_default_point_radius)

Radius of the sphere representing points

Returns:
k3d.objects.Group
ddg.jupyter.edges(convertible, color=0, radius=0.015, curve_sampling=(100, 0.1), surface_sampling=(30, 0.1), subspace_size=100)[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

radiusfloat (default=_default_curve_radius)

Sets the radius of the edges as bobj.data.bevel_depth

curve_samplingtuple of an int and a float

(default=_default_curve_sampling) Determines the sample number and stepsize for curves

surface_samplingtuple of an int and a float

(default=_default_surface_sampling) Determines the sample number and stepsize for surfaces

subspace_sizefloat

(default=_default_subspace_size) Determines the size of subspaces

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

Setup and return a K3D plot.

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

Plot a 2D scene containing the drawables.

Parameters:
drawables: k3d.objects.Drawable

The objects to plot.

Returns:
k3d.plot.Plot
ddg.jupyter.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.vertices(convertible, color=0, radius=0.05, curve_sampling=(100, 0.1), surface_sampling=(30, 0.1), subspace_size=100)[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

curve_samplingtuple of an int and a float

(default=_default_curve_sampling) Determines the sample number and stepsize for curves

surface_samplingtuple of an int and a float

(default=_default_surface_sampling) Determines the sample number and stepsize for surfaces

subspace_sizefloat

(default=_default_subspace_size) Determines the size of subspaces

Returns:
k3d.objects.Group