#include #include #include /* 320 x 240 */ static RtColor Red = { 1, 0, 0 }; static RtColor Green = { 0, 1, 0 }; static RtColor Blue = { 0, 0, 1 }; static RtColor RedWood = { 0.95, 0.15, 0.05 }; main() { char *fmt="binary"; RiOption("rib", "format", &fmt, RI_NULL); RiBegin("ee.rib"); RiLightSource("distantlight",RI_NULL); RiProjection("perspective",RI_NULL ); RiTranslate(-0.5,-0.3,1.8); RiRotate(-255.0,0.0,1.0,0.0); RiWorldBegin(); RiSurface("matte",RI_NULL); /* ejes ( mundo ) */ RiColor(Blue); RiCylinder(.1,.0,1.0,360.0,RI_NULL); RiDisk(1.0,0.1,360.0,RI_NULL); /* eje z,azul */ RiTransformBegin(); RiRotate(-90.0,1.0,0.0,0.0); RiColor(Green); RiCylinder(.1,.0,1.0,360.0,RI_NULL); RiDisk(1.0,0.1,360.0,RI_NULL); /* eje y, verde */ RiTransformEnd(); RiTransformBegin(); RiRotate(90.0,0.0,1.0,0.0); RiColor(Red); RiCylinder(.1,.0,1.0,360.0,RI_NULL); RiDisk(1.0,0.1,360.0,RI_NULL); /* eje x, rojo */ RiTransformEnd(); /* fin ejes */ /* objeto */ RiTranslate(.3,.5,.9); RiColor(RedWood); RiSurface("wood",RI_NULL); RiSphere(.4,-.4,.4,360.0,RI_NULL); /* fin de objeto ( si hubiese m‡s se deber’a haber apilado ) */ RiWorldEnd(); RiEnd(); return 0; }