i use this formula :
x=1.6f*(cos(0.5angle1)cos(0.5angle1)cos(0.5angle1));
y=1.6f(cos(angle2)sin(0.5angle1)*cos(angle2)sin(0.5angle1)cos(angle2)sin(0.5angle1));
z=1.6fsin(angle2)sin(0.5angle1);

but however i didnt know how to wrap it when it is rendered. everytime i rendered it i couldnt get a smooth shape.

This is an OpenGL forum not a math forum, so what is it you try to render ? and it might be more useful if you post the code that does the rendering (and fails to do it).

If the problem with the rendering is difficult to describe, screenshots are always useful.

A few ideas.
Make sure the winding order for all triangles is the same or you might get wacky colors, make sure all normals are correct, if you get incorrect normals/or miss to set them you will get weird shapes also.