I've been searching for an equation using OpenGl and Java to draw a 3d sphere. Kinda like x=blah blah math + y. Although using actual math. So far all I have is this which renders the items in a tower. How would I go about doing this?
GlStateManager.pushMatrix(); {
GlStateManager.translate(x, y, z);
GlStateManager.translate(1, -.825, 0.75);
GlStateManager.rotate(90F, 0, 0, 1);
GlStateManager.rotate(322.5F, 0, 1, 0);
GlStateManager.translate(1.35, 0, -1.35);
for(int i = 1; i < te.thpoothfyness; i++) {
Minecraft.getMinecraft().getRenderManager().doRenderEntity(ITEM, 0, 0, 0, 0F, 0F, false);
GlStateManager.translate(0.03125, 0, -0.03125);
}
}
GlStateManager.popMatrix();