Help getting points on surface of ball

I’m trying to get 3d positions (they will be used as origin positions for rays) along the surface of a ball part. I figure the center of the ball position along with the radius of it there should be some math that could get points on the surface. I’m doing something like this already, but have only figured out how to get the points along the circumference:

local numRays = 10
local angleBetweenRays = 360 / numRays

local function checkForBallCollision(zMove)
	local ballCenter = Ball.Position
	local centerRay = workspace:Raycast(ballCenter,Vector3.new(0,0,zMove+BallRadius),checkForCollisionParams)
	if centerRay then return centerRay, centerRay.Distance-BallRadius end
	
	--Outside circumference ray loop
	for i = 0, numRays do
		local circumferenceAngle = i * angleBetweenRays

		local x = ballCenter.X + math.cos(math.rad(circumferenceAngle)) * BallRadius
		local y = ballCenter.Y + math.sin(math.rad(circumferenceAngle)) * BallRadius
		
		local circumferenceRayOrigin = Vector3.new(x, y, ballCenter.Z)
		local circumferenceRay = workspace:Raycast(circumferenceRayOrigin,Vector3.new(0,0,zMove),checkForCollisionParams)
		if circumferenceRay then
			return circumferenceRay, circumferenceRay.Distance
		end
	end
end

What I want now is help making another for loop similar to the one already in there, that will either be a smaller circle that is placed on the surface of the ball I just need to be able to adjust the angle so I can make multiple more loops if need be.

Even better option would be a way to just evenly distribute points all across the surface of the ball facing the Z direction.

Hopefully I’ve clearly explained what I’m trying to accomplish if not please ask for clarification also thanks in advance.

How important is it that the points be evenly spaced? Can you draw something to clarify the points you’re trying to get?

What I know is if you’re asking to calculate the surface point of a sphere, you’re asking for calculus. If you want to spawn points on top of the surface of a sphere, I’d rotate the object’s look vector and perform its transformation in the direction of said look vector.

It’s for collision detection so I think distributing them evenly is good for efficiency and will also make it so I require less points.

I’ll try messing around with doing something like that

Curious, why do you need that for collision detection? Especially if you’re generating these points randomly?

So if the ball is moving so fast it doesn’t clip through a wall. What do you mean by im generating them randomly?

To distribute random points on any surface you need to “normalize” your random output to the amount of space for each other variable. Someone had just asked how to do this for a circle so I’ll use that case as an example and I think you’ll be able to adapt that for your sphere:

randomly pick a radius and an angle, this will give you a random point on the circle but points will be clustered near the center where there’s less area. You want to undo this effect by making higher radiuses more likely. We need a function that undoes the slope of this line, so that an r of 0 is almost impossible. (Brb checking my math, but maybe you can see where I’m going with this?)

I misread a bit, you mention in the image finding random points between them on one side.

That’s my bad I would prefer them to be evenly distributed. Idk why I said random on the image lol

bit late but you can probably look into something called the fibonacci sphere and then using points generated by that, basically it creates points evenly in a sphere that you can probably use for that