POV-Ray : Newsgroups : povray.animations : Rotating text around center? : Re: Rotating text around center? Server Time
28 Jul 2024 16:19:46 EDT (-0400)
  Re: Rotating text around center?  
From: Josh English
Date: 21 Jun 1999 17:47:17
Message: <376EB2A8.DA5459C2@spiritone.com>
Hmm... I sense a challenge..... You can create a custom macro to do this... here
is a start

#macro CirclingText(string,font,depth,arc,rad)

  #local length = strlen(string);
  #local last = length + 1;
  #local s = 1;

  #local r = arc/length;

  #while ( s < last )
     text { ttf   font,
            substr(string,s,1)      // the string to create
            depth,              // the extrusion depth
            0               // inter-character spacing
            pigment { rgb 1 }
            translate rad*y
            rotate r*(s-1)*-z}
     #local s = s + 1;
  #end

#end // macro

CirclingText ("Joshua","crystal.ttf",0.25,270,1)

This should give you a starting point.

Joshua
eng### [at] spiritonecom

Larkril wrote:

> I am making an animation, and I am trying to rotate a single word around in
> a circle.  The problem is that since text starts at the lower left corner(in
> POVray, which is what I'm using) it rotates by its edge instead of by the
> middle.  For example, it rotates more like the hand of a clock than a plane
> propeller.  How can I get around this.  There must be some fancy thing I can
> do with sin and cosine, etc...  If you wouldn't mind, please email me a copy
> of your reply at rla### [at] mbhsedu.  Thanks a lot for any help!


Post a reply to this message

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