// Persistence of Vision Ray Tracer Scene Description File // File: dot_text.pov // Vers: 3.5 // Desc: Macro to generate DOT text objects // Start Date: 24/Dec/2004 // Auth: B. Gimeno // email: aplenosol[at]ya.com #include "colors.inc" #include "transforms.inc" #include "shapes.inc" global_settings { assumed_gamma 1.0 } camera {location <0,15,-35> look_at <-7,3,0>} light_source { <-15,30,-40> colour White parallel point_at <0,0,0> fade_power 2 fade_distance 30 } plane {y,0 pigment {Black} finish {reflection .9}normal {wrinkles .25}} fog { fog_type 1 distance 70 color Black turbulence <0.5, 0.5, 1.0> turb_depth 0.5 omega 0.5 lambda 2.0 octaves 6 } sky_sphere {pigment {rgb <215,215,208>/255}} // --------------------------------- Macro --------------------------------- #macro Dot_Letter (String,Sign_Size,Ball_Size,Deep_Dots,Position,Curvature) #local Text= object { text { ttf "crystal.ttf" //"timrom.ttf" //"povlogo.ttf" //"arial.ttf" //"verdana.ttf" //"wingding.ttf" // "webdings.ttf" concat (String) .15,0 } pigment {Red} scale Sign_Size rotate x*90 translate y*Sign_Size/1000000 } #local T = object {Text Center_Trans(Text,x+z)} #local Min_T = min_extent (T) ; #local Max_T = max_extent (T) ; #local Bx = object {box {Min_T*1.5, Max_T*1.5} pigment {Gray50 filter .8} } ; #macro DepB(D_Dots) union { #local D_Dots_R = D_Dots ; #while (D_Dots_R>0) //object {sphere {<0,0,0>,Ball_Size} translate -y*D_Dots_R*Ball_Size*2} //box {-Ball_Size*.5,Ball_Size*.5 translate -y*D_Dots_R*Ball_Size*2} //box {-Ball_Size,Ball_Size translate -y*D_Dots_R*Ball_Size*2} object {Round_Box (<-Ball_Size,-Ball_Size,-Ball_Size>,Ball_Size*0.4 off) translate -y*D_Dots_R*Ball_Size*2 } /* #local D_Arr = array [8] { <-Ball_Size,-Ball_Size,-Ball_Size> // 0 < Ball_Size,-Ball_Size,-Ball_Size> // 1 <-Ball_Size,-Ball_Size, Ball_Size> // 2 < Ball_Size,-Ball_Size, Ball_Size> // 3 <-Ball_Size, Ball_Size,-Ball_Size> // 4 < Ball_Size, Ball_Size,-Ball_Size> // 5 <-Ball_Size, Ball_Size, Ball_Size> // 6 < Ball_Size, Ball_Size, Ball_Size> // 7 } union { cylinder {D_Arr[0],D_Arr[1],Ball_Size*0.2} cylinder {D_Arr[1],D_Arr[3],Ball_Size*0.2} cylinder {D_Arr[3],D_Arr[2],Ball_Size*0.2} cylinder {D_Arr[2],D_Arr[0],Ball_Size*0.2} cylinder {D_Arr[4],D_Arr[5],Ball_Size*0.2} cylinder {D_Arr[5],D_Arr[7],Ball_Size*0.2} cylinder {D_Arr[6],D_Arr[4],Ball_Size*0.2} cylinder {D_Arr[7],D_Arr[6],Ball_Size*0.2} cylinder {D_Arr[0],D_Arr[4],Ball_Size*0.2} cylinder {D_Arr[1],D_Arr[5],Ball_Size*0.2} cylinder {D_Arr[2],D_Arr[6],Ball_Size*0.2} cylinder {D_Arr[3],D_Arr[7],Ball_Size*0.2} union { sphere {D_Arr[0],Ball_Size*0.35} sphere {D_Arr[1],Ball_Size*0.35} sphere {D_Arr[2],Ball_Size*0.35} sphere {D_Arr[3],Ball_Size*0.35} sphere {D_Arr[4],Ball_Size*0.35} sphere {D_Arr[5],Ball_Size*0.35} sphere {D_Arr[6],Ball_Size*0.35} sphere {D_Arr[7],Ball_Size*0.35} pigment {Orange} finish {reflection 0.75 phong .55} } translate -y*D_Dots_R*Ball_Size*2 }*/ #local D_Dots_R = D_Dots_R-1; #end } #end #local Min_X = Min_T.x ; #local Min_Z = Min_T.z ; #local Max_X = Max_T.x ; #local Max_Z = Max_T.z ; #local RND1 = seed (pi) ; #local RND2 = seed (pi) ; #local RND3 = seed (pi) ; #local X_Blobs = Max_X-Min_X ; #local Z_Blobs = Max_Z-Min_Z ; #local X_Blobs_r = -X_Blobs ; union { #while (X_Blobs_r ; #local To = ; #local OverT = trace (T,From,To); #if (vlength(OverT)!=0) object {DepB(Deep_Dots) translate OverT //translate z*X_Blobs_r+sin(radians((Z_Blobs_r)*Curvature))+sin(radians(X_Blobs_r)*Curvature) //translate y*Z_Blobs_r+sin(radians((X_Blobs_r)*Curvature))+sin(radians(Z_Blobs_r)*Curvature) // pigment {rgb } pigment {White} finish {phong .3 phong_size 200 reflection .8} #if (Position=2) rotate x*-90 translate -y*Min_Z #end } /* sphere {Overt,Ball_Size translate y*Ball_Size pigment {rgb } finish {phong .3 phong_size 200 reflection .8} #if (Position=2) rotate x*-90 translate y*Ball_Size translate -y*Min_Z #end } */ #end #local Z_Blobs_r = Z_Blobs_r+Ball_Size ; #end #local X_Blobs_r = X_Blobs_r+Ball_Size ; #end } // END BLOB #end // --------------------------------- End Macro --------------------------------- object { Dot_Letter( "POV", // string 20, // scale string .3, // balls size 5, // Deep_Dots 2, // posicion: 1=tumbada; 2=de pie 1 // curvature ) rotate y*-45 }