POV-Ray : Newsgroups : povray.binaries.animations : left or right handed rotations : Re: left or right handed rotations Server Time
23 Apr 2024 06:22:54 EDT (-0400)
  Re: left or right handed rotations  
From: omniverse
Date: 8 Oct 2016 01:20:01
Message: <web.57f880de998e1a28b1933f770@news.povray.org>
// cmd:+w320 +h240 +fj +a0.1 +ki0 +kf1 +kfi1 +kff150

#version 3.7;

global_settings
{
 assumed_gamma 1
 ambient_light 0
}


#local LR=0; // 0 for left-handed, 1 or any number for right


light_source
{
 <11,11,-11>, 1
}

camera
{
 #if (LR=0)
 location <6,8,-10>
 right <4/3,0,0>
 #else
 location <6,8,10>
 right <-4/3,0,0>
 #end
 up <0,1,0>
 look_at <0.5,1.75,0>
 angle 60
}


#if (LR=0)
plane
{
 -z,-7
 texture
 {
  pigment
  {
   rgb 0
  }
  finish
  {
   reflection 1
  }
 }
 no_shadow
 //no_image
}

#else

plane
{
 z,-7
 texture
 {
  pigment
  {
   rgb 0
  }
  finish
  {
   reflection 1
  }
 }
 no_shadow
}

#end

// room grid
box
{
 <-12,-12,-12>*0.99,<12,12,12>*0.99
 texture
 {
  pigment
  {
   function {abs(x)}
   color_map
   {
    [0.15 rgb <1,0,0>]
    [0.15 rgb <1,1,1>]
   }
  }
  finish
  {
   emission 0.1 diffuse 0.6
  }
 }
 texture
 {
  pigment
  {
   function {abs(y)}
   color_map
   {
    [0.15 rgb <0,1,0>]
    [0.15 rgbt <1,1,1,1>]
   }
  }
  finish
  {
   emission 0.1 diffuse 0.6
  }
 }
 texture
 {
  pigment
  {
   function {abs(z)}
   color_map
   {
    [0.15 rgb <0,0,1>]
    [0.15 rgbt <1,1,1,1>]
   }
  }
  finish
  {
   emission 0.1 diffuse 0.6
  }
 }
}

// axis center
sphere
{
 0,0.5
 texture
 {
  pigment
  {
   rgb 0.1
  }
  finish
  {
   emission 0.1 diffuse 0.6
   specular 0.5 roughness 0.05
  }
 }
}

#declare Axis=
union
{
 cylinder
 {
  -x*3,x*3,0.25
  texture
  {
   pigment
   {
    gradient x
    color_map
    {
     [0.5 rgb <0,1,1>]
     [0.5 rgb <0.5,0.5,0.5>]
    }
   }
   finish
   {
    emission 0.1 diffuse 0.6
    specular 0.25 roughness 0.1
   }
  }
 }
 cone
 {
  x*3,0.33,x*4,0
  texture
  {
   pigment
   {
    rgb 0.75
   }
   finish
   {
    emission 0.1 diffuse 0.6
    specular 0.25 roughness 0.1
   }
  }
 }
}

object
{
 Axis
}

object
{
 Axis
 rotate <0,0,90>
}

object
{
 Axis
 rotate <0,-90,0>
}

// rotating box
box
{
 -1,1
 texture
 {
  pigment
  {
   checker rgbt <1,1,0,0.5> rgbt <1,0,1,0.5>
  }
  finish
  {
   emission 0.1 diffuse 0.6
   specular 0.5 roughness 0.01
  }
 }
 scale 2
 //translate -z*5
 #if (clock<0.333)
 rotate <3*clock*360,0,0>
 #local Xd=1; #local Yd=0.3; #local Zd=0.3;
 #else
 #if (clock<0.667)
 rotate <0,3*clock*360,0>
 #local Xd=0.3; #local Yd=1; #local Zd=0.3;
 #else
 rotate <0,0,3*clock*360>
 #local Xd=0.3; #local Yd=0.3; #local Zd=1;
 #end
 #end
}

text
{
 ttf "arialbd"
 "X",0.2,0
 no_shadow
 texture
 {
  pigment
  {
   red 1
  }
  finish
  {
   emission 0.1 diffuse Xd
   specular 0.5 roughness 0.05
  }
 }
 translate <4.5,-0.25,0>
}

text
{
 ttf "arialbd"
 "Y",0.2,0
 no_shadow
 texture
 {
  pigment
  {
   green 1
  }
  finish
  {
   emission 0.1 diffuse Yd
   specular 0.5 roughness 0.05
  }
 }
 translate <-0.25,4.5,0>
}

text
{
 ttf "arialbd"
 "Z",0.2,0
 no_shadow
 texture
 {
  pigment
  {
   blue 1
  }
  finish
  {
   emission 0.1 diffuse Zd
   specular 0.5 roughness 0.05
  }
 }
 translate <-0.25,-0.25,4.5>
}


Post a reply to this message


Attachments:
Download 'p-r_rh_aerobics_mirror.mp4.mpg' (710 KB)

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.