int i;
XintView3DObject *point_cloud;
XintView3DMaterial *material;
XintVector3 *vertices;
XintView3DMaterialColor color_range;
XintView3DMaterialAttributes attributes;
...
/* Create a color range material */
color_range.range.range_direction = XintINTERPOLATE_Z;
color_range.range.interp_method = XintINTERPOLATE_LINEAR;
color_range.range.across_object = False;
color_range.range.color_model = XintCOLOR_MODEL_HSV;
color_range.range.min_color[0] = 1.0;
color_range.range.min_color[1] = 0.;
color_range.range.min_color[2] = 0.;
color_range.range.min_color[3] = 1.0;
color_range.range.max_color[0] = 0.;
color_range.range.max_color[1] = 1.;
color_range.range.max_color[2] = 0;
color_range.range.max_color[3] = 1;
attributes.light = False;
material = XintView3DCreateMaterial(NULL, XintMATERIAL_RANGE_COLOR,
&color_range, XintMA_LIGHT,
&attributes);
/* Generate random points */
vertices = (XintVector3 *) XtMalloc(sizeof(XintVector3) * NV);
srand48((long) 100);
for (i=0; i < NV; i++) {
vertices[i][0] = drand48();
vertices[i][1] = drand48();
vertices[i][2] = drand48();
}
/* Create point object*/
point_cloud = XintView3DCreatePoint("point_cloud", 2.0, NV,
vertices, True, NULL, NULL);
XtFree((char *) vertices);
/* Add object to display */
XintView3DAddObjectAndMaterial(view3d, point_cloud, material, NULL);
...
The output of example pointcloud.c is shown below.

Figure 15: Point cloud example