// Sample scene. 'yuqk boolObjPlay.pov +w900 +h450 -p +mv3.8 +kff1311' global_settings { assumed_gamma 1.0 } #declare VarOrthoMult = 4.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) } //#local FontStr = "/home/pokorny/Fonts/UbuntuMono-R.ttf" //#local FontStr = "/home/pokorny/Fonts/LiberationMono-Regular.ttf" #local FontStr = "/home/pokorny/Fonts/Hack-Regular.ttf" #local _T1 = text { ttf FontStr "A" 1.0, 0 } #local _T2 = text { ttf FontStr "AA" 1.0, 0 } #local _T3 = text { ttf FontStr "│" 1.0, 0 } #include "DetermineCharacterWandH.inc" #local CharsPerPage = 50; #local I = (frame_number-1)*CharsPerPage; #local I = min(65535-CharsPerPage+1,I); #local Str00n = concat( "|",str(I+ 0,-5,0),"|",str(I+ 1,-5,0),"|",str(I+ 2,-5,0),"|",str(I+ 3,-5,0),"|",str(I+ 4,-5,0),"|",str(I+ 5,-5,0),"|",str(I+ 6,-5,0),"|",str(I+ 7,-5,0),"|",str(I+ 8,-5,0),"|",str(I+ 9,-5,0),"|") #local Str01n = concat( "|",str(I+10,-5,0),"|",str(I+11,-5,0),"|",str(I+12,-5,0),"|",str(I+13,-5,0),"|",str(I+14,-5,0),"|",str(I+15,-5,0),"|",str(I+16,-5,0),"|",str(I+17,-5,0),"|",str(I+18,-5,0),"|",str(I+19,-5,0),"|") #local Str02n = concat( "|",str(I+20,-5,0),"|",str(I+21,-5,0),"|",str(I+22,-5,0),"|",str(I+23,-5,0),"|",str(I+24,-5,0),"|",str(I+25,-5,0),"|",str(I+26,-5,0),"|",str(I+27,-5,0),"|",str(I+28,-5,0),"|",str(I+29,-5,0),"|") #local Str03n = concat( "|",str(I+30,-5,0),"|",str(I+31,-5,0),"|",str(I+32,-5,0),"|",str(I+33,-5,0),"|",str(I+34,-5,0),"|",str(I+35,-5,0),"|",str(I+36,-5,0),"|",str(I+37,-5,0),"|",str(I+38,-5,0),"|",str(I+39,-5,0),"|") #local Str04n = concat( "|",str(I+40,-5,0),"|",str(I+41,-5,0),"|",str(I+42,-5,0),"|",str(I+43,-5,0),"|",str(I+44,-5,0),"|",str(I+45,-5,0),"|",str(I+46,-5,0),"|",str(I+47,-5,0),"|",str(I+48,-5,0),"|",str(I+49,-5,0),"|") #if (strlen(chr(I+0))!=1) // Special handling for null character #local Chr00 = " " // Also useful for image character comparisons #else #local Chr00 = chr(I+0) #end #local Str00c = concat( "| ", Chr00," | ",chr(I+ 1)," | ",chr(I+ 2)," | ",chr(I+ 3)," | ",chr(I+ 4)," | ",chr(I+ 5)," | ",chr(I+ 6)," | ",chr(I+ 7)," | ",chr(I+ 8)," | ",chr(I+ 9)," |") #local Str01c = concat( "| ",chr(I+10)," | ",chr(I+11)," | ",chr(I+12)," | ",chr(I+13)," | ",chr(I+14)," | ",chr(I+15)," | ",chr(I+16)," | ",chr(I+17)," | ",chr(I+18)," | ",chr(I+19)," |") #local Str02c = concat( "| ",chr(I+20)," | ",chr(I+21)," | ",chr(I+22)," | ",chr(I+23)," | ",chr(I+24)," | ",chr(I+25)," | ",chr(I+26)," | ",chr(I+27)," | ",chr(I+28)," | ",chr(I+29)," |") #local Str03c = concat( "| ",chr(I+30)," | ",chr(I+31)," | ",chr(I+32)," | ",chr(I+33)," | ",chr(I+34)," | ",chr(I+35)," | ",chr(I+36)," | ",chr(I+37)," | ",chr(I+38)," | ",chr(I+39)," |") #local Str04c = concat( "| ",chr(I+40)," | ",chr(I+41)," | ",chr(I+42)," | ",chr(I+43)," | ",chr(I+44)," | ",chr(I+45)," | ",chr(I+46)," | ",chr(I+47)," | ",chr(I+48)," | ",chr(I+49)," |") #declare Text00n = text { ttf FontStr Str00n, 1.0, 0 translate <0,+0*_Unit_height,-0.5> } #declare Text00c = text { ttf FontStr Str00c, 1.0, 0 translate <0,-1*_Unit_height,-0.5> } #declare Text01n = text { ttf FontStr Str01n, 1.0, 0 translate <0,-2*_Unit_height,-0.5> } #declare Text01c = text { ttf FontStr Str01c, 1.0, 0 translate <0,-3*_Unit_height,-0.5> } #declare Text02n = text { ttf FontStr Str02n, 1.0, 0 translate <0,-4*_Unit_height,-0.5> } #declare Text02c = text { ttf FontStr Str02c, 1.0, 0 translate <0,-5*_Unit_height,-0.5> } #declare Text03n = text { ttf FontStr Str03n, 1.0, 0 translate <0,-6*_Unit_height,-0.5> } #declare Text03c = text { ttf FontStr Str03c, 1.0, 0 translate <0,-7*_Unit_height,-0.5> } #declare Text04n = text { ttf FontStr Str04n, 1.0, 0 translate <0,-8*_Unit_height,-0.5> } #declare Text04c = text { ttf FontStr Str04c, 1.0, 0 translate <0,-9*_Unit_height,-0.5> } // Because almost all fonts are sparsely implemented in the BMP, do some work to // create completely black images where characters are defaulting to some common glyph. #local _TCmp1 = text { ttf FontStr Chr00 1.0, 0 translate -0.5*z } #declare FnBaseImg = function { pattern { bool_object {_TCmp1} } } #local Resolution = 199; #local InvDelta = 1.0/(Resolution-30); #local Matched = true; #for (KK,I+1,I+CharsPerPage-1,1) #local KK = min(65535,KK); #if (strlen(chr(KK))!=1) #error concat("ERROR! Saw strlen() other than 1 at character ",str(KK,5,0),"\n") #end #local _TCmp2 = text { ttf FontStr chr(KK) 1.0, 0 translate -0.5*z } #if (defined(FnTestImg)) #undef FnTestImg #end #declare FnTestImg = function { pattern { bool_object {_TCmp2} } } #for (YY,-50,Resolution,1) #for (XX,-50,Resolution,1) #if ( FnBaseImg(XX*InvDelta,YY*InvDelta,0) != FnTestImg(XX*InvDelta,YY*InvDelta,0)) #local Matched = false; //#debug concat("Failed match at XX = ",str(XX,4,0)," YY = ",str(YY,4,0),"\n") #end #if (!Matched) #break #end #end //#debug concat("YY = ",str(YY,4,0),"\n") #if (!Matched) #break #end #end #end #undef KK #if (!Matched) plane { -z 0 pigment { bool_object { Text00n Text00c Text01n Text01c Text02n Text02c Text03n Text03c Text04n Text04c pigment { rgb <0,0,0> } pigment { rgb <0,1,0> } } translate <-(max_extent(Text00n)-min_extent(Text00n)).x/2.0,5*_Unit_height-0.5,0> scale 0.1 } finish { emission 1 } } #end camera { Camera01z }