TVS wrote on Mar 4th, 2009, 2:53pm:p.s. ellipse() is no option for me, exactly for the reason given by koogs (about disappearing when seeing it edge on, and I really use my program 3D, so really need to see the point/sphere always)
I also had the same problem a short time ago and solved it the following way:
1.
After using pushMatrix() I did all the 3d transformations and used screenX() and screenY() to store the screen position of the points in an Array:
Code:PVector[] screenPoints = new PVector[pointCount];
for (int i = 0; i <= pointCount; i++) {
screenPoints[i] = new PVector(screenX(p[i].x, p[i].y, p[i].z), screenY(p[i].x, p[i].y, p[i].z));
}
2.
Reset the transformation matrix:
Code:popMatrix();
3.
Draw the ellipses:
Code:for (int i = 0; i < screenPoints.size(); i++) {
PVector sp = (PVector) screenPoints.get(i);
ellipse(sp.x, sp.y, 4, 4);
}
Of course, you don't get smaller ellipses for points that are further away, but that was ok for me.