/* Characters for Persistence of Vision Raytracer By Theo van Rijn 1999-2002 Theo.van.Rijn@kabelfoon.nl This file includes all upper-case letters defined as CSG objects. The size of the letters varies. The standard size is 1.4 * 2.4 * 0.4. but this depends on the letter. The left-lower-front corner of the letters is set at the origin, so translate a letter appropriately before rotating. Example usage of the A: object{ Letter_A pigment{ color Red } } ToDo: add all lower case letters and special characters. */ #ifdef(View_POV_Include_Stack) # debug "including LettersTvR.inc\n" #end // Start with some standards units. #local StdWidth = 1.4; #local StdHeight = 2.4; #local StdDepth = 0.4; #local StdInnerRadius = StdDepth / 2; // ( = 0.2) #local StdOuterRadius = StdWidth / 2 - StdInnerRadius; // ( = 0.5) // *** The capital letter A with a round top. ********************************* #declare Letter_A_Width = 1.4; #declare Letter_A_Height = 2.4; #declare Letter_A_Depth = 0.4; #declare Letter_A = merge { // De staande, linker zijde. cylinder { y*1.5, y*0.0, StdInnerRadius translate -x*0.5} sphere { <-0.5, 0.0, 0.0> StdInnerRadius } // The upper bend. intersection { torus { 0.5, StdInnerRadius rotate x*90 translate y*1.5} plane { -y, -1.5 } } // De staande, rechter zijde. cylinder { y*1.5, y*0.0, StdInnerRadius translate x*0.5} sphere { < 0.5, 0.0, 0.0> StdInnerRadius } // De liggend streep cylinder { x*0.4, -x*0.4, StdInnerRadius translate y*0.55} // Put the letter on the origin. translate <0.7, StdInnerRadius, StdInnerRadius> } // *** The lower case b. ************************************************** #declare Letter_b_Width = 1.4; #declare Letter_b_Height = 2.4; #declare Letter_b_Depth = 0.4; #declare Letter_b = merge { // The vertical left side. cylinder { y*1.5, -y*0.5, StdInnerRadius translate -x*StdOuterRadius} // Add the upper connect point. sphere { < -StdOuterRadius, +1.5, 0.0> StdInnerRadius } // Add the lower connect point. sphere { < -StdOuterRadius, -0.5, 0.0> StdInnerRadius } // The middle horizontal leg. cylinder { x*-0.5, x*0.0, StdInnerRadius translate y*StdOuterRadius*1.0} // De onderste bocht. intersection { box { <0,2,1> <-2,-2,-1> inverse} torus { StdOuterRadius, StdInnerRadius rotate x*90} } // The lower horizontal leg. cylinder { x*-0.5, x*0.0, StdInnerRadius translate -y*StdOuterRadius*1.0} // Put the letter on the origin. translate <0.7, 0.7, StdInnerRadius> } // *** The capital letter B. ************************************************** #declare Letter_B_Width = 1.4; #declare Letter_B_Height = 2.4; #declare Letter_B_Depth = 0.4; #declare Letter_B = merge { // The vertical left side. cylinder { y*1.5, -y*0.5, StdInnerRadius translate -x*StdOuterRadius} // Add the upper connect point. sphere { < -StdOuterRadius, +1.5, 0.0> StdInnerRadius } // Add the lower connect point. sphere { < -StdOuterRadius, -0.5, 0.0> StdInnerRadius } // De liggend bovenste streep. cylinder { x*-0.5, x*0.0, StdInnerRadius translate y*StdOuterRadius*3.0} // De bovenste bocht. intersection { box { <0,2,1> <-2,-2,-1> inverse} torus { StdOuterRadius, StdInnerRadius rotate x*90} translate y*StdOuterRadius*2 } // The middle horizontal leg. cylinder { x*-0.5, x*0.0, StdInnerRadius translate y*StdOuterRadius*1.0} // De onderste bocht. intersection { box { <0,2,1> <-2,-2,-1> inverse} torus { StdOuterRadius, StdInnerRadius rotate x*90} } // De liggend onderste streep. cylinder { x*-0.5, x*0.0, StdInnerRadius translate -y*StdOuterRadius*1.0} // Put the letter on the origin. translate <0.7, 0.7, StdInnerRadius> } // *** The capital letter C. ************************************************** #declare Letter_C_Width = 1.4; #declare Letter_C_Height = 2.4; #declare Letter_C_Depth = 0.4; #declare Letter_C = merge { // The vertical left side. cylinder { y*1.5, y*0.5, 0.2} // The upper bend. intersection { torus { 0.5, 0.2 rotate x*90 translate x*0.5+y*1.5 } plane { -y, -1.5 } } // Add the end point to the upper bend. sphere { < 1.0, 1.5, 0.0> StdInnerRadius } // The lower bend. intersection { torus { 0.5, 0.2 rotate x*90 translate x*0.5+y*0.5} plane { y, 0.5 } } // Add the end point to the lower bend. sphere { < 1.0, 0.5, 0.0> StdInnerRadius } // Put the letter on the origin. translate } // *** The capital letter D. ************************************************** #declare Letter_D_Width = 1.4; #declare Letter_D_Height = 2.4; #declare Letter_D_Depth = 0.4; #declare Letter_D = merge { // The vertical left side. cylinder { y*1.5, -y*0.5, StdInnerRadius translate -x*StdOuterRadius} // Add the upper connect point. sphere { < -StdOuterRadius, +1.5, 0.0> StdInnerRadius } // Add the lower connect point. sphere { < -StdOuterRadius, -0.5, 0.0> StdInnerRadius } // De liggend bovenste streep. cylinder { x*-0.5, x*0.0, StdInnerRadius translate y*StdOuterRadius*3.0} // De bovenste bocht. intersection { box { <2,2,1> <0,0,-1>} torus { StdOuterRadius, StdInnerRadius rotate x*90} translate y*StdOuterRadius*2 } // De liggend middelste streep. cylinder { y*StdOuterRadius*2, y*0.0, StdInnerRadius translate x*StdOuterRadius} // De onderste bocht. intersection { box { <2,0,1> <0,-2,-1>} torus { StdOuterRadius, StdInnerRadius rotate x*90} } // De liggend onderste streep. cylinder { x*-0.5, x*0.0, StdInnerRadius translate -y*StdOuterRadius*1.0} // Put the letter on the origin. translate <0.7, 0.7, StdInnerRadius> } // *** The lowercase letter e. ************************************************ #declare Letter_e_Width = 1.4; #declare Letter_e_Height = 2.4; #declare Letter_e_Depth = 0.4; #declare Letter_e = merge { // Make the round and take out the 'tart tip'. intersection { torus { 0.5, 0.2 rotate x*90 } union { plane { -y, 0.0 } plane { x, 0.0 } } } // Add the connection point sphere { < 0.5, 0.0, 0.0> StdInnerRadius } // Add the horizontal bar. cylinder { -x*0.5, x*0.5, StdInnerRadius } // Add the connection point sphere { < 0.4, -0.5, 0.0> StdInnerRadius } // Add the horizontal bar. cylinder { x*0.0, x*0.4, StdInnerRadius translate -y*0.5 } // Put the letter on the origin. translate < 0.7, 0.7, StdInnerRadius > } // *** The capital letter E. ************************************************** #declare Letter_E_Width = 1.2; #declare Letter_E_Height = 2.4; #declare Letter_E_Depth = 0.4; #declare Letter_E = merge { // The point where the two side meet in the top left corner. sphere { < 0.0, 2.0, 0.0> StdInnerRadius } // De staande, linker zijde. cylinder { y*2.0, 0.0, StdInnerRadius} // The point where the two side meet in the lower left corner. sphere { < 0.0, 0.0, 0.0> StdInnerRadius } // De liggend bovenste streep. cylinder { x*0.0, x*0.8, StdInnerRadius translate y*2.0} sphere { < 0.8, 2.0, 0.0> StdInnerRadius } // De liggend middelste streep. cylinder { x*0.0, x*0.6, StdInnerRadius translate y*1.0} sphere { < 0.6, 1.0, 0.0> StdInnerRadius } // De liggend onderste streep. cylinder { x*0.0, x*0.8, StdInnerRadius translate y*0.0} sphere { < 0.8, 0.0, 0.0> StdInnerRadius } // Put the letter on the origin. translate < StdInnerRadius, StdInnerRadius, StdInnerRadius > } // *** The capital letter F with a flat top. ********************************** #declare Letter_F_Width = 1.2; #declare Letter_F_Height = 2.4; #declare Letter_F_Depth = 0.4; #declare Letter_F = merge { // The standing left leg. cylinder { y*0.0, y*2.0, StdInnerRadius} // The point where the two side meet in the lower left corner. sphere { < 0.0, 2.0, 0.0> StdInnerRadius } sphere { < 0.0, 0.0, 0.0> StdInnerRadius } // The horizontal upper leg. cylinder { x*0.0, x*0.8, StdInnerRadius translate y*2.0 } sphere { < 0.8, 2.0, 0.0> StdInnerRadius } // The horizontal middle leg. cylinder { x*0.0, x*0.6, StdInnerRadius translate y*1.2 } sphere { < 0.6, 1.2, 0.0> StdInnerRadius } // Put the lower left corner on the origin. translate < StdInnerRadius, StdInnerRadius, StdInnerRadius > } // *** The capital letter G. ************************************************** #declare Letter_G_Width = 1.4; #declare Letter_G_Height = 2.4; #declare Letter_G_Depth = 0.4; #declare Letter_G = merge { // The vertical left side. cylinder { y*1.5, y*0.5, StdInnerRadius} // The upper bend. intersection { torus { 0.5, StdInnerRadius rotate x*90 translate x*0.5+y*1.5 } plane { -y, -1.5 } } // Add the end point to the upper bend. sphere { < 1.0, 1.5, 0.0> StdInnerRadius } // The lower bend. intersection { torus { 0.5, StdInnerRadius rotate x*90 translate x*0.5+y*0.5} plane { y, 0.5 } } // Make this a G by adding two small legs, vertical and horizontal. cylinder { < 1.0, 0.5, 0.0>, < 1.0, 0.8, 0.0>, StdInnerRadius} sphere { < 1.0, 0.8, 0.0> StdInnerRadius } cylinder { < 0.6, 0.8, 0.0>, < 1.0, 0.8, 0.0>, StdInnerRadius} sphere { < 0.6, 0.8, 0.0> StdInnerRadius } // Put the letter on the origin. translate } // *** The capital letter H. ************************************************** #declare Letter_H_Width = 1.4; #declare Letter_H_Height = 2.4; #declare Letter_H_Depth = 0.4; #declare Letter_H = merge { // De staande, linker zijde. cylinder { 0.0, y*2.0, StdInnerRadius translate -x*StdOuterRadius } sphere { < -StdOuterRadius, 2.0, 0.0 > StdInnerRadius } sphere { < -StdOuterRadius, 0.0, 0.0 > StdInnerRadius } // De liggend middelste streep. cylinder { -x*StdOuterRadius, +x*StdOuterRadius, StdInnerRadius translate y*StdHeight/2 } // De staande, rechter zijde. cylinder { 0.0, y*2.0, StdInnerRadius translate +x*StdOuterRadius } sphere { < +StdOuterRadius, 2.0, 0.0 > StdInnerRadius } sphere { < +StdOuterRadius, 0.0, 0.0 > StdInnerRadius } // Put the letter on the origin. translate } // *** The capital letter I. ************************************************** #declare Letter_I_Width = 0.4; #declare Letter_I_Height = 2.4; #declare Letter_I_Depth = 0.4; #declare Letter_I = merge { // De staande, linker zijde. cylinder { 0.0, y*2.0, StdInnerRadius } sphere { < 0.0, 2.0, 0.0 > StdInnerRadius } sphere { < 0.0, 0.0, 0.0 > StdInnerRadius } // Put the letter on the origin. translate < StdInnerRadius, StdInnerRadius, StdInnerRadius > } // *** The capital letter J. ************************************************** #declare Letter_J_Width = 1.4; #declare Letter_J_Height = 2.4; #declare Letter_J_Depth = 0.4; #declare Letter_J = merge { // The vertical right side. cylinder { y*2.0, y*0.5, 0.2} sphere { < 0.0, 2.0, 0.0 > StdInnerRadius } // The lower bend. intersection { torus { 0.5, 0.2 rotate x*90 translate -x*0.5+y*0.5} plane { y, 0.5 } } // Add the end point to the lower bend. sphere { < -1.0, 0.5, 0.0> StdInnerRadius } // Put the letter on the origin. translate } // *** The capital letter K. ************************************************** #declare Letter_K_Width = 1.4; #declare Letter_K_Height = 2.4; #declare Letter_K_Depth = 0.4; #declare Letter_K = merge { // De staande, linker zijde. cylinder { y*2.0, y*0.0, StdInnerRadius } sphere { < 0.0, 2.0, 0.0 > StdInnerRadius } sphere { < 0.0, 0.0, 0.0 > StdInnerRadius } // The slanting upper paw. merge { cylinder { y*1.37, y*0.0, StdInnerRadius } sphere { < 0.0, 1.37, 0.0 > StdInnerRadius } rotate -z*43 translate y*1.0 } // The slanting lower paw. merge { cylinder { y*0.0, -y*1.37, StdInnerRadius } sphere { < 0.0, -1.37, 0.0 > StdInnerRadius } rotate z*43 translate y*1.0 } // Put the letter on the origin. translate < StdInnerRadius, StdInnerRadius, StdInnerRadius > } // *** The capital letter L. ************************************************** #declare Letter_L_Width = 1.2; #declare Letter_L_Height = 2.4; #declare Letter_L_Depth = 0.4; #declare Letter_L = merge { // The standing left leg. cylinder { y*2.0, 0.0, StdInnerRadius} sphere { < 0.0, 2.0, 0.0 > StdInnerRadius } // The point where the two side meet in the lower left corner. sphere { < 0.0, 0.0, 0.0> StdInnerRadius } // The horizontal lower leg. cylinder { x*0.0, x*0.8, StdInnerRadius } sphere { < 0.8, 0.0, 0.0 > StdInnerRadius } // Put the letter on the origin. translate < StdInnerRadius, StdInnerRadius, StdInnerRadius > } // *** The capital letter M with a two round tops. **************************** #declare Letter_M_Width = 2.4; #declare Letter_M_Height = 2.4; #declare Letter_M_Depth = 0.4; #declare Letter_M = merge { // De staande, linker zijde. cylinder { y*1.3, -y*0.2, 0.2 translate -x*1.0 } sphere { <-1.0, -0.2, 0.0> StdInnerRadius } // De linker boven ronde. intersection { //cylinder { y*2.0, -y*0.4, 0.2 translate -x*1.0 inverse} torus { 0.5, 0.2 rotate x*90 translate y*1.3 + -x*0.5} plane { -y, -1.3 } } // De staande middelste cylinder. cylinder { y*1.3, y*1.1, 0.2 translate x*0.0} sphere { < 0.0, 1.1, 0.0> StdInnerRadius } // De rechter boven ronde. intersection { cylinder { y*2.0, -y*0.4, 0.2 translate -x inverse} torus { 0.5, 0.2 rotate x*90 translate y*1.3 + x*0.5} plane { -y, -1.3 } } // De staande, rechter zijde. cylinder { y*1.3, -y*0.2, 0.2 translate x*1.0} sphere { < 1.0, -0.2, 0.0> StdInnerRadius } // Put the letter on the origin. translate <1.2, 0.4, 0.2> } // *** The lowercase letter n with a round top. ******************************* #declare Letter_n_Width = 1.4; #declare Letter_n_Height = 2.4; #declare Letter_n_Depth = 0.4; #declare Letter_n = merge { // De staande, linker zijde. cylinder { y*0.3, -y*0.4, 0.2 translate -x*1.0 } // De linker boven ronde. intersection { //cylinder { y*2.0, -y*0.4, 0.2 translate -x*1.0 inverse} torus { 0.5, 0.2 rotate x*90 translate y*0.3 + -x*0.5} plane { -y, -0.3 } } // De staande middelste cylinder. cylinder { y*0.3, -y*0.4, 0.2 translate x*0.0} // Put the lower left front corner on the origin. translate <1.2, 0.4, 0.2> } // End of Letter_n. // *** The capital letter N with a round top. ********************************* #declare Letter_N_Width = 1.4; #declare Letter_N_Height = 2.4; #declare Letter_N_Depth = 0.4; #declare Letter_N = merge { // De staande, linker zijde. cylinder { y*1.3, -y*0.2, 0.2 translate -x*1.0 } sphere { <-1.0, -0.2, 0.0> StdInnerRadius } // De linker boven ronde. intersection { //cylinder { y*2.0, -y*0.4, 0.2 translate -x*1.0 inverse} torus { 0.5, 0.2 rotate x*90 translate y*1.3 + -x*0.5} plane { -y, -1.3 } } // De staande middelste cylinder. cylinder { y*1.3, -y*0.2, 0.2 translate x*0.0} sphere { < 0.0, -0.2, 0.0> StdInnerRadius } // Put the lower left front corner on the origin. translate <1.2, 0.4, 0.2> } // End of Letter_N. // *** The lowercase letter o. ************************************************ #declare Letter_o_Width = 1.4; #declare Letter_o_Height = 1.4; #declare Letter_o_Depth = 0.4; #declare Letter_o = torus { StdOuterRadius, StdInnerRadius // Put the torus in the XY plane. rotate x*90 // Put the lower left front corner on the origin. translate < StdOuterRadius + StdInnerRadius, StdOuterRadius + StdInnerRadius, StdInnerRadius> } // End of Letter_o. // *** The capital letter O. ************************************************** #declare Letter_O_Width = 1.4; #declare Letter_O_Height = 2.4; #declare Letter_O_Depth = 0.4; #declare Letter_O = merge { // De staande, linker zijde. cylinder { y*1.3, y*0.3, 0.2 translate x*-0.5} // De staande, rechter zijde. cylinder { y*1.3, y*0.3, 0.2 translate x*0.5} // Het rondje boven. intersection { torus { 0.5, 0.2 rotate x*90 translate y*1.3} plane { -y, -1.3 } } // Het rondje onder. intersection { torus { 0.5, 0.2 rotate x*90 translate y*0.3} plane { y, 0.3 } } // Put the letter on the origin. translate <0.7, 0.4, 0.2> } // End of Letter_O. // *** The capital letter P. ************************************************** #declare Letter_P_Width = 1.4; #declare Letter_P_Height = 2.4; #declare Letter_P_Depth = 0.4; #declare Letter_P = merge { // De staande, linker zijde. cylinder { y*1.3, -y*0.2, 0.2 translate -x} sphere { <-1.0, -0.2, 0.0> StdInnerRadius } // Het rondje. torus { 0.5, 0.2 rotate x*90 translate y*1.3 + -x*0.5} // Put the letter on the origin. translate <1.2, 0.4, 0.2> } // *** The capital letter Q. ************************************************** #declare Letter_Q_Width = 1.4; #declare Letter_Q_Height = 2.4; #declare Letter_Q_Depth = 0.4; #declare Letter_Q = merge { // De staande, linker zijde. cylinder { y*1.5, y*0.5, StdInnerRadius translate -x*0.5 } // De staande, rechter zijde. cylinder { y*1.5, y*0.5, StdInnerRadius translate +x*0.5 } // Het rondje boven. intersection { torus { 0.5, StdInnerRadius rotate x*90 translate y*1.5} plane { -y, -1.5 } } // Het rondje onder. intersection { torus { 0.5, StdInnerRadius rotate x*90 translate y*0.5} plane { y, 0.5 } } // Add the small appendum to make this the Q. merge { sphere { < 0.0, 0.4, 0.0>, StdInnerRadius } cylinder { < 0.0, 0.0, 0.0>, < 0.0, 0.4, 0.0>, StdInnerRadius } sphere { < 0.0, 0.0, 0.0>, StdInnerRadius } rotate z*45 translate <0.5, 0.0, 0.0> } // Put the letter on the origin. translate <0.7, StdInnerRadius, StdInnerRadius> } // End of Letter_Q. // *** The capital letter R. ************************************************** #declare Letter_R_Width = 1.4; #declare Letter_R_Height = 2.4; #declare Letter_R_Depth = 0.4; #declare Letter_R = merge { // De staande, linker zijde. cylinder { y*1.5, y*0.0, StdInnerRadius } sphere { < 0.0, 0.0, 0.0>, StdInnerRadius } // 'Glue' the slanting paw to the round in order to turn them together. merge { // The round. torus { 0.5, 0.2 rotate x*90 } // The slanting paw. cylinder { y*0.0, -y*1.48, StdInnerRadius translate -x*0.5 } sphere { < -0.5, -1.48, 0.0>, StdInnerRadius } rotate z*36 translate y*1.5 + x*0.5 } // Put the letter on the origin. translate < StdInnerRadius, StdInnerRadius, StdInnerRadius > } // *** The capital letter S. ************************************************** #declare Letter_S_Width = 1.4; #declare Letter_S_Height = 2.4; #declare Letter_S_Depth = 0.4; #declare Letter_S = merge { // De bovenste bocht. intersection { box { <2,0,1> <0,-2,-1> inverse} torus { 0.5, 0.2 rotate x*90} translate y*1.0 } sphere { < 0.5, 1.0, 0.0>, StdInnerRadius } // De onderste bocht. intersection { box { <0,2,1> <-2,0,-1> inverse} torus { 0.5, 0.2 rotate x*90} translate y*0.0 } sphere { <-0.5, 0.0, 0.0>, StdInnerRadius } // Put the letter on the origin. translate <0.7, 0.7, 0.0> } // *** The capital letter T. ************************************************** #declare Letter_T_Width = 1.4; #declare Letter_T_Height = 2.4; #declare Letter_T_Depth = 0.4; #declare Letter_T = merge { // The vertical leg. cylinder { y*2.0, y*0.0, StdInnerRadius } sphere { < 0.0, 0.0, 0.0 > StdInnerRadius } // De liggend middelste streep. cylinder { -x*0.5, x*0.5, StdInnerRadius translate y*2.0 } sphere { < -0.5, 2.0, 0.0 > StdInnerRadius } sphere { < +0.5, 2.0, 0.0 > StdInnerRadius } // Put the letter on the origin. translate < StdWidth/2, StdInnerRadius, StdInnerRadius > } // *** The capital letter U. ************************************************** #declare Letter_U_Width = 1.4; #declare Letter_U_Height = 2.4; #declare Letter_U_Depth = 0.4; #declare Letter_U = merge { // De staande, linker zijde. cylinder { y*1.8, y*0.3, 0.2 translate x*-0.5} sphere { <-0.5, 1.8, 0.0> StdInnerRadius } // De staande, rechter zijde. cylinder { y*1.8, y*0.3, 0.2 translate x*0.5} sphere { < 0.5, 1.8, 0.0> StdInnerRadius } // Het rondje onder. intersection { torus { 0.5, 0.2 rotate x*90 translate y*0.3} plane { y, 0.3 } } // Put the letter on the origin. translate <0.7, 0.4, 0.2> } // *** The capital letter V. ************************************************** #declare Letter_V_Width = 1.8; #declare Letter_V_Height = 2.4; #declare Letter_V_Depth = 0.4; #declare Letter_V = merge { // De staande, linker zijde. merge { cylinder { y*1.7, y*-0.05, 0.2 } sphere { < 0.0, 1.7, 0.0> StdInnerRadius } rotate z * 13 translate x*-0.305 } // De staande, rechter zijde. merge { cylinder { y*1.7, y*-0.05, 0.2} sphere { < 0.0, 1.7, 0.0> StdInnerRadius } rotate z *-13 translate x* 0.305 } // Het rondje onder. intersection { torus { 0.3, 0.2 rotate x*90 translate y*0.0} plane { y, 0.0 } } // Put the letter on the origin. translate <0.9, 0.5, 0.2> } // *** The capital letter W. ************************************************** #declare Letter_W_Width = Letter_M_Width; #declare Letter_W_Height = Letter_M_Height; #declare Letter_W_Depth = Letter_M_Depth; #declare Letter_W = object { // Use the M by rotating it 180 degrees around X. Letter_M // Put the letter on the origin. translate <0.0, -Letter_M_Height / 2, -Letter_M_Depth / 2> rotate x * 180 translate <0.0, +Letter_M_Height / 2, +Letter_M_Depth / 2> } // *** The capital letter X. ************************************************** #declare Letter_X_Width = 1.4; #declare Letter_X_Height = 2.4; #declare Letter_X_Depth = 0.4; #declare Letter_X = merge { // The '/' leg. merge { sphere { y*0.2, StdInnerRadius } cylinder { y*0.2, y*2.4, StdInnerRadius } sphere { y*2.4, StdInnerRadius } rotate -z*22.619865 translate -x*StdOuterRadius } // The '\' leg. merge { sphere { y*0.2, StdInnerRadius } cylinder { y*0.2, y*2.4, StdInnerRadius } sphere { y*2.4, StdInnerRadius } rotate +z*22.619865 translate +x*StdOuterRadius } // Put the letter on the origin. translate } // *** The capital letter Y. ************************************************** #declare Letter_Y_Width = 1.4; #declare Letter_Y_Height = 2.4; #declare Letter_Y_Depth = 0.4; #declare Letter_Y = merge { // De staande, linker zijde. merge { cylinder { y*0.7, y*-0.05, 0.2 } sphere { < 0.0, 0.7, 0.0> StdInnerRadius } rotate z * 13 translate x*-0.305 +y*1.0 } // De staande, rechter zijde. merge { cylinder { y*0.7, y*-0.05, 0.2} sphere { < 0.0, 0.7, 0.0> StdInnerRadius } rotate z *-13 translate x* 0.305 + y*1.0 } // De staande, linker zijde. //cylinder { y*0.9, y*-0.05, 0.2 rotate z * 15 translate x*-0.305+y*1.0} // De staande, rechter zijde. //cylinder { y*0.9, y*-0.05, 0.2 rotate z *-15 translate x* 0.305+y*1.0} // Het rondje onder. intersection { torus { 0.3, 0.2 rotate x*90 translate y*1.0} plane { y, 1.0 } } // De staande, middelste cylinder. cylinder { y*0.7, -y*0.3, StdInnerRadius } sphere { < 0.0, -0.3, 0.0> StdInnerRadius } // Put the letter on the origin. translate <0.7, 0.5, 0.2> } // *** The capital letter Z. ************************************************** #declare Letter_Z_Width = 1.4; #declare Letter_Z_Height = 2.4; #declare Letter_Z_Depth = 0.4; #declare Letter_Z = merge { // The horizontal upper leg. sphere { < 0.0, 2.0, 0.0> StdInnerRadius } cylinder { 0.0, x*1.0, StdInnerRadius translate y*2.0 } // The '/' leg. merge { sphere { y*0.0, StdInnerRadius } cylinder { y*0.0, y*2.236068, StdInnerRadius } sphere { y*2.236068, StdInnerRadius } rotate -z*26.565051 //translate -x*StdOuterRadius } // The horizontal lower leg. cylinder { x*0.0, x*1.0, StdInnerRadius } sphere { < 1.0, 0.0, 0.0> StdInnerRadius } // Put the letter on the origin. translate } // *** The dot. *************************************************************** #declare Sign_DOT_Width = 0.4; #declare Sign_DOT_Height = 0.4; #declare Sign_DOT_Depth = 0.4; #declare Sign_DOT = object { sphere { StdInnerRadius } } // *** The digit 1. *********************************************************** #declare Digit_1_Width = 0.4; #declare Digit_1_Height = 2.4; #declare Digit_1_Depth = 0.4; #declare Digit_1 = merge { // The standing right side. sphere { < 0.0, 2.0, 0.0> StdInnerRadius } cylinder { y*2.0, 0.0, StdInnerRadius} sphere { < 0.0, 0.0, 0.0> StdInnerRadius } // The small extention at the top left. merge { cylinder { 0.0, -y*0.5, StdInnerRadius } sphere { < 0.0, -0.5, 0.0> StdInnerRadius } rotate z*-45 translate y*2.0 } // Put the digit on the origin. translate } // *** The digit 2. *********************************************************** #declare Digit_2_Width = 1.4; #declare Digit_2_Height = 2.4; #declare Digit_2_Depth = 0.4; #declare Digit_2 = merge { #local lAngle = 53.2; // This is the angle between the slope and the // horizontal leg. Gotten by trial-and-error. // The round at the top with it's end-point. intersection { box { <0.0, 0.0, 0.21> <-1.0, -1.0, -0.21> inverse } box { <1.0, 0.0, 0.21> < 0.0, -1.0, -0.21> inverse rotate -z * ( 90 - lAngle ) } torus { 0.5, 0.2 rotate x*90} translate y*1.5 + x*0.5 } sphere { < 0.0, 1.5, 0.0>, StdInnerRadius } // The slope rotated from the origin with the connection point to the // horizontal leg. cylinder { x*0.0, x*1.56, StdInnerRadius rotate z*lAngle } sphere { < 0.0, 0.0, 0.0>, StdInnerRadius } // The horizontal lower leg. cylinder { x*0.0, x*1.0, StdInnerRadius } sphere { < 1.0, 0.0, 0.0>, StdInnerRadius } // Put the lower left front on the origin. translate } // *** The digit 3. *********************************************************** #declare Digit_3_Width = 1.4; #declare Digit_3_Height = 2.4; #declare Digit_3_Depth = 0.4; #declare Digit_3 = merge { // De bovenste bocht. intersection { box { < 0.0, 0.0, 0.21> < -1.0, -1.0, -0.21 > inverse} torus { StdOuterRadius, StdInnerRadius rotate x*90} translate y*1.5 + x*0.5 } sphere { < 0.0, 1.5, 0.0>, StdInnerRadius } // The connection in the middle. sphere { < 0.5, 1.0, 0.0>, StdInnerRadius } // De onderste bocht. intersection { box { < 0.0, 1.0, 0.21 > < -1.0, 0.0, -0.21 > inverse} torus { StdOuterRadius, StdInnerRadius rotate x*90} translate y*0.5 + x*0.5 } sphere { < 0.0, 0.5, 0.0>, StdInnerRadius } // Put the lower left front on the origin. translate } // *** The digit 4. *********************************************************** #declare Digit_4_Width = 1.4; #declare Digit_4_Height = 2.4; #declare Digit_4_Depth = 0.4; #declare Digit_4 = merge { // The upper left end point. sphere { < 0.0, 2.0, 0.0> StdInnerRadius } // The upper vertical side. cylinder { y*2.0, y*1.0, StdInnerRadius} // The middle left connection point. sphere { < 0.0, 1.0, 0.0> StdInnerRadius } // The middle horizontal leg. cylinder { x*0.0, x*1.0, StdInnerRadius translate y*1.0} // The standing left side. sphere { < 1.0, 2.0, 0.0> StdInnerRadius } cylinder { y*2.0, 0.0, StdInnerRadius translate x*1.0} sphere { < 1.0, 0.0, 0.0> StdInnerRadius } // Put the letter on the origin. translate < StdInnerRadius, StdInnerRadius, StdInnerRadius > } // *** The digit 5. *********************************************************** #declare Digit_5_Width = 1.4; #declare Digit_5_Height = 2.4; #declare Digit_5_Depth = 0.4; #declare Digit_5 = merge { // The upper left connection point. sphere { < 0.0, 2.0, 0.0> StdInnerRadius } // The upper vertical side. cylinder { y*2.0, y*1.0, StdInnerRadius} // The middle left connection point. sphere { < 0.0, 1.0, 0.0> StdInnerRadius } // The upper horizontal leg. cylinder { x*0.0, x*1.0, StdInnerRadius translate y*2.0} sphere { < 1.0, 2.0, 0.0> StdInnerRadius } // The middle horizontal leg. cylinder { x*0.0, x*0.5, StdInnerRadius translate y*1.0} // The lower bend. intersection { box { <0,2,1> <-2,0,-1> inverse} torus { 0.5, 0.2 rotate x*90} translate < 0.5, 0.5, 0.0 > } sphere { < 0.0, 0.5, 0.0>, StdInnerRadius } // Put the letter on the origin. translate < StdInnerRadius, StdInnerRadius, StdInnerRadius > } // *** The digit 6. *********************************************************** #declare Digit_6_Width = 1.4; #declare Digit_6_Height = 2.4; #declare Digit_6_Depth = 0.4; #declare Digit_6 = merge { // The standing left side. cylinder { y*StdOuterRadius*2, y*0.0, StdInnerRadius translate -x*StdOuterRadius} // The round at the bottom. torus { 0.5, 0.2 rotate x*90 } //translate y*StdOuterRadius*2} // The upper half round. intersection { plane { -y, 0.0 } torus { StdOuterRadius, StdInnerRadius rotate x*90} translate y*1.0 } sphere { < 0.5, 1.0, 0.0> StdInnerRadius } // Put the digit on the origin. translate } // *** The digit 7. *********************************************************** #declare Digit_7_Width = 1.4; #declare Digit_7_Height = 2.4; #declare Digit_7_Depth = 0.4; #declare Digit_7 = merge { // The horizontal upper leg. cylinder { x*0.0, x*1.0, StdInnerRadius translate y*2.0 } sphere { < 0.0, 2.0, 0.0> StdInnerRadius } // The '/' leg. merge { sphere { y*0.0, StdInnerRadius } cylinder { y*0.0, y*2.236068, StdInnerRadius } sphere { y*2.236068, StdInnerRadius } rotate -z*26.565051 //translate -x*StdOuterRadius } // Put the letter on the origin. translate } // *** The digit 8. *********************************************************** #declare Digit_8_Width = 1.4; #declare Digit_8_Height = 2.4; #declare Digit_8_Depth = 0.4; #declare Digit_8 = merge { // The upper round. torus { StdOuterRadius, StdInnerRadius rotate x*90 translate y*StdOuterRadius*2 } // The lower round. torus { StdOuterRadius, StdInnerRadius rotate x*90 } // Put the digit on the origin. translate } // *** The digit 9. *********************************************************** #declare Digit_9_Width = Digit_6_Width; #declare Digit_9_Height = Digit_6_Height; #declare Digit_9_Depth = Digit_6_Depth; #declare Digit_9 = object { // Use the 6 by rotating it 180 degrees around X. Digit_6 // Put the letter on the origin. translate <-Digit_9_Width / 2, -Digit_9_Height / 2, -Digit_9_Depth / 2> rotate z * 180 translate <+Digit_9_Width / 2, +Digit_9_Height / 2, +Digit_9_Depth / 2> } // *** The digit 0. *********************************************************** #declare Digit_0_Width = Letter_O_Width; #declare Digit_0_Height = Letter_O_Height; #declare Digit_0_Depth = Letter_O_Depth; #declare Digit_0 = object { Letter_O } // End of LettersTvR.inc