 
 	// v1 = support in direction of origin
 	n = normalize(-v0);
-	//if(isnan(n.x)){printf("NAN1\n");}
 	v11 = TransformSupportVert(p1, -n);
 	v12 = TransformSupportVert(p2, n);
 	v1 = v12 - v11;

		Swap(v12, v22);
		n = -n;
	}
	if(isnan(n.x)){printf("NAN4\n");}
	// Phase One: Identify a portal
	float3 v31, v32, v3;
	while (1){


	// Determine whether origin is on + or - side of plane (v1,v0,v2)
	n = normalize(cross((v1 - v0) , (v2 - v0)));
	// If the origin is on the - side of the plane, reverse the direction of the plane
	if (dot(n , v0) > 0){
		Swap(v1, v2);
