POV-Ray : Newsgroups : povray.newusers : text on a cylinder Server Time
12 Oct 2026 02:44:42 EDT (-0400)
  text on a cylinder (Message 1 to 20 of 20)  
From: J Tellings
Subject: text on a cylinder
Date: 3 Nov 2002 06:38:49
Message: <3dc50ac9@news.povray.org>
Hello,

I want to make a text on a cylinder. Does anyone know a script to do this?

Thanks a lot!


Post a reply to this message

From: Warp
Subject: Re: text on a cylinder
Date: 3 Nov 2002 10:56:23
Message: <3dc54726@news.povray.org>
J Tellings <j_t### [at] hotmailcom> wrote:
> I want to make a text on a cylinder. Does anyone know a script to do this?

  Read the documentation about the object pattern and cylindrical warp.
That should get you started.

-- 
#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: J Tellings
Subject: Re: text on a cylinder
Date: 3 Nov 2002 12:54:39
Message: <3dc562df$1@news.povray.org>
"Warp" <war### [at] tagpovrayorg> wrote in message
news:3dc54726@news.povray.org...
> J Tellings <j_t### [at] hotmailcom> wrote:
> > I want to make a text on a cylinder. Does anyone know a script to do
this?
>
>   Read the documentation about the object pattern and cylindrical warp.
> That should get you started.
>
> --
> #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 -

I'm very sorry but your macro doesn't work. I want to make a text-object
(3D-text) on a cylinder.

Thanks!!


Post a reply to this message

From:
Subject: Re: text on a cylinder
Date: 3 Nov 2002 13:19:26
Message: <3dc568ae$1@news.povray.org>
J Tellings schrieb:
> Hello,
>
> I want to make a text on a cylinder. Does anyone know a script to do
> this?

I have no script. But i did this as follows:

1. create your cylinder
2. create a second cylinder with r=r1+0.0001
3. create your text on the right position
4. put your text and the cylinder from 2. together
   with intersection{}



--
Matthias Weißer
http://www.matwei.de


Post a reply to this message

From: J Tellings
Subject: Re: text on a cylinder
Date: 3 Nov 2002 14:46:23
Message: <3dc57d0f@news.povray.org>
"Matthias Weißer" <DTM### [at] gmxde> wrote in message
news:3dc568ae$1@news.povray.org...
> J Tellings schrieb:
> > Hello,
> >
> > I want to make a text on a cylinder. Does anyone know a script to do
> > this?
>
> I have no script. But i did this as follows:
>
> 1. create your cylinder
> 2. create a second cylinder with r=r1+0.0001
> 3. create your text on the right position
> 4. put your text and the cylinder from 2. together
>    with intersection{}
>
>
>
> --
> Matthias Weißer
> http://www.matwei.de
>
Thanks, this is a good and easy solution.


Post a reply to this message

From: J Tellings
Subject: Re: text on a cylinder
Date: 3 Nov 2002 14:46:55
Message: <3dc57d2f@news.povray.org>
"Warp" <war### [at] tagpovrayorg> wrote in message
news:3dc54726@news.povray.org...
> J Tellings <j_t### [at] hotmailcom> wrote:
> > I want to make a text on a cylinder. Does anyone know a script to do
this?
>
>   Read the documentation about the object pattern and cylindrical warp.
> That should get you started.
>
> --
> #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 -

Thanks, but ive already got the solution from anyone else.


Post a reply to this message

From: Warp
Subject: Re: text on a cylinder
Date: 3 Nov 2002 17:05:19
Message: <3dc59d9f@news.povray.org>
J Tellings <j_t### [at] hotmailcom> wrote:
>>   Read the documentation about the object pattern and cylindrical warp.
>> That should get you started.

> I'm very sorry but your macro doesn't work. I want to make a text-object
> (3D-text) on a cylinder.

  Uh? Which macro?

-- 
#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: Warp
Subject: Re: text on a cylinder
Date: 3 Nov 2002 17:05:55
Message: <3dc59dc3@news.povray.org>
"Matthias Weißer" <DTM### [at] gmxde> wrote:
> 1. create your cylinder
> 2. create a second cylinder with r=r1+0.0001
> 3. create your text on the right position
> 4. put your text and the cylinder from 2. together
>    with intersection{}

  This will not bend the text, so it will not work.

-- 
#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: Warp
Subject: Re: text on a cylinder
Date: 3 Nov 2002 17:06:58
Message: <3dc59e01@news.povray.org>
J Tellings <j_t### [at] hotmailcom> wrote:
> Thanks, but ive already got the solution from anyone else.

  Just believe me: What you want is to make an object pattern with the
text object and then apply a cylindrical warp to it.
  The other solution will not bend the text. This will.

-- 
#macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
[1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
-1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp -


Post a reply to this message

From: Roz
Subject: Re: text on a cylinder
Date: 3 Nov 2002 17:52:33
Message: <3DC5A8CE.6060703@netscape.net>
Warp wrote:
> J Tellings <j_t### [at] hotmailcom> wrote:
> 
>>>  Read the documentation about the object pattern and cylindrical warp.
>>>That should get you started.
>>
> 
>>I'm very sorry but your macro doesn't work. I want to make a text-object
>>(3D-text) on a cylinder.
> 
> 
>   Uh? Which macro?
> 

I suspect J Tellings thought your signature was the solution to his/her
problem. Some newsreaders probably don't make the signature stand out
as something separate from the body of the message. I'm only guessing
though.

-Roz


Post a reply to this message

From: Christopher James Huff
Subject: Re: text on a cylinder
Date: 3 Nov 2002 23:04:09
Message: <chrishuff-BE233B.22565603112002@netplex.aussie.org>
In article <3dc568ae$1@news.povray.org>,
 "Matthias Weißer" <DTM### [at] gmxde> wrote:

> 1. create your cylinder
> 2. create a second cylinder with r=r1+0.0001
> 3. create your text on the right position
> 4. put your text and the cylinder from 2. together
>    with intersection{}

This is actually a very clumsy, limited, and unnecessarily slow way of 
doing it. Just use the object pattern.

-- 
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: Christopher James Huff
Subject: Re: text on a cylinder
Date: 3 Nov 2002 23:05:20
Message: <chrishuff-F89524.22580703112002@netplex.aussie.org>
In article <3dc57d2f@news.povray.org>,
 "J Tellings" <j_t### [at] hotmailcom> wrote:

> Thanks, but ive already got the solution from anyone else.

That "solution" was about as close to the "wrong way" to do it as you 
can get. Use the object pattern, it was designed for this.

-- 
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: J Tellings
Subject: Re: text on a cylinder
Date: 4 Nov 2002 10:14:50
Message: <3dc68eea$1@news.povray.org>
"Christopher James Huff" <chr### [at] maccom> wrote in message
news:chr### [at] netplexaussieorg...
> In article <3dc57d2f@news.povray.org>,
>  "J Tellings" <j_t### [at] hotmailcom> wrote:
>
> > Thanks, but ive already got the solution from anyone else.
>
> That "solution" was about as close to the "wrong way" to do it as you
> can get. Use the object pattern, it was designed for this.
I can get flat text on a cylinder with object pattern, but I can't do it
with 3D-text. I am a beginner, and this is my first image, so can anyone
give more info please.
THanks!

> --
> 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: Tom Melly
Subject: Re: text on a cylinder
Date: 4 Nov 2002 11:12:27
Message: <3dc69c6b$1@news.povray.org>
"J Tellings" <j_t### [at] hotmailcom> wrote in message
news:3dc68eea$1@news.povray.org...
>
> I can get flat text on a cylinder with object pattern, but I can't do it
> with 3D-text. I am a beginner, and this is my first image, so can anyone
> give more info please.
> THanks!

You could try something like:

#version 3.5;

#include "colors.inc"

global_settings {
  assumed_gamma 1.0
}

// ----------------------------------------

camera {
  location  <0.0, 0.5, -4.0>
  look_at   <0.0, 0.0,  0.0>
}


light_source {
  <0, 0, 0>            // light's position (translated below)
  color rgb <1, 1, 1>  // light's color
  translate <-30, 30, -30>
}

// ----------------------------------------
#macro RotText(Letter, RotY)
  text {
    ttf
    "arial.ttf",
    Letter,
    2,
    0
    pigment{Yellow}
    scale 0.25
    translate z*-1.1
    rotate y*RotY
  }
#end

cylinder { <0, -1, 0>, <0, 1, 0>, 1 pigment{Red}}

intersection{
  union{
    RotText("A",40)
    RotText("B",30)
    RotText("C",20)
    RotText("D",10)
    RotText("E",0)
    RotText("F",-10)
    RotText("G",-20)
    RotText("H",-30)
    RotText("I",-40)
  }
  cylinder{<0,-1,0>,<0,1,0>,1.05}
  pigment{Yellow}
}

The intersection is to give the front of the letters a curve to match the
cylinder. The main drawback of this approach is that the letters themselves
aren't curved. You would only really notice this problem if you were using
relatively large letters.

BTW - keep checking back, I'm sure this method is pretty crappy, but there's
nothing like someone posting a crap way of doing something to provoke some
decent suggestions ;)

Apart from anything else, the macro could be better, in that it should allow you
to input a whole string, rather than having to call it one time for each letter,
but at least this version is easily comprehensible (I hope).


Post a reply to this message

From: Johannes Dahlstrom
Subject: Re: text on a cylinder
Date: 4 Nov 2002 12:02:16
Message: <3dc6a818@news.povray.org>
Tom Melly wrote:

> Apart from anything else, the macro could be better, in that it should
> allow you to input a whole string, rather than having to call it one time
> for each letter, but at least this version is easily comprehensible (I
> hope).

Hmm, using the min_extent and max_extent functions and a little 
trigonometry it should be possible to handle even variable-width fonts 
automatically... Heh, I just noticed that it is actually already done and 
is part of the POV 3.5 standard library - the Circle_Text macro in 
shapes.inc. Only problem is that it rotates around the wrong axis, z 
instead of y, but it should be possible to modify it relatively easily.


Post a reply to this message

From: Christopher James Huff
Subject: Re: text on a cylinder
Date: 4 Nov 2002 14:13:53
Message: <chrishuff-8B6F7E.14052904112002@netplex.aussie.org>
In article <3dc68eea$1@news.povray.org>,
 "J Tellings" <j_t### [at] hotmailcom> wrote:

> I can get flat text on a cylinder with object pattern, but I can't do it
> with 3D-text. I am a beginner, and this is my first image, so can anyone
> give more info please.

Ah, you want a circular text object...well, shapes.inc includes a 
Circle_Text() macro, but it makes a circle in the plane of the text. It 
shouldn't be hard to modify to wrap text in this way, though.
The text object is pretty limited though, you might want to just make 
your own text from CSG or use a third party mesh editor.

-- 
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: text on a cylinder
Date: 4 Nov 2002 15:05:55
Message: <3dc6d323@news.povray.org>
J Tellings <j_t### [at] hotmailcom> wrote:
> I can get flat text on a cylinder with object pattern, but I can't do it
> with 3D-text.

  Oh, I thought you just wanted to apply text to a cylinder (like if it
was an image map). I didn't understand that you really wanted 3D letters.

  In that case the only(?) way would be to rotate and translate individual
letters. This can be pretty much automatized, as can be seen in the
already-mentioned Circle_Text() macro. Looking at how this macro is
done should help you.

-- 
#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: Marc-Hendrik Bremer
Subject: Re: text on a cylinder
Date: 6 Nov 2002 11:24:13
Message: <3dc9422d@news.povray.org>
"Warp" <war### [at] tagpovrayorg> schrieb im Newsbeitrag
news:3dc6d323@news.povray.org...

>   In that case the only(?) way would be to rotate and translate individual
> letters.

As there are letters in the  IsoCSG Library, it would be possible to bend
the full text, including the letters, not just rotate and translate them.
That would be the "right way", but it is of course overkill to use
isosurfaces for the average 3D text on a cylinder.

Just an answer to the (?) :-).

Regards,

Marc-Hendrik


Post a reply to this message

From: Warp
Subject: Re: text on a cylinder
Date: 7 Nov 2002 10:09:00
Message: <3dca820c@news.povray.org>
Marc-Hendrik Bremer <Mar### [at] t-onlinede> wrote:
> As there are letters in the  IsoCSG Library, it would be possible to bend
> the full text, including the letters, not just rotate and translate them.
> That would be the "right way", but it is of course overkill to use
> isosurfaces for the average 3D text on a cylinder.

  Calculating the intersection of the (already rotated+translated) letters
and a cylinder will give a cylindrical surface to them, which should work
rather well inside a specific range (meaning that the angle between adjacent
letter should not be too high, or else the will be some kind of ugly
distortion, as this is not true bending, but just "carving" the outer
part of the letter to be round).

  Btw, is it more efficient to calculate the intersection of a cylinder
and the union of the letters, or making a union with the intersections of
individual letters with (identical) cylinders?

-- 
#macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
[1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
-1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp -


Post a reply to this message

From: Peter Popov
Subject: Re: text on a cylinder
Date: 8 Nov 2002 05:41:49
Message: <355nsusbnau05mvq1hgttdgvs01nj0a51d@4ax.com>
On 7 Nov 2002 10:09:00 -0500, Warp <war### [at] tagpovrayorg> wrote:

>  Btw, is it more efficient to calculate the intersection of a cylinder
>and the union of the letters, or making a union with the intersections of
>individual letters with (identical) cylinders?

The latter proves to be faster in 99% of the cases, since the
resulting bounding boxes are smaller. , The text object is in its own
right quite slow in CSG, so using single letters reduces the strain a
lot.


Peter Popov ICQ : 15002700
Personal e-mail : pet### [at] vipbg
TAG      e-mail : pet### [at] tagpovrayorg


Post a reply to this message

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