# Point Cloud

Point cloud geometry for contact modeling

• Library:
• Simscape / Multibody / Curves and Surfaces

## Description

The Point Cloud block exports a set of points in space for modeling contact problems. Each point has a rigid offset with respect to the reference frame of the Point Cloud block. You can use a Point Cloud block to approximate a geometry, such as a solid or convex hull. When modeling certain sustained and distributed contact problems, the Spacial Contact Force block might perform better with a Point Cloud block than with a geometry block, such as Brick Solid or File Solid. This image demonstrates how to use a point cloud to approximate the bottom of a robot foot.

The Point Cloud block has one reference frame port (R) and one geometry port (G). To use a Point Cloud block to model contact problems, connect port G to a Spatial Contact Force block. The Spatial Contact Force block treats a point cloud as an aggregation of N-point geometries and applies contact forces to each point independently. Each contact force is based on the penetration and velocity of the individual point of the cloud. Note that the Spatial Contact Force block does not support sensing when connected to a Point Cloud block.

To specify the locations of points, you can enter an N-by-3 matrix for the Coordinates Matrix parameter of the Point Cloud block. Each row of the matrix specifies the Cartesian coordinates of a point with respect to the reference frame of the Point Cloud block. An error occurs if the matrix has any repeated rows.

Tip

You can use the `unique` function to remove repeated rows from an input matrix.

## Ports

### Frame

expand all

Point cloud reference frame. To specify the location and orientation of the point cloud, connect this frame to another block, such as Brick Solid or File Solid.

### Geometry

expand all

Geometry frame that represents the points defined by this block. To model contacts on the points, connect this port to a Spatial Contact Force block.

## Parameters

expand all

Coordinates of the points, specified as a N-by-3 matrix. Each row of the matrix specifies the Cartesian coordinates of a point with respect to the reference frame of the Point Cloud block. An error occurs if the matrix has any repeated rows. You can use the `unique` function to remove repeated rows from an input matrix.

Data Types: `double`

### Graphic

Graphic used to visualize the point cloud. To eliminate the point cloud from the model visualization, set this parameter to `None`.

Radius of the marker for each point of the point cloud.

#### Dependencies

To enable this parameter, set Type to `Marker Cloud`.

Parameterizations for specifying visual properties. Select `Simple` to specify diffuse color and opacity. Select `Advanced` to specify more visual properties, such as Specular Color, Ambient Color, Emissive Color, and Shininess.

#### Dependencies

To enable this parameter, set Type to `Marker Cloud`.

Color of the graphic under direct white light, specified as an [R G B] or [R G B A] vector on a 0–1 scale. The optional fourth element (A) specifies the color opacity on a scale of 0–1. Omitting the opacity element is equivalent to specifying a value of 1.

#### Dependencies

To enable this parameter, set Type to `Marker Cloud`.

Graphic opacity, specified as a scalar in the range of 0 to 1. A scalar of 0 corresponds to completely transparent, and a scalar of 1 corresponds to completely opaque.

#### Dependencies

To enable this parameter, set:

1. Type to ```Marker Cloud```

2. Visual Properties to `Simple`

Color of specular highlights, specified as an [R,G,B] or [R,G,B,A] vector on a 0–1 scale. The optional fourth element specifies the color opacity. Omitting the opacity element is equivalent to specifying a value of 1.

#### Dependencies

To enable this parameter, set:

1. Type to ```Marker Cloud```

2. Visual Properties to `Advanced`

Color of shadow areas in diffuse ambient light, specified as an [R,G,B] or [R,G,B,A] vector on a 0–1 scale. The optional fourth element (A) specifies the color opacity. Omitting the opacity element is equivalent to specifying a value of 1.

#### Dependencies

To enable this parameter, set:

1. Type to ```Marker Cloud```

2. Visual Properties to `Advanced`

Graphic color due to self illumination, specified as an [R,G,B] or [R,G,B,A] vector on a 0–1 scale. The optional fourth element (A) specifies the color opacity. Omitting the opacity element is equivalent to specifying a value of 1.

#### Dependencies

To enable this parameter, set:

1. Type to ```Marker Cloud```

2. Visual Properties to `Advanced`

Sharpness of specular light reflections, specified as a scalar number on a 0–128 scale. This parameter increases the shininess value for smaller but sharper highlights. Decrease the value for larger but smoother highlights.

#### Dependencies

To enable this parameter, set:

1. Type to ```Marker Cloud```

2. Visual Properties to `Advanced`