varying float size;
varying vec3  color;

void main()
{
  vec3 P = vec3(gl_ModelViewMatrix*gl_Vertex); 
 
  size = 1.0 / (-P.z*-P.z*0.00003);
  if (size < 1.0) size = 1.0;
  if (size > 20.0) size = 20.0;
 
  color = gl_Color;
  gl_PointSize = size;
  gl_Position = ftransform();
}