|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
I am tempted to call this a bug, but since the scene is simplistic, it is
perhaps that I am not aware of some default setting with side effect... Or I
just make illegal code :-)
I am trying to do a logo. The following code is an isolation of the problem:
-------8<------------------------------------
#version 3.5;
global_settings
{
ambient_light 1.5
assumed_gamma 0.6
}
background { color 1 }
camera
{
location <0, 0, -3>
look_at <0, 0, 0>
right x*image_width/image_height
}
#declare logoThickness = 0.01;
#declare logoColor = rgb <0, 0, 0.5>;
#declare logoText =
text { ttf "Arial.ttf" "OYO" logoThickness*3, 0 };
#macro CenterText(txt)
#local minTxt = min_extent(txt);
#local maxTxt = max_extent(txt);
translate -(minTxt + (maxTxt - minTxt) / 2)
#end
#macro CenterText(txt)
#local minTxt = min_extent(txt);
#local maxTxt = max_extent(txt);
(minTxt + (maxTxt - minTxt) / 2)
#end
difference
{
// Planet
cylinder
{
0, -logoThickness*y, 1
rotate 90*x
}
object
{
logoText
// CenterText(logoText)
translate <-CenterText(logoText).x, -0.5, -logoThickness>
}
pigment { color logoColor }
}
------------------------------------8<-------
In the given code state, the upper half of the first O is disappears, as if
the letter is cut in half by a bottom-left to top-right diagonal.
If you uncomment the CenterText line and comment the next one, the text is
OK.
Of course, I can use the second solution with an additional translation, but
I submit this code for an explaination of the phenomenon.
Comments?
-- #=--=#=--=#=--=#=--=#=--=#=--=#=--=#=--=# --
Philippe Lhoste (Paris -- France)
Professional programmer and amateur artist
http://jove.prohosting.com/~philho/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Send to fast :-(
> -------8<------------------------------------
> #macro CenterText(txt)
> #local minTxt = min_extent(txt);
> #local maxTxt = max_extent(txt);
> translate -(minTxt + (maxTxt - minTxt) / 2)
> #end
>
> #macro CenterText(txt)
Make it:
#macro GetCenterOfText(txt)
> #local minTxt = min_extent(txt);
> #local maxTxt = max_extent(txt);
> (minTxt + (maxTxt - minTxt) / 2)
> #end
>
> difference
> {
> // Planet
> cylinder
> {
> 0, -logoThickness*y, 1
> rotate 90*x
> }
> object
> {
> logoText
> // CenterText(logoText)
> translate <-CenterText(logoText).x, -0.5, -logoThickness>
Make it:
translate <-GetCenterOfText(logoText).x, -0.5, -logoThickness>
> }
> pigment { color logoColor }
> }
> ------------------------------------8<-------
Sorry.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
What you have here is a coincident surface problem
Change:
translate <-CenterText(logoText).x, -0.5, -logoThickness>
to
translate <-CenterText(logoText).x, -0.5, -logoThickness*2>
-tgq
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"TinCanMan" <Tin### [at] hotmailcom> wrote:
> What you have here is a coincident surface problem
>
> Change:
> translate <-CenterText(logoText).x, -0.5, -logoThickness>
> to
> translate <-CenterText(logoText).x, -0.5, -logoThickness*2>
Thank you very much. I though I took care of these, and that they always
resulted in "dust" artifcacts...
Obviously, I still have to make some progress in visualizing mentally
rotations and translations...
Mmm, actually, I should have done a rotate -90*x to get the effect I wanted
(the face of the cylinder on the y-x plane). Thank you for giving me the
hint about coincident surface!
Regards.
-- #=--=#=--=#=--=#=--=#=--=#=--=#=--=#=--=# --
Philippe Lhoste (Paris -- France)
Professional programmer and amateur artist
http://jove.prohosting.com/~philho/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On Fri, 2 Aug 2002 17:27:24 +0200, "Philippe Lhoste" <Phi### [at] GMXnet> wrote:
> Of course, I can use the second solution with an additional translation, but
> I submit this code for an explaination of the phenomenon.
> Comments?
Yes. If possible use macros from standard include files. There is too much
identifiers to remember? Check http://www.abx.art.pl/pov/bonus :-)
ABX
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|