 |
 |
|
 |
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Tobias Mueller <pov### [at] email twam info> wrote:
> I've got simple cylinder like and want to wrap a text around it. Is there
> any modifier to do this with the text object?
An alternative solution to the one presented which can be done when you
want the text imprinted on the surface of the cylinder (instead of using
3D letters as the text object generates) is to make an object pattern
with the text object and apply a cylindrical warp to it. This way you
can use it as a pattern for a pigment of the cylinder.
--
#macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb M()}}
N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}// - Warp -
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
In article <40047fa1$1@news.povray.org>,
"Hughes, B." <omn### [at] charter net> wrote:
> A macro already exists in the 3.5 includes for doing something almost like
> that. I've modified Ron Parker's script to place text onto a cylinder
> surface, a very minor change of adding a 10th parameter called L (for Label)
> which just rotates the font character in a direction to lay the correct way.
It rotates it by a given angle around the tangent to the circle? Or it's
a boolean flag to rotate by 90 degrees? The former would be a lot more
useful, and little or no extra work.
> I'll post it to p.t.s-f. group, since explaining how to make the change and
> use it might not be completely understandable if I don't show all the pov
> script itself, and maybe other people will find it useful too. Look for
> subject line "modified circle text macro". And hopefully I won't be stepping
> on any toes by posting an already included macro, albeit changed slightly.
Of course not...improvements are always a good thing. It'd be a good
idea to change the name slightly, though.
--
Christopher James Huff <cja### [at] earthlink net>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: <chr### [at] tag povray org>
http://tag.povray.org/
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Here is an example:
camera { location <-1.5,4.5,-10> look_at 0 angle 35 }
light_source { <10, 40, -50>, 1 }
plane { y, -2 pigment { checker rgb 1, rgb .5 } }
cylinder
{ -y*2, y*2, 2
pigment
{ object
{ text { ttf "timrom.ttf", "POV-Ray", 2.1, 0 scale <.1,2,1> }
pigment { rgb <1,.9,.8> }
pigment { rgb <.8,.4,.1> }
}
warp { cylindrical }
rotate y*160
}
finish { specular 1 }
}
--
#macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb M()}}
N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}// - Warp -
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On Tue, 13 Jan 2004 17:30:39 -0600, "Hughes, B." <omn### [at] charter net>
wrote:
> "Tobias Mueller" <pov### [at] email twam info> wrote in message
> news:web.4004695ec32c12c2f725740c0@news.povray.org...
> >
> > I've got simple cylinder like and want to wrap a text around it. Is there
> > any modifier to do this with the text object?
>
> A macro already exists in the 3.5 includes for doing something almost like
> that.
Note, macro included in POV-Ray distribution does kerning wrongly. See my
addition: http://news.povray.org/247p7u4r22rvpnn2pdfbv0snph8fevv5j3%404ax.com
and follow links included there.
ABX
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"Christopher James Huff" <cja### [at] earthlink net> wrote in message
news:cja### [at] netplex aussie org...
> In article <40047fa1$1@news.povray.org>,
> "Hughes, B." <omn### [at] charter net> wrote:
>
> > A macro already exists in the 3.5 includes for doing something almost
like
> > that. I've modified Ron Parker's script to place text onto a cylinder
> > surface, a very minor change of adding a 10th parameter called L (for
Label)
> > which just rotates the font character in a direction to lay the correct
way.
>
> It rotates it by a given angle around the tangent to the circle? Or it's
> a boolean flag to rotate by 90 degrees? The former would be a lot more
> useful, and little or no extra work.
Both, actually. :-)
It starts out rotated on the x axis by 90 degrees (-90 when inverted form,
for inside surface perspectives) if specifying +1. The range from -1 to +1
would turn it from -90 to +90 degrees, to allow for applying it to a cone
for example, and zero is same as original circle text would be without this.
I went with my idea of simplicity while lacking in usability, so it could
certainly be done a better way than that. Which is a very good idea you
mention to do it with user-specified degree angles (0 still being no change
from original macro).
Changing the macro name hadn't occured to me since it does what the original
did, still circling, so seems to fit.
Bob H.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"ABX" <abx### [at] abx art pl> wrote in message
news:57r900p66ioi29qvd0cr3ufgbrgktb7fc6@4ax.com...
>
> Note, macro included in POV-Ray distribution does kerning wrongly. See my
> addition:
http://news.povray.org/247p7u4r22rvpnn2pdfbv0snph8fevv5j3%404ax.com
> and follow links included there.
I couldn't get the font used, and for some reason the PNG image is missing
too.
That uses max_extent to keep the characters spaced properly? That's the
idea? Looked like a good plan.
No one responded to your message at the time, and I can't remember much of
this sort of thing except for many various discussions about font behaviors
in general. Any chance something changed in 3.5 which fixed kerning issues?
Because I know I have a test scene which had problems with missing pieces of
text (someone had posted about) early on and now renders okay.
I'm trying your kerning macro with arial.ttf and I am not seeing a marked
difference between using it and not using it. So I'm guessing it matters
more for misbehaved fonts?
Bob H.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
In article <40052129$1@news.povray.org>,
"Hughes, B." <omn### [at] charter net> wrote:
> Changing the macro name hadn't occured to me since it does what the original
> did, still circling, so seems to fit.
Right, but it has an extra parameter, right? Scenes using the old
version won't work with it. Calling it Circle_Text2() would avoid that.
--
Christopher James Huff <cja### [at] earthlink net>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: <chr### [at] tag povray org>
http://tag.povray.org/
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"Christopher James Huff" <cja### [at] earthlink net> wrote in message
news:cja### [at] netplex aussie org...
>
> > Changing the macro name hadn't occured to me since it does what the
original
> > did, still circling, so seems to fit.
>
> Right, but it has an extra parameter, right? Scenes using the old
> version won't work with it. Calling it Circle_Text2() would avoid that.
Oops! Right you are. Hadn't thought of that, and just this minute I reposted
it with fixes I found while checking it out more thoroughly. Text wasn't
aligning to a cylinder surface which would be the same as the radius
parameter. With any luck it's corrected now. Except it doesn't have anything
included which ABX or Warp suggested. ;-)
Hmm, the more I think about it... the name Label_Text might make the most
sense. Even the original macro makes what could be used as decals, as kind
of label too. I'll go back to p.t.s-f. and suggest that.
Bob H.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
In article <4005d67c@news.povray.org>,
"Hughes, B." <omn### [at] charter net> wrote:
> Hmm, the more I think about it... the name Label_Text might make the most
> sense. Even the original macro makes what could be used as decals, as kind
> of label too. I'll go back to p.t.s-f. and suggest that.
Just because you use it for labels doesn't mean everyone will. Name it
for what it does...it puts text in a circle. Label_Text() is both overly
specific (the macro can be used for things other than labels) and overly
vague. (What kind of label?) The original Circle_Text() could also be
used for labels, as could an ordinary text object. It is another version
of the Circle_Text() macro with some added functionality, so it should
be named as such.
--
Christopher James Huff <cja### [at] earthlink net>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: <chr### [at] tag povray org>
http://tag.povray.org/
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"Christopher James Huff" <cja### [at] earthlink net> wrote in message
news:cja### [at] netplex aussie org...
>
> Just because you use it for labels doesn't mean everyone will. Name it
> for what it does...it puts text in a circle. Label_Text() is both overly
> specific (the macro can be used for things other than labels)
I agree with you. I had been thinking of the plural name Circles_Text, then
that was out since it only does one per. Brings it back to Circle_Text2,
like you suggested.
Anyway... I'm not much on naming things, I guess. Esp. when it's just a
change to a current macro, meaning it is the same thing with only a bit of a
difference. It would have been better if it were a whole new one by itself.
Except it fits in with what the Circle_Text does already.
Bob H.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|
 |