I've been checking this website that shows how to convert a cube to a sphere, and, the result was this algorithm:

Code:
function cube_to_sphere(ENTITY* model) 
{
	
  int i = ent_status(model,0); 
  for (; i>0; i--) 
  {    														 
  	CONTACT* c = ent_getvertex(model,NULL,i);   
  	c.x = (c.x * (sqrt(1 - ((c.y^2)/2) - ((c.z^2)/2) + (((c.y^2)*(c.z^2))/3))));
  	wait(2);
  	c.y = (c.y * (sqrt(1 - ((c.x^2)/2) - ((c.z^2)/2) + (((c.x^2)*(c.z^2))/3))));
  	wait(2);
  	c.z = (c.z * (sqrt(1 - ((c.x^2)/2) - ((c.y^2)/2) + (((c.x^2)*(c.y^2))/3))));
  	wait(2);
  	c.v = NULL;   // set c.v to NULL to change c.x,y,z 
  	ent_setvertex(model,c,i); 
  	wait(4); 						 
  	}


}



The math in c.x, c.y and c.z comes from this image found in the website previously mentioned, and the result was waaaaay to horrific for me to post pics here, basically, each of the cube's 768 vertices were scattered around the level
I even added some wait() functions to slow the process down, thinking it could be the math "happenning" too fast, but the result was still awfull
Im a little tired to think where i made the mistake, i've been failling this algorithm for transforming a cube to a sphere for about a month, and now i really think i need extra help
Thanks in advance!