experimental/annealing/torus_trefoil_test.cpp
inline Vector3 on_torus(float u, float v, float tilt, float xoffset) {
  Vector3 vec((1+cos(v))*cos(u), (1+cos(v))*sin(u), sin(v));
  Matrix3 mat;
  mat.rotAround(Vector3(1,0,0), tilt);
  return (mat*vec+Vector3(xoffset,0,0));
}
// Torus with both radii = 1
// This torus has an offset of z_dist from the z axis
// and is tilted with angle tilt around the x axis
// u=0,v=0 is vector 1,0,0
Torus with both radii = 1
This torus has an offset of z_dist from the z axis
and is tilted with angle tilt around the x axis
u=0,v=0 is vector 1,0,0
Torus with both radii = 1 This torus has an offset of z_dist from the z axis and is tilted with angle tilt around the x axis u = 0 v = 0 is vector 1 0 0
inline Vector3 on_torus(float u, float v, float tilt, float xoffset) {
  Vector3 vec((1+cos(v))*cos(u), (1+cos(v))*sin(u), sin(v));
  Matrix3 mat;
  mat.rotAround(Vector3(1,0,0), tilt);
  return (mat*vec+Vector3(xoffset,0,0));
}
inline Vector3 on_torus ( float u , float v , float tilt , float xoffset ) { Vector3 vec ( ( 1 + cos ( v ) ) * cos ( u ) , ( 1 + cos ( v ) ) * sin ( u ) , sin ( v ) ) ; Matrix3 mat ; mat . rotAround ( Vector3 ( 1 , 0 , 0 ) , tilt ) ; return ( mat * vec + Vector3 ( xoffset , 0 , 0 ) ) ; }
Torus with both radii = 1
This torus has an offset of z_dist from the z axis
and is tilted with angle tilt around the x axis
u=0,v=0 is vector 1,0,0
Torus with both radii = 1 This torus has an offset of z_dist from the z axis and is tilted with angle tilt around the x axis u = 0 v = 0 is vector 1 0 0