|
![](/i/fill.gif) |
On Tue, 27 Jul 1999 16:53:37 -0700, "Matt Swarm" <ide### [at] aol com> wrote:
>Can't seem to find much on working with text as graphic objects. The POV
>package has an example which, blissfully, uses True Type fonts.
>
>In addition to color and texture, I would like to bevel, round the face,
>illuminate from inside, wrap the line of text around a sphere or cylinder
>(inside or out) and the like.
If you don't mind the letters being straight, you can wrap them around a
sphere or cylinder using a macro (though you may find the "Object Bounds"
part of the superpatch exceedingly useful here).
Bevel text with the following macro:
//creates beveled text
#macro bevel_text (bevelFont, bevelText, bevel_depth, text_depth,nbr_of_objects)
union {
#local i = 0;
#while (i < 1)
//This is the bevel itself
text {
ttf bevelFont, bevelText, bevel_depth, <bevel_depth,0,0>
matrix < 1, 0, 0,
0, 1, 0,
cos(i*2*pi), sin(i*2*pi), 1,
0, 0, 0 >
}
//This is what is behind the bevel.
//Set text_depth to 0 if you only want the bevel.
#if (text_depth > 0)
text {
ttf bevelFont, bevelText, text_depth, <bevel_depth,0,0>
translate <cos(i*2*pi)*bevel_depth,
sin(i*2*pi)*bevel_depth,
bevel_depth>
}
#end
#declare i = i + 1/nbr_of_objects;
#end
}
#end
Don't ask me how it works, I didn't create it. I just converted it to work
as a macro :*)
Jerry
Post a reply to this message
|
![](/i/fill.gif) |