[vtkusers] RE: Display scattered points

Xianjin Yang Yang at AGIUSA.COM
Wed Mar 19 17:02:04 EST 2003


Hi VTK users,

How do I show/display some scattered points in VTK? I am new to VTK and this is
my first (simple?) VTK project. You may assume my scattered points are stored in
an array like P[N][3], N points with (X, Y, Z) coordinates. It would be great if
I have control of point's size and color. In OpenGL, the code may look like this

glPointSize(size);
for (i=0; i<N; i++)
{
   glBegin(GL_POINTS);
      glColor4d(r, g, b, a);            
      glVertex3d(P[i][0], P[i][1], P[i][2]);
   glEnd();
}

Thank you for your help. 
 
Xianjin Yang
 



More information about the vtkusers mailing list