/* Defaults : camera_location = <0,0,0> camera_right = 4/3*x camera_up = y camera_direction = z camera_sky = y camera_angle= 'computed form camera_direction & camera_right' see body of code ~60 deg camera_look_at = z Text=Credits = "Shamelessly Stolen from Rune S. Johansen http://hjem.get2net.dk/rsj" TextScale=.01 Font="crystal.ttf" */ #local Credits = "Shamelessly Stolen from Rune S. Johansen http://hjem.get2net.dk/rsj" #ifndef (camera_location) #declare camera_location = <0,0,0>; #end #ifndef (camera_right) #declare camera_right = 4/3*x; #end #ifndef (camera_up) #declare camera_up = y; #end #ifndef (camera_direction) #declare camera_direction = z; #end #ifndef (camera_sky) #declare camera_sky = y; #end #ifndef (camera_angle) #declare camera_angle =degrees(atan2(vlength(camera_right)/2/vlength(camera_direction),1))*2; #end #ifndef (camera_look_at) #declare camera_look_at = z; #end #ifndef (Text) #declare Text=Credits #end #ifndef (TextScale) #declare TextScale=.01; #end #ifndef (Font) #declare Font="crystal.ttf" #end #ifndef (TextTetxure) #declare TextTetxure=texture{pigment{rgb 1}finish{ambient 1}}#end // This #local is required for defaults #macro SigCam ( Text,TextScale,Font,TextTetxure, camera_location, camera_right,camera_up,camera_direction, camera_sky,camera_angle,camera_look_at ) #local autotext_t = camera_location; #local autotext_z = vnormalize (camera_look_at-camera_location) /2 *vlength(camera_right) /tan(radians(camera_angle/2)); #local autotext_x = vnormalize(vcross(camera_sky,autotext_z)); #local autotext_y = vnormalize(vcross(autotext_z,autotext_x)); #if (strcmp(Font,"")=0) #local Font="crystal.ttf" #end #if (strcmp(Text,"")=0) #local Text=Credits#end #if (TextScale=0) #local TextScale=.035; #end object { text { ttf Font, Text, 0.001, 0 texture{TextTetxure} translate 0.2 scale TextScale translate <-4/6,-1/2,0> } no_shadow translate z scale 0.001 matrix < autotext_x.x,autotext_x.y,autotext_x.z, autotext_y.x,autotext_y.y,autotext_y.z, autotext_z.x,autotext_z.y,autotext_z.z, autotext_t.x,autotext_t.y,autotext_t.z > } camera { location camera_location right camera_right up camera_up direction camera_direction sky camera_sky angle camera_angle look_at camera_look_at } #end // These #declarings are used in your scene file. // Leave out what you don't want, the "#include SigCam" will fill in the rest /* #declare camera_location = <0,1,-1.5>; #declare camera_right = 4/3*x; #declare camera_up = y; #declare camera_direction = z; #declare camera_sky = y; #declare camera_angle = 40; #declare camera_look_at = y*.125; #declare TextTetxure =texture{pigment{Blue}finish{ambient 1}} #include "SigCam.mac" SigCam ( "For Ken 'Links' Taylor",0.07,"ariali.ttf",TextTetxure, camera_location,camera_right,camera_up, camera_direction,camera_sky,camera_angle,camera_look_at ) */ //Regards,Rune S. Johansen http://hjem.get2net.dk/rsj