# Reducing the Size of a Cloud with Random Decimation

The code reduce the size of a cloud by removing points randomly.

## C++

```cpp
#include <eVision/Easy3D/ERandomDecimator.h>
```

```cpp
using namespace eVision::Easy3D;

EPointCloud pc;
pc.Load("");

// Explicitly decimate the point cloud to keep 5000 points
ERandomDecimator decimator(5000);
EPointCloud pcDecimated;

decimator.Decimate(pc, pcDecimated);
```

## C#

```cs
using eVision.Easy3D;
```

```cs
EPointCloud pc = new EPointCloud();
pc.Load("");

// Explicitly decimate the point cloud to keep 5000 points
ERandomDecimator decimator = new ERandomDecimator(5000);
EPointCloud pcDecimated = new EPointCloud();

decimator.Decimate(pc, pcDecimated);
```

## Python

```py
from eVision import Easy3D
pc = Easy3D.EPointCloud()
pc.Load("")

# Explicitly decimate the point cloud to keep 5000 points
decimator = Easy3D.ERandomDecimator(5000)
pc_decimated = Easy3D.EPointCloud()

decimator.Decimate(pc, pc_decimated)
```
