povray simple rotating text question

povray simple rotating text question

Post by Joshua_Lehr » Tue, 29 Oct 1996 04:00:00



I'd like to rotate a letter about the y axis.  However,
i want the axis of rotation, the y axis, to split the
letter in half, on the x and z axis.

I.e., I want to do this:

translate object <-(1/2)x width of object, 0, -(1/2)z width of object)
rotate about y axis
translate back

how can I do this?

Thanks.

-joshua lehrer
-Brown University

 
 
 

povray simple rotating text question

Post by Daniel 'Ford' So » Wed, 30 Oct 1996 04:00:00


: I.e., I want to do this:
: translate object <-(1/2)x width of object, 0, -(1/2)z width of object)
: rotate about y axis
: translate back

Ew!
I'm assuming you're talking about POV-Ray... it should be simple,
provided you know the dimensions of the object...

object_name {
        [other declarational stuff]
        translate <-width/2, 0, -height/2>
        rotate y*90
        translate <width/2, 0, height/2>

Quote:}

Was this what you had in mind? It is perfectly legal to have
multiple translations and/or rotations for an object (or texture).

The only tricky part, esp. for text, is determining its size. What
I might recommend for this (unless somebody else comes up with
something better) is to put the text on top of a xz plane that
has a pigment with an x gradient...

pigment {
    gradient x
    color_map {
        [0.0 0.1 color rgb <0, 0, 0>
                 color rgb <0, 0, 0>]
        [0.1 0.2 color rgb <1, 0, 0>
                 color rgb <1, 0, 0>]
        [0.2 0.3 color rgb <0, 1, 0>
                 color rgb <0, 1, 0>]
etc...
    }

Quote:}

Then you can use the stripes on the plane as a ruler, and figure
out how long the text is. (If I'm not mistaken, I think text is
always 1 unit tall by default... though a similar measurement using
a y gradient on a yz plane would confirm or deny this easily.)

Try it and let me know how it turns out.

--
_______________<http://www.veryComputer.com/;_______________
|Daniel "Ford" Sohl |"Being flamed is the equivalent of a drive-  |

|  The ____est Man  | Internet, there's no *. You live to use |
|    on the Net     | *space another day." -- Douglas Adams   |
|Any E-mail spam sent to me will be spell-checked for a process-  |
|ing fee of $200.00. Submission implies acceptance of these terms.|

 
 
 

povray simple rotating text question

Post by Chris Colefa » Fri, 01 Nov 1996 04:00:00



> I'd like to rotate a letter about the y axis.  However,
> i want the axis of rotation, the y axis, to split the
> letter in half, on the x and z axis.

> I.e., I want to do this:

> translate object <-(1/2)x width of object, 0, -(1/2)z width of object)
> rotate about y axis
> translate back

> how can I do this?

You just answered your own question!  PoVRay supports multiple
tranformations, so as long as you get the numbers right, it will work
fine.  The trick with your problem is to find out the width of the
letter you want to use - lots of people have already come up with
various ways to do this, but if it's just for one or two letters, trial
and error is probably the quickest and easiest way to go.
 
 
 

1. Simple Rotate question

Simple question with simple example, but I always get this wrong first time.

Say I have an object (an thinly extruded star for example) positioned
vertically and viewed straight on in front viewport.  It's centred in the
view and looks like a flat 2D star
The object is identical front and back.
I want to animate, over 60 frames, a 180 degree rotate from the centre of
the object along the y axis - so the current back rotates to the front and
visa-versa.
I want the animation to be loopable over the 60 frames so that it plays
without a noticeable pause when looped.

What start/end values do I set up for the rotate controller to make a smooth
loop ?

TIA

--
Martin
Two Smoking Barrels - Single Player Half-Life level
http://www.geocities.com/TimesSquare/Bunker/4004/

2. Device Driver Developer-all areas of the U.S.

3. Rotating Logos / Text - Beginners question

4. Letters to liquid ?

5. Rookie Question: Transparent Background for Simple Text .gif?

6. Pagemker 4 to 6.5

7. Simple Text and Patch Questions

8. Colord Buttons

9. Simple text flow layout question (InDesign - but may apply to all)

10. Let's start with a simple question: Text Tool

11. A SIMPLE QUESTION=A SIMPLE ANSWER RIGHT???

12. Simple Task, Simple Question