POV-Ray : Newsgroups : povray.newusers : wrapping text around a cylinder Server Time
5 Nov 2024 09:25:39 EST (-0500)
  wrapping text around a cylinder (Message 1 to 10 of 12)  
Goto Latest 10 Messages Next 2 Messages >>>
From: Tobias Mueller
Subject: wrapping text around a cylinder
Date: 13 Jan 2004 17:00:03
Message: <web.4004695ec32c12c2f725740c0@news.povray.org>
Hi,

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?

Regards
  Tobias


Post a reply to this message

From: Hughes, B 
Subject: Re: wrapping text around a cylinder
Date: 13 Jan 2004 18:30:41
Message: <40047fa1$1@news.povray.org>
"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. 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.
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.

Bob H.


Post a reply to this message

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

Goto Latest 10 Messages Next 2 Messages >>>

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