# Point Cloud

Point cloud geometry

Since R2021a

Libraries:
Simscape / Multibody / Curves and Surfaces

## Description

The Point Cloud block creates a set of points in space. 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 body with concave shape, for contacts. When modeling certain sustained and distributed contact problems, the Spatial 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.

When modeling contacts for a point cloud, the Spatial Contact Force and Planar Contact Force blocks treat 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.

You can create a 2-D or 3-D point cloud by using an N-by-2 or 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.

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.

### 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 or a Planar Contact Force block.

## Parameters

expand all

Coordinates of the points, specified as an N-by-2 or an N-by-3 matrix.

• To create a 2-D point cloud, use an N-by-2 matrix that specifies the x and y Cartesian coordinates of each point with respect to the local reference frame.

• To create a 3-D point cloud, use an N-by-3 matrix that specifies the x, y, and z Cartesian coordinates of each point with respect to the local reference frame.

When modeling contacts, use the Planar Contact Force block for 2-D point clouds and the Spatial Contact Force block for 3-D point clouds.

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

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

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

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