// A POV-Ray interpretation of the Lua logo. // by Philippe Lhoste http://jove.prohosting.com/~philho/ // v. 1.0 -- 2002/08/01 // Graphic design by A. Nakonechny. Copyright © 1998. All rights reserved. // Bugs of the scene: the blue is too bright, and if non hollow, the fill-ins are not pure white. #version 3.5; global_settings { assumed_gamma 1 } camera { location <0, 0, -3> look_at <0, 0, 0> right x*image_width/image_height // angle 50 } light_source { <0, 0, -10> color rgb <1, 1, 1> shadowless } background { color rgb <1, 1, 1> } // Change theses to alter the appearance of the logo #declare nonHollowLogo = false; #declare logoThickness = 0.01; // Change only for special effects... Official colors. #declare logoColor = rgb <0, 0, 123/255>; // Dark blue #declare orbitColor = rgb <0.5, 0.5, 0.5>; // Grey // This should not be changed: geometry of the logo #declare satelliteRadius = 0.015; #declare cutterNb = 36; #declare moonRadius = 1-sqrt(2)/2; #declare orbitRadius = 1 + moonRadius; #declare logoText = object { text { ttf "Arial.ttf" "Lua" logoThickness, 0 scale 0.9*(x + y) } }; #macro GetCenterOfText(txt) #local minTxt = min_extent(txt); #local maxTxt = max_extent(txt); (minTxt + (maxTxt - minTxt) / 2) #end union { difference { // Planet cylinder { 0, -logoThickness*y, 1 rotate -90*x } // Hole cylinder { logoThickness*y, -logoThickness*2*y, moonRadius rotate -90*x translate <1-2*moonRadius, 1-2*moonRadius, 0> } // Logo object { logoText scale z*3 translate <-GetCenterOfText(logoText).x, -0.5, -logoThickness> } } // Moon cylinder { 0, -logoThickness*y, moonRadius rotate -90*x translate <1, 1, 0> } pigment { color logoColor } } #declare baseCutterAngle = 360 / cutterNb; #declare cutterRadius = orbitRadius*2*pi / cutterNb / 4; // Orbit difference { torus { orbitRadius, satelliteRadius rotate -90*x } // Cut off around the moon cylinder { 0, satelliteRadius*3*y, moonRadius*1.2 rotate 90*x translate <1, 1, -satelliteRadius> } // Cut off to get dash effect #while (cutterNb > 0) sphere { 0, cutterRadius translate x*orbitRadius rotate z * cutterNb * baseCutterAngle #declare cutterNb = cutterNb - 1; } #end // I would prefer to center the orbit on the thickness of the logo, but when it gets // very thick, in frontal view, the apparent diameter of the orbit diminishes. // translate z*logoThickness/2 translate z*satelliteRadius pigment { color orbitColor } } #if (nonHollowLogo) // Hole cylinder { 0, logoThickness*y, moonRadius rotate -90*x translate <1-2*moonRadius, 1-2*moonRadius, 0> pigment { rgb <1, 1, 1> } } // Logo object { logoText translate <-GetCenterOfText(logoText).x, -0.5, 0> pigment { rgb <1, 1, 1> } } #end