|
|
#local UseRadiosity = 0;
global_settings {
charset utf8
assumed_gamma 2.2
max_trace_level 20
#if (UseRadiosity)
radiosity {
count 300
error_bound .02
pretrace_start .08
pretrace_end .004
recursion_limit 1
normal on
} //radiosity
#end //#if
} //global_settings
#include "colors.inc"
camera {
location <0, 0, -1>
direction <0, 0, 4/3>
rotate -60 * x
look_at <0, 0, 0>
} //camera
#if (UseRadiosity)
#local Dome = object {
difference {
sphere {0, 20001}
sphere {0, 20000}
} //difference
texture {
pigment {
gradient z
color_map {
[0, 1 color White * 2.1 color White * .8]
} //color_map
} //pigment
finish {ambient 1 diffuse 0}
scale <1, 1, 20000>
} //texture
no_reflection
} //object
object {Dome}
#else
light_source {<15, -80, -200> color White * 1.6}
#end //#if
#local FontColor = texture {pigment {color rgb <.95, 1, .95> * .8}};
#macro Border (ObjectToBorder, Radius, DeltaTheta)
#declare BorderedObject = object {
union {
#local Theta = 0;
#while (Theta < 360)
object {ObjectToBorder translate <cos (radians (Theta)) * Radius,
sin (radians (Theta)) * Radius, 0>}
#local Theta = Theta + DeltaTheta;
#end //#while
} //union
} //object
#end //macro Border
#macro RoundEdges (ObjectToRound, BevelRadius, DeltaTheta, NLayers)
#declare RoundedObject = object {
union {
#local I = 1;
#while (I < NLayers)
#local PercentDone = I / (NLayers - 1);
#local CurrentAngle = PercentDone * 90;
#local CurrentBorderWidth = BevelRadius * cos (radians (90 +
CurrentAngle));
#local CurrentBorderDepth = BevelRadius * cos (radians (180 -
CurrentAngle));
Border (ObjectToRound, CurrentBorderWidth, DeltaTheta)
object {BorderedObject translate CurrentBorderDepth * z}
#local I = I + 1;
#end //#while
} //union
} //object
#declare RoundedObject = object {
union {
object {SquareFont translate -BevelRadius * z}
object {RoundedObject}
} //union
translate BevelRadius * z
} //object
#end //macro RoundEdges
#local TextDepth = .1;
#local BevelRadius = .03;
#local DeltaTheta = 5;
#local NLayers = 6;
#debug concat ("\nTotal objects: ", str (360 / DeltaTheta * (NLayers - 1) + 1,
0, 0), "\n\n")
#local SquareFont = object {text {ttf "Times.ttf" "X" TextDepth - BevelRadius,
0}}
RoundEdges (SquareFont, BevelRadius, DeltaTheta, NLayers)
object {RoundedObject translate -.35 * x texture {FontColor}}
plane {z, TextDepth + .05 inverse texture {pigment {color White}}}
Post a reply to this message
|
|