Module visualize

Visualization of point cloud data and geometrical shapes.

ectopylasm.visualize.clear()[source]

Call ipyvolume.clear().

ectopylasm.visualize.ipv_plot_df(points_df, sample_frac=1, marker='circle_2d', size=0.2, **kwargs)[source]

Plot vertices in a dataframe using ipyvolume.

ectopylasm.visualize.ipv_plot_plydata(plydata, sample_frac=1, marker='circle_2d', **kwargs)[source]

Plot vertices in a plydata object using ipyvolume.

ectopylasm.visualize.plot(data, *args, **kwargs)[source]

Wraps plotting functions for use in Jupyter notebooks.

Based on the type of data, this function will in turn call the following:

  • pandas.DataFrame or vaex.DataFrame: ipv_plot_df.
  • geometry.Plane: plot_plane.
  • geometry.Cone: plot_cone.

See the documentation of those functions for how to call plot. All arguments and keyword arguments are passed on to the wrapped functions.

ectopylasm.visualize.plot_cone(cone: ectopylasm.geometry.Cone, n_steps=20, **kwargs)[source]

Draw a cone surface.

cone: a Cone object n_steps: number of steps in the parametric range used for drawing (more gives a

smoother surface, but may render more slowly)
ectopylasm.visualize.plot_cone_fit(fit_result, **kwargs)[source]

Plot the cone resulting from a cone fit to a point set.

ectopylasm.visualize.plot_plane(plane: ectopylasm.geometry.Plane, x_lim=None, y_lim=None, z_lim=None, limit_all=True, **kwargs)[source]

Draw a plane.

The limited coordinates are called x and z, corresponding to the first and third components of p and n. The final y coordinate is calculated based on the equation for a plane.

plane: a Plane object x_lim [optional]: iterable of the two extrema in the x direction y_lim [optional]: same as x, but for y z_lim [optional]: same as x, but for z limit_all [optional]: make sure that the plane surface plot is bound within

all given limits
ectopylasm.visualize.plot_plane_fit(fit_result, **kwargs)[source]

Plot the plane resulting from a plane fit to a point set.

ectopylasm.visualize.plot_thick_cone(cone: ectopylasm.geometry.Cone, thickness, **kwargs)[source]

Plot two cones separated by a distance thickness.

Parameters: same as plot_cone, plus thickness.

ectopylasm.visualize.plot_thick_plane(plane: ectopylasm.geometry.Plane, thickness=0, **kwargs)[source]

Draw two co-planar planes, separated by a distance thickness.

plane: a central Plane object thickness: the distance between the two co-planar planes x_lim [optional]: iterable of the two extrema in the x direction z_lim [optional]: same as x, but for z d [optional]: if d is known (in-product of p and n), then this can be

supplied directly; p is disregarded in this case.
ectopylasm.visualize.pptk_plot_df(points_df, **kwargs)[source]

Plot vertices in a dataframe using pptk.

ectopylasm.visualize.pptk_plot_plydata(plydata, **kwargs)[source]

Plot vertices in a plydata object using pptk.

ectopylasm.visualize.random_sample(xyz, total, sample_frac)[source]

Get a random sample from a point cloud.

xyz: array of shape (3, N) representing N points in 3D space total: number of points in xyz sample_frac: fraction of the total set that you want to return

ectopylasm.visualize.show()[source]

Call ipyvolume.show().