I’ve read the codes in the redbook about drawing a sphere, but it is a unit sphere with radius=1. It starts from a icosahedron, an x and a z are defined to make the distances between all the 12 vertices and the center equal 1. So what if I need a larger or smaller sphere? I changed x and z proportionally, but it didn’t work. How should I set the values of x and z to get a smaller sphere?
Share
Apply scaling transform before drawing the sphere. If you are using fixed functionality pipeline you can do it using
glScalef(...). Otherwise you will have to construct the scaling matrix yourself.