Hi everyone,

I’m looking for a way to draw a couple of thousands of points on the surface of a sphere. beginShape/endShape feels like an efficient way to draw them. For example as POINTS with strokeWeight(10). However, this makes them always face the camera instead of being perpendicular to the sphere. I was hoping setting the `normal`

before the `vertex`

would help but it seems not to.

I can think of two other ways to do it. But I was wondering if it can be done differently.

- using polar coordinates: rotate(…) followed by a translate(0,0,z)
- manually calculating the 4 corners of a quad perpendicular to the sphere (using crossproduct for this ?)

What do you think would be the best way to have the points perpendicular to the sphere’s surface?

Best wishes,

Rick

```
PVector points[] = new PVector[1000];
void setup() {
size(600, 600, P3D);
stroke(255);
strokeWeight(10);
noFill();
for (int i=0; i<points.length; i++) {
points[i] = PVector.random3D().mult(300);
}
}
void draw() {
ortho();
background(0);
translate(width/2, height/2);
rotateY(mouseX*.01);
rotateX(mouseY*.01);
beginShape(POINTS);
for (PVector v : points) {
vertex(v.x, v.y, v.z);
}
endShape();
}
```