10 20];
p3 = [20 50 10];

% points can be grouped into arrays to represent point sets
points = [p1;p2;p3];

% create a 3D line through 2 points
line12 = createLine3d(p1, p2);

% an edge is represented by concatenating its vertices
edge13 = [p1 p3];

% prepare a figure for drawing
figure(1); clf; hold on;
axis equal;
axis([0 100 0 100 0 100]);
set(gcf, 'renderer', 'opengl');
set(gca, 'CameraPosition', [400 -200 800]);

% draw all points
drawPoint3d(points);

% draw the line, with some d