I\'ve been trying to create my own sphere using OpenGL ES and I followed the math described here http://www.math.montana.edu/frankw/ccp/multiworld/multipleIVP/spherical/lear
Actually, changing
for(double phi = -(Math.PI/2); phi <= Math.PI/2; phi+=dPhi)
to
for(double phi = -(Math.PI); phi <= 0; phi+=dPhi)
is enough. With phi from -(Math.PI) to +(Math.PI) you are making 360 degrees turn and counting each point twice. You can also do:
for(double phi = -(Math.PI); phi <= Math.PI; phi+=dPhi) {
for(double theta = 0.0; theta <= (Math.PI); theta+=dTheta) {
...
}
}
to avoid counting twice.
Change this
for(double phi = -(Math.PI/2); phi <= Math.PI/2; phi+=dPhi)
to this
for(double phi = -(Math.PI); phi <= Math.PI; phi+=dPhi)