// Sample scene. // 'yuqk textDirections.pov +w800 +h800 +p' // With mono fonts right to left and vertical text{}s possible #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 } #declare VarOrthoMult = 12.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) } // 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" // "/home/pokorny/Fonts/LiberationMono-BoldItalic.ttf" // "/home/pokorny/Fonts/UbuntuMono-R.ttf" // 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 TxtRight = text { ttf FontFile "ABCDEFGHIJ", 2e-6, <0,0,0> //rotate <0,0,1e-6> // User fixes axis aligned artefacts translate <-5*_Cwidth,+_Cheight+(_Cheight/4),-1e-6> } #declare TxtLeft = text { ttf FontFile "ABCDEFGHIJ", 2e-6, <-2*_Cwidth,0,0> //rotate <0,0,1e-6> // User fixes axis aligned artefacts translate <+4*_Cwidth,-2*_Cheight+(_Cheight/4),-1e-6> } #declare TxtDown = text { ttf FontFile "ABCDEFGHIJ", 2e-6, <-_Cwidth,-_Cheight,0> //rotate <0,0,1e-6> // User fixes axis aligned artefacts translate <-7*_Cwidth,+4*_Cheight+(_Cheight/4),-1e-6> } #declare TxtUp = text { ttf FontFile "ABCDEFGHIJ",2e-6, <-_Cwidth,+_Cheight,0> //rotate <0,0,1e-6> // User fixes axis aligned artefacts translate <+6*_Cwidth,-5*_Cheight+(_Cheight/4),-1e-6> } #declare Fn = function { pattern { bool_object { TxtRight TxtLeft TxtDown TxtUp } warp { it_amount <0.05,0.05,0> it_lambda 4 it_scale 0.9} } } #include "functions.inc" plane { -z 0 pigment { #if (0) bool_object { TxtRight TxtLeft TxtDown TxtUp } warp { it_amount <0.05,0.05,0> it_octaves 3 it_omega 0.9 it_lambda 7 it_scale 1.7 } #elseif (0) function { Fn(x,y,z) } #else function { Fn(x,y,z)*(f_popnrm_rnoise(x,y,z,now,1)+1.0) } inverse #end } finish { emission 1 } } camera { Camera01z } sphere { 0, 0.5 pigment { rgbt <1,0,0,0.7> } finish { emission 1 } }