Rendering a Sphere


/*http://www.povray.org/documentation/#section4.1.2*/
#include "colors.inc"

background { color Cyan }

camera {
  location <0, 0, -3>
  look_at <0, 0, 0>
}

sphere {
  <0, 0, 0>, 0.5
  texture {
    pigment { color rgb <1.0,1.0,0.0> } //or color Yellow
  }
}

light_source { <4, 4, -3> color White}

To execute

save the file as sphere.pov
>povray sphere.pov

screenshot



Animation


Create POV file

#version 3.6;
global_settings {  assumed_gamma 1.0 }

camera{ ultra_wide_angle
        angle 75
        right x*image_width/image_height
        location  <0.0 , 1.0 ,-3.0>
        look_at   <0.0 , 0.0 , 0.0> }

light_source{ <1500,2500,-2500>
              color rgb<1,1,1> }

sky_sphere{ pigment{color rgb<1,1,1>}}

// the rotating sphere:
sphere{ <0,0,0>, 0.25
        texture { pigment{ rgb<1,0,0> }
                  finish { diffuse 0.9
                           phong 1}
                } // end of texture
        translate < 1.0, 0, 0>
        rotate < 0,360*clock 0>//  <-!!!!
       } // end of sphere

Create INI file


; POV-Ray animation ini file
Antialias=Off
Antialias_Threshold=0.1
Antialias_Depth=2

Input_File_Name="povAnim.pov"

Initial_Frame=1
Final_Frame=30
Initial_Clock=0
Final_Clock=1

Cyclic_Animation=on
Pause_when_Done=off

To Execute/Render

save pov file
save ini file (should be in the same folder as pov file)
(make sure you refer to the pov filename inside the ini filename)
>povray ini_filename