|
Easy3D 3.0.0
|
Creating a point cloud from raw 3D points — the simplest possible Easy3D program.
Overview
This tutorial builds a PointCloud directly in memory from a set of coordinates, without loading a file and without opening a viewer. It is the "hello world" of Easy3D and shows the skeleton that almost every Easy3D program follows: initialize the library, create or load some data, do something with it, then release it.
The technique
A point cloud is an unordered collection of samples in 3D space. Each sample is just a position (x, y, z); there are no edges or faces connecting the points. Point clouds are the raw output of most 3D acquisition pipelines (LiDAR, depth cameras, photogrammetry), so they are the natural starting point for geometry processing. Here we synthesize a tiny cloud: 100 points laid out on a regular 10 x 10 grid that lies flat in the XY plane (z = 0). In Easy3D a point cloud stores its samples as vertices — but unlike a SurfaceMesh there is no connectivity between them.
Easy3D API
Running it
This example is console-only: it prints "point cloud has 100 points" and exits. No window appears because no Viewer is created. The cloud is a local object here, so it is destroyed automatically when main returns. (When a model is added to a Viewer instead, the Viewer takes ownership of it — see Tutorial_201_Viewer_default.)