#version 3.5;

#include "colors.inc"
// general math functions and macros
// 
#include "math.inc"
#include "golds.inc"
#include "metals.inc"
#include "shapes.inc"

#include "textures.inc"
#include "mrg_misc.inc"

global_settings{
        assumed_gamma 1
        ambient_light rgb<1, 1, 1>
}
background  {<1,1,1>}

#declare lclock = clock+.00001;
        

#declare head_length = .3;
#declare post_diameter=.05;
#declare head_diameter=3*post_diameter;

//The vectors:
#declare A = 3*x;
#declare B=vrotate(2*x,360*z*lclock);
#declare Bpar=2*x*cos(radians(360*lclock));
#declare Bprp=2*y*sin(radians(360*lclock));

object{
        Make_Vector(A,head_length,post_diameter,head_diameter)
        texture{pigment { color rgbt <.1,.1,.8,0> } finish{ambient .8 diffuse 1}}
        no_shadow
        no_reflection
        scale <1,1,.1>}

object{
        Make_Vector(B,head_length,post_diameter,head_diameter)
        texture{pigment { color rgbt <.6,.0,.0,0> } finish{ambient .8 diffuse 1}}
        no_shadow
        scale <1,1,.1>
        no_reflection
        }
object{
        Make_Vector(Bpar,head_length,post_diameter,head_diameter)
        texture{pigment { color rgbt <.6,.0,.0,0> } finish{ambient .8 diffuse 1}}
        no_shadow
        no_reflection
        scale <1,1,.1>
        translate -.01*z}
object{
        Make_Vector(Bprp,head_length,post_diameter,head_diameter)
        texture{pigment { color rgbt <.6,.0,.0,0> } finish{ambient .8 diffuse 1}}
        no_shadow
        no_reflection
        scale <1,1,.1>
        translate -.01*z}
intersection{
        torus { 1, post_diameter*.5 }
        Wedge(360*lclock)
        rotate y*90
        rotate x*90
        texture{pigment { color rgbt <1,.4,.2,0> } finish{ambient .8 diffuse 1}}
        no_shadow
        no_reflection

}
  text {
    ttf "Times" "A" .005, 0
    pigment {color Black}
    scale .3
    //rotate <0,rottxt,0> 
    translate A+.1*y
 }
  text {
    ttf "Symbol" "B^" .005, 0
    pigment {color Black}
    scale .3
    //rotate <0,rottxt,0> 
    translate .9*Bprp-.65*x
  }
  text {
    ttf "Symbol" "B||" .005, 0
    pigment {color Black}
    scale .3
    //rotate <0,rottxt,0> 
    translate .95*Bpar-.3*y
  }
  text {
    ttf "Symbol" "B" .005, 0
    pigment {color Black}
    scale .3
    //rotate <0,rottxt,0> 
    translate 1.001*B
  }

plane { z, 0 //the grid 
 texture{
        pigment {
           brick color rgbt <0,0,0,0>, color rgbt <1,1,1,1>
           brick_size 1 mortar .025
           rotate x*90 translate .5*y
         }
 }
}

// perspective (default) camera
camera {
  location  <0, 0, -200.0>
  look_at   <0, 0,  0.0>
  right     x*image_width/image_height
  angle 2.0
}
