Devide Arch Into Equally Long Segments

I have a - what I though - very basic math question. Still I can’t figure it out:

Given is an arch along the surface of a sphere, running from north to south.
I want to split this arch into x equally long segments.

Currently I tried to split it into three segments, hardcoded:

const controlPoints = [
    new THREE.Vector3(0, 5, 0), // North Pole
    new THREE.Vector3(5 * Math.sin(Math.PI / 4), 5 * Math.cos(Math.PI / 4), 0), // Midpoint 1 on the surface
    new THREE.Vector3(5 * Math.sin(Math.PI / 4), -5 * Math.cos(Math.PI / 4), 0), // Midpoint 2 on the surface
    new THREE.Vector3(0, -5, 0) // South Pole

The segments are not the same size, the segment in the middle is about twice as long as the first and last segment:

What am I missing?
How could I make that work dynamically, so that I can enter the amount of segments / midpoints?

Thanks a lot!

Amount_of_segments = Amount_of_points - 1
Thus, it needs to be Math.PI / 3

Usually, x is cos, y is sin. But if it works the other way round for you, then okay.

1 Like

… uff, should have seen that. Thanks!

1 Like