// Sample scene. // yuqk caps_open_features.pov +w800 +h800 +p #version unofficial 3.8; // yuqk #if (file_exists("version.inc")) #include "version.inc" #end #if (!defined(Fork_yuqk)) #error "This POV-Ray SDL code requires the yuqk fork." #end global_settings { assumed_gamma 1.0 } #declare Camera00 = camera { perspective location <1,0.3,-3.001>*0.7 sky y angle 35 right x*(image_width/image_height) look_at <0,0,0> } #declare VarOrthoMult = 5.0/max(image_width/image_height,image_height/image_width); #declare Camera01z = camera { orthographic location <0,0,-2> direction z right VarOrthoMult*x*max(1,image_width/image_height) up VarOrthoMult*y*max(1,image_height/image_width) } #declare White = srgb <1,1,1>; #declare Light00 = light_source { <50,150,-250>, White } #declare Red = srgb <1,0,0>; #declare CylinderX = cylinder { -1*x, 1*x, 0.01 pigment { Red } } #declare Green = srgb <0,1,0>; #declare CylinderY = cylinder { -1*y, 1*y, 0.01 pigment { Green } } #declare Blue = srgb <0,0,1>; #declare CylinderZ = cylinder { -1*z, 1*z, 0.01 pigment { Blue } } // Liberation fonts usually ship with Linux distributions. // Use command: 'fc-list | grep LiberationMono' to find // the location on your computer. #declare // FontFile = "/home/pokorny/Fonts/LiberationMono-Regular.ttf" FontFile = "/home/pokorny/Fonts/UbuntuMono-R.ttf" #declare String = "XYZ 123" // Use Chris R method to determine character pitches #local _T1 = text { ttf FontFile "A" 1.0, 0 } #local _T2 = text { ttf FontFile "AA" 1.0, 0 } #local _T3 = text { ttf FontFile "│" 1.0, 0 } #local _T1sz = max_extent(_T1) - min_extent(_T1); #local _T2sz = max_extent(_T2) - min_extent(_T2); #local _T3sz = max_extent(_T3) - min_extent(_T3); #declare _Cwidth = (_T2sz - _T1sz).x; #declare _Cheight = _T3sz.y; #declare TxtrO = texture { pigment { rgb <0.5,0.5,0> } finish { emission <0.1,0,0> } } #declare TxtrI = texture { pigment { rgb <0,0.5,0.5> } finish { emission <0,0.1,0> } } #declare Depth = 1; #declare TxtPosThickness = text { ttf FontFile String, +Depth, <0,0,0> texture { TxtrO } interior_texture { TxtrI } translate <-3.5*_Cwidth,-_Cheight/4,0> } #declare TxtNegThickness = text { ttf FontFile String, -Depth, <0,0,0> texture { TxtrO } interior_texture { TxtrI } translate <-3.5*_Cwidth,-_Cheight/4,0> } #declare TxtPosThickness_caps = text { ttf FontFile String, +Depth, <0,0,0> caps on texture { TxtrO } interior_texture { TxtrI } translate <-3.5*_Cwidth,-_Cheight/4,0> } #declare TxtNegThickness_caps = text { ttf FontFile String, -Depth, <0,0,0> caps on texture { TxtrO } interior_texture { TxtrI } translate <-3.5*_Cwidth,-_Cheight/4,0> } #declare TxtPosThickness_open = text { ttf FontFile String, +Depth, <0,0,0> open on texture { TxtrO } interior_texture { TxtrI } translate <-3.5*_Cwidth,-_Cheight/4,0> } #declare TxtNegThickness_open = text { ttf FontFile String, -Depth, <0,0,0> open on texture { TxtrO } interior_texture { TxtrI } translate <-3.5*_Cwidth,-_Cheight/4,0> } #declare U00 = union { object { TxtPosThickness translate <0,+5*_Cheight,0> } object { TxtNegThickness translate <0,+4*_Cheight,0> } object { TxtPosThickness_caps translate <0,+3*_Cheight,0> } object { TxtNegThickness_caps translate <0,+2*_Cheight,0> } object { TxtPosThickness_open translate <0,+1*_Cheight,0> } object { TxtNegThickness_open translate <0,+0*_Cheight,0> } translate <0,-2.5*_Cheight,0> scale 0.2 } //--- camera { Camera00 } // camera { Camera01z } light_source { Light00 } #if (1) object { U00 } #elseif (0) intersection { // negative thickness text{} object { U00 } box { <-1,-1,-0.10>,<+1,+1,-0.05> } } #elseif (0) intersection { // positive thickness text{} object { U00 } box { <-1,-1,+0.05>,<+1,+1,+0.10> } } #end sphere { 0, 0.005 pigment { rgb 0.2 } }