POV-Ray : Newsgroups : povray.newusers : wrapping text around a cylinder Server Time
30 Jul 2024 20:28:13 EDT (-0400)
  wrapping text around a cylinder (Message 3 to 12 of 12)  
<<< Previous 2 Messages Goto Initial 10 Messages
From: Warp
Subject: Re: wrapping text around a cylinder
Date: 13 Jan 2004 19:25:42
Message: <40048c86@news.povray.org>
Tobias Mueller <pov### [at] emailtwaminfo> 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

From: Christopher James Huff
Subject: Re: wrapping text around a cylinder
Date: 13 Jan 2004 19:47:47
Message: <cjameshuff-B47CB2.19480413012004@netplex.aussie.org>
In article <40047fa1$1@news.povray.org>,
 "Hughes, B." <omn### [at] charternet> 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] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: <chr### [at] tagpovrayorg>
http://tag.povray.org/


Post a reply to this message

From: Warp
Subject: Re: wrapping text around a cylinder
Date: 13 Jan 2004 20:08:28
Message: <4004968c@news.povray.org>
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

From: ABX
Subject: Re: wrapping text around a cylinder
Date: 14 Jan 2004 02:21:34
Message: <57r900p66ioi29qvd0cr3ufgbrgktb7fc6@4ax.com>
On Tue, 13 Jan 2004 17:30:39 -0600, "Hughes, B." <omn### [at] charternet>
wrote:

> "Tobias Mueller" <pov### [at] emailtwaminfo> 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

From: Hughes, B 
Subject: Re: wrapping text around a cylinder
Date: 14 Jan 2004 05:59:53
Message: <40052129$1@news.povray.org>
"Christopher James Huff" <cja### [at] earthlinknet> wrote in message
news:cja### [at] netplexaussieorg...
> In article <40047fa1$1@news.povray.org>,
>  "Hughes, B." <omn### [at] charternet> 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

From: Hughes, B 
Subject: Re: wrapping text around a cylinder
Date: 14 Jan 2004 06:26:15
Message: <40052757$1@news.povray.org>
"ABX" <abx### [at] abxartpl> 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

From: Christopher James Huff
Subject: Re: wrapping text around a cylinder
Date: 14 Jan 2004 16:17:10
Message: <cjameshuff-07FE3E.16172714012004@netplex.aussie.org>
In article <40052129$1@news.povray.org>,
 "Hughes, B." <omn### [at] charternet> 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] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: <chr### [at] tagpovrayorg>
http://tag.povray.org/


Post a reply to this message

From: Hughes, B 
Subject: Re: wrapping text around a cylinder
Date: 14 Jan 2004 18:53:32
Message: <4005d67c@news.povray.org>
"Christopher James Huff" <cja### [at] earthlinknet> wrote in message
news:cja### [at] netplexaussieorg...
>
> > 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

From: Christopher James Huff
Subject: Re: wrapping text around a cylinder
Date: 15 Jan 2004 17:25:09
Message: <cjameshuff-E0CDE0.17252815012004@netplex.aussie.org>
In article <4005d67c@news.povray.org>,
 "Hughes, B." <omn### [at] charternet> 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] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: <chr### [at] tagpovrayorg>
http://tag.povray.org/


Post a reply to this message

From: Hughes, B 
Subject: Re: wrapping text around a cylinder
Date: 17 Jan 2004 08:21:39
Message: <400936e3$1@news.povray.org>
"Christopher James Huff" <cja### [at] earthlinknet> wrote in message
news:cja### [at] netplexaussieorg...
>
> 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

<<< Previous 2 Messages Goto Initial 10 Messages

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.