POV-Ray : Newsgroups : povray.newusers : text problem Server Time
26 Nov 2024 19:47:14 EST (-0500)
  text problem (Message 1 to 4 of 4)  
From: M Godfrey
Subject: text problem
Date: 24 Nov 2003 02:15:01
Message: <3fc1aff5$1@news.povray.org>
anyone know how to rotate text using the
 text{ ttf "fontname.ttf" 1,0
rotate <??,??,??> or rotate x*?? }

making it rotate the letters and not rotating it around in a cirlce around
the screen?

i want my text to stay in the same spot just rotate around so i can see the
text.

thanx,
mike


Post a reply to this message

From: Warp
Subject: Re: text problem
Date: 24 Nov 2003 08:34:49
Message: <3fc208f9@news.povray.org>
M Godfrey <mgo### [at] netscapenet> wrote:
> anyone know how to rotate text using the
>  text{ ttf "fontname.ttf" 1,0
> rotate <??,??,??> or rotate x*?? }

> making it rotate the letters and not rotating it around in a cirlce around
> the screen?

  Rotations always happen around the origin.

  If you want to rotate an object around a certain given point P, first
translate the object so that P becomes the origin, then rotate, then
translate the object back.
  That is: translate -P rotate whatever translate P

  If you don't know P (how could POV-Ray know if even you don't?), then
try searching a good point by eg. putting a cylinder as the axis around
which you want to rotate the object and move that cylinder around until
you find the right spot. The location of the cylinder will then be your P.

-- 
#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: Tom Melly
Subject: Re: text problem
Date: 24 Nov 2003 08:55:24
Message: <3fc20dcc$1@news.povray.org>
"Warp" <war### [at] tagpovrayorg> wrote in message news:3fc208f9@news.povray.org...
>
>   Rotations always happen around the origin.

BTW origin = <0,0,0>


Post a reply to this message

From: Mike Williams
Subject: Re: text problem
Date: 24 Nov 2003 14:19:10
Message: <lCoKfDAeklw$EwRU@econym.demon.co.uk>
Wasn't it Warp who wrote:
>M Godfrey <mgo### [at] netscapenet> wrote:
>> anyone know how to rotate text using the
>>  text{ ttf "fontname.ttf" 1,0
>> rotate <??,??,??> or rotate x*?? }
>
>> making it rotate the letters and not rotating it around in a cirlce around
>> the screen?
>
>  Rotations always happen around the origin.
>
>  If you want to rotate an object around a certain given point P, first
>translate the object so that P becomes the origin, then rotate, then
>translate the object back.
>  That is: translate -P rotate whatever translate P
>
>  If you don't know P (how could POV-Ray know if even you don't?), then
>try searching a good point by eg. putting a cylinder as the axis around
>which you want to rotate the object and move that cylinder around until
>you find the right spot. The location of the cylinder will then be your P.

But if you want to rotate the object and keep it in the same place, then
a good choice for P would be the centre of the bounding box that
contains the text, which you can obtain like this:-

#declare P = (min_extent(TextObject) + max_extent(TextObject)) / 2;

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

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