Browse Source

Fixed math in toric atlas ---> cartesian conversion

Akshay 2 months ago
parent
commit
e37f45fae2
1 changed files with 3 additions and 3 deletions
  1. 3 3
      src/ToricAtlas.cpp

+ 3 - 3
src/ToricAtlas.cpp

@@ -45,13 +45,13 @@ float ToricAtlas::v_cart(float x, float y, float z)
 float ToricAtlas::x(float u, float v)
 {
 	check_uv_range(u, v);
-	return ( _R + _r * cos(M_PI*v) ) * cos ( 2* M_PI * u);
+	return ( _R + _r * cos(M_PI*v) ) * cos (M_PI * u);
 }
 
 float ToricAtlas::y(float u, float v)
 {
 	check_uv_range( u, v);
-	return (_R + _r * cos(M_PI*v) ) * sin (2* M_PI * u);
+	return (_R + _r * cos(M_PI*v) ) * sin (M_PI * u);
 }
 
 float ToricAtlas::z(float u, float v)
@@ -67,4 +67,4 @@ float ToricAtlas::distanceFunction(float u1, float v1, float u2, float v2)
 	return -1;
 }
 
-}; // namespace lithe
+}; // namespace lithe