//-------------------------------------------------------------------------------------------------
//-------------------------------------------------------------------------------------------------
#include "meshmaker.inc"
//-------------------------------------------------------------------------------------------------
#declare Mob=text {
   ttf "timrom.ttf"
   " moebius"
   1,0
   translate -0.5*z
   rotate <0,0,90>
}

#declare Min=min_extent(Mob);
#declare Max=max_extent(Mob);
#debug vstr(3,Max,", ",0,-1)
#debug vstr(3,Min,", ",0,-1)
#declare dX=Max.x-Min.x;
#declare dY=Max.y-Min.y;

#declare Mob_pigm=pigment {
      object{Mob color rgbf<1,1,1, 1> color rgb <1,1,1>*1.2}
      translate <dX,0,0>
      scale 1/dY 
      warp {repeat x/4}
      warp {repeat y}
}
//-------------------------------------------------------------------------------------------------
#declare F1=function(u,v){cos(u)+v*cos(u/2)*cos(u)}
#declare F2=function(u,v){sin(u)+v*cos(u/2)*sin(u)}
#declare F3=function(u,v){v*sin(u/2)}              
//-------------------------------------------------------------------------------------------------
object{ // Parametric(Fx,Fy, Fz, <UVmin>, <UVmax>, Iter_U, Iter_V, FileName)
   Parametric( // Builds a parametric surface out of three given functions. 
               // The uv_coordinates for texturing the surface come from the square <0,0> - <1,1>. 
      F1, F2, F3, //three functions
      <0, -0.5>, <2*pi, 0.5>,// range within to calculate surface: <u min, v min>,<u max, v max>. 
       50, 100, // resolution of the mesh in the u range and v range.
       "" // FileName: ""= non, "NAME.obj'= Wavefront objectfile, "NAME.pcm" compressed mesh file 
          // "NAME.arr" = include file with arrays to build a mesh2 from, 
          //  others: includefile with a mesh2 object 
   ) //---------------------------------------------------------------------------------------------
 // no_shadow
 texture{ 
   uv_mapping
   pigment {Mob_pigm scale <1/(2*pi),1,1>}
 } 
   scale <1,1,-1>*1.35
   rotate <90,0,0>
   translate<0,0,0>
} // end of object
//-------------------------------------------------------------------------------------------------
//-------------------------------------------------------------------------------------------------



