- #1
wizzy
- 1
- 0
- TL;DR Summary
- Can anyone help w/ how to plot the given number of points evenly around a sphere using the start and end degrees for phi and theta?
Say I have phi starting at 0 and ending at 360 degrees. Theta starts at 0 and ends at 360, and I input 10 points for phi and theta. I am trying to 3d plot phi * theta number of points around a center point.
I can plot a coordinate around a sphere using the following, which I think is correct. The axes I'm using on my project is x, y is up, and z is depth (in, out).
But I don't understand how to get the number of points evenly distributed which should be, if I'm not mistaken, 100 points (phi's no. of points * theta's no. of points).
I can plot a coordinate around a sphere using the following, which I think is correct. The axes I'm using on my project is x, y is up, and z is depth (in, out).
C++:
Real radius;
Radian theta;
Radian phi;
Vector3 result;
result.x = radius * Cos(phi) * Sin(theta);
result.z = radius * Sin(phi) * Sin(theta);
result.y = radius * Cos(theta);
But I don't understand how to get the number of points evenly distributed which should be, if I'm not mistaken, 100 points (phi's no. of points * theta's no. of points).
Last edited: