POV-Ray : Newsgroups : povray.newusers : Simple 2D text on a cylinder's surface Server Time
29 Jul 2024 02:33:04 EDT (-0400)
  Simple 2D text on a cylinder's surface (Message 4 to 13 of 23)  
<<< Previous 3 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: Marty Schrader
Subject: Re: Simple 2D text on a cylinder's surface
Date: 13 Oct 2007 16:00:55
Message: <471123f7$1@news.povray.org>
Thanks for getting back to me with a complete answer. The immediate things I 
notice are these:

POV has no mechanism for painting 2D text on to a surface. There are all kinza 
ways to paint patterns and pre-made images on to surfaces, but no way to lay 
down simple 2D text. This seems like a major flaw to me.

There is a very limited set of string manipulation and calculation functions 
available withing POV script. For instance, the book mentions strlen in talking 
about other string functions, but strlen itself isn't available. This would be 
very helpful in figuring out how to position text without a lot of trial and 
error. Heavy accent on the error.

The book references you gave me don't point to anything. My POV for Windows 
(3.6.1) help file goes up to 3.4.9, but you mention sections 3.4.11 and 12. The 
online help is even worse, since Chapter 3 is the reference in the help file, 
but it's about windows in the online docs.

How do I find more info?


Post a reply to this message

From: Warp
Subject: Re: Simple 2D text on a cylinder's surface
Date: 13 Oct 2007 16:16:52
Message: <471127b3@news.povray.org>
Marty Schrader <mar### [at] parsecsystemsinccom> wrote:
> POV has no mechanism for painting 2D text on to a surface. There are all kinza 
> ways to paint patterns and pre-made images on to surfaces, but no way to lay 
> down simple 2D text. This seems like a major flaw to me.

  Can you give us an example of some pattern which you can apply to a
surface in a way that you cannot apply a text pattern in the same way?

> There is a very limited set of string manipulation and calculation functions 
> available withing POV script. For instance, the book mentions strlen in talking 
> about other string functions, but strlen itself isn't available. This would be 
> very helpful in figuring out how to position text without a lot of trial and 
> error. Heavy accent on the error.

  Functions are classified by their return value type, not by the parameter
type. strlen() is in the float functions section because it returns a float.

-- 
                                                          - Warp


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: Simple 2D text on a cylinder's surface
Date: 13 Oct 2007 17:06:48
Message: <47113368$1@news.povray.org>
Marty Schrader wrote:
> The book references you gave me don't point to anything. My POV for
> Windows (3.6.1) help file goes up to 3.4.9, but you mention sections
> 3.4.11 and 12. The online help is even worse, since Chapter 3 is the
> reference in the help file, but it's about windows in the online docs.

The first number denotes a "book" not a "chapter". Since there are three
platform specific "books", but the online help cannot have three "books"
with the same number (yet it makes the most sense to have platform docs
first), the order is different, the actual chapter numbers are identical though.

	Thorsten, POV-Team


Post a reply to this message

From: M a r c
Subject: Re: Simple 2D text on a cylinder's surface
Date: 13 Oct 2007 19:30:40
Message: <47115520$1@news.povray.org>

47113368$1@news.povray.org...
> Marty Schrader wrote:
>> The book references you gave me don't point to anything. My POV for
>> Windows (3.6.1) help file goes up to 3.4.9, but you mention sections
>> 3.4.11 and 12. The online help is even worse, since Chapter 3 is the
>> reference in the help file, but it's about windows in the online docs.
>
> The first number denotes a "book" not a "chapter". Since there are three
> platform specific "books", but the online help cannot have three "books"
> with the same number (yet it makes the most sense to have platform docs
> first), the order is different, the actual chapter numbers are identical 
> though.
>
> Thorsten, POV-Team

I wonder how many dried frog pills were swallowed to keep that cool ;-)

Marc


Post a reply to this message

From: Marty Schrader
Subject: Re: Simple 2D text on a cylinder's surface
Date: 13 Oct 2007 19:52:15
Message: <47115a2f$1@news.povray.org>
Thanks for the heads up on strlen().

A "text pattern"? Okay, see, this is the part that kills me. What I wish to do 
is paint some simple, flat, non-complex text on to the surface of some object. 
This would seem to be a fairly common operation and one which would seem to call 
for its own painting mechanism. I see quite a few requests for help on this 
subject here on this group and in some of the other POV groups.

What you are telling me is that I need to create a complex 3D object and 
manipulate it all over the place in order to paint 2D text. I gotta take a 3D 
object and slice it off with an implied intersection to make a 2D pattern, which 
I can then use to...Oy!

Not only that, but my experiments so far indicate that the positioning of the 
text on the cylinder's surface will be a matter of much hassle and fudging. 
Apparently there is no other way. Perhaps it would be smarter to create text as 
an external graphic and lay that down with one of the other methods.

By the way, strlen() returns a float? I have only been doing this C stuff for 25 
years or so, but a float?!? And in the last 32 years I can't recall coming 
across any language spec where the builtins were index by their return type as 
opposed to the operational group to which they belonged. String length is 
related to strings. And the length should be a character count instead of some 
graphic index, eh? Perhaps a different name, like <float> StringGraphicLength() 
or something.

Thanks for all the help, guys. I think I am at an impasse here. Gonna hafta use 
a JPEG image for my text. Easier.


Post a reply to this message

From: Marty Schrader
Subject: Re: Simple 2D text on a cylinder's surface
Date: 13 Oct 2007 19:56:07
Message: <47115b17$1@news.povray.org>
Heh, heh. It's amazing that somebody can apologize for how screwed up something 
is and still make it sound as if it's your fault for not reading the FAQ or 
whatever. Hey, I'm not gonna whine too loudly. As long as I can find the data 
I'm golden.


Post a reply to this message

From: Tim Attwood
Subject: Re: Simple 2D text on a cylinder's surface
Date: 13 Oct 2007 21:17:47
Message: <47116e3b$1@news.povray.org>
> What you are telling me is that I need to create a complex 3D object and 
> manipulate it all over the place in order to paint 2D text. I gotta take a 
> 3D object and slice it off with an implied intersection to make a 2D 
> pattern, which I can then use to...Oy!

The typical method that I use for this sort of thing is to use image_maps.
It seems perty straight-forward to me, I wouldn't say that lack of a text
pattern makes much difference, either way you'll end up having to scale
the resulting words pigment to look right.

The text object, and the object pattern are handy in some cases,
but they are not replacements for layered textures.


Post a reply to this message

From: Samuel Benge
Subject: Re: Simple 2D text on a cylinder's surface
Date: 13 Oct 2007 21:25:25
Message: <47117005@news.povray.org>
Marty Schrader wrote:
> Heh, heh. It's amazing that somebody can apologize for how screwed up 
> something is and still make it sound as if it's your fault for not 
> reading the FAQ or whatever. Hey, I'm not gonna whine too loudly. As 
> long as I can find the data I'm golden.

Those of us who know how to manipulate POV into something useful have 
been working with it for a long time. We are insanely dedicated to 
learning something we love doing.

If you want easy answers, you must look into your own mind. Since I've 
been using POV for quite a while now, those 'easy' answers are there for 
quick retrieval, in my own mind.

If you want a simpler way to do things, spend some cash on a program 
which makes it *really* easy.

Sam


Post a reply to this message

From: Sherry Shaw
Subject: Re: Simple 2D text on a cylinder's surface
Date: 13 Oct 2007 23:18:53
Message: <47118a9d@news.povray.org>
Marty Schrader wrote:

> For instance, the book mentions 
> strlen in talking about other string functions, but strlen itself isn't 
> available.

You're reading the Help file, right?  Click the "Index" tab.  Type 
"strlen" in the box.  Son of a gun, there it is.

> This would be very helpful in figuring out how to position 
> text without a lot of trial and error.

Actually, unless you're using a fixed-width font, you probably want 
min_extent and max_extent for that.

> Heavy accent on the error.

Practice makes perfect.

--Sherry Shaw


-- 
#macro T(E,N)sphere{x,.4rotate z*E*60translate y*N pigment{wrinkles scale
.3}finish{ambient 1}}#end#local I=0;#while(I<5)T(I,1)T(1-I,-1)#local I=I+
1;#end camera{location-5*z}plane{z,37 pigment{granite color_map{[.7rgb 0]
[1rgb 1]}}finish{ambient 2}}//                                   TenMoons


Post a reply to this message

From: Warp
Subject: Re: Simple 2D text on a cylinder's surface
Date: 14 Oct 2007 04:33:34
Message: <4711d45e@news.povray.org>
Marty Schrader <mar### [at] parsecsystemsinccom> wrote:
> What you are telling me is that I need to create a complex 3D object and 
> manipulate it all over the place in order to paint 2D text. I gotta take a 3D 
> object and slice it off with an implied intersection to make a 2D pattern, which 
> I can then use to...Oy!

  No. I already gave you the solution in my other post (using the object
pattern). Perhaps you didn't read it? It's here:

http://tag.povray.org/povQandT/languageQandT.html#cylindricalrepeat

> By the way, strlen() returns a float? I have only been doing this C stuff for 25 
> years or so, but a float?!?

  POV-Ray doesn't have integers. All numerical values are floats. Hence
strlen() returns a float (even though the value of this float will always
be an integer).

> And in the last 32 years I can't recall coming 
> across any language spec where the builtins were index by their return type as 
> opposed to the operational group to which they belonged.

  Well, the POV-Ray documentation classifies the functions by their
return value type. It's a simple way of classifying them.

> And the length should be a character count instead of some 
> graphic index, eh?

  strlen() returns the character count.

-- 
                                                          - Warp


Post a reply to this message

<<< Previous 3 Messages Goto Latest 10 Messages Next 10 Messages >>>

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