POV-Ray : Newsgroups : povray.newusers : Adding text in a local coordinate system Server Time
1 Nov 2024 05:22:29 EDT (-0400)
  Adding text in a local coordinate system (Message 1 to 4 of 4)  
From: wollinger
Subject: Adding text in a local coordinate system
Date: 9 Apr 2006 18:40:00
Message: <web.443988dfa182aba59f26cd410@news.povray.org>
Hi,

I have a scene where all of my objects are shifted by a vector
<400000,255000,0>. The height_field displays a mountain with an approx
altitude of 2000 meters. Dimensions of the whole area is 50x50 km. My
camera is therefore somewhere in the middle <425000,280000,3000> and I
declared a Scene_Center at <425000,285000,2000> . The camera is lookin_at
the Scene_Center. Now I want to display some text in this scene. How can I
achive that the text is displayed normal to my setup? The font is always
skewed. Are there any "tutorials" whow to deal with a local grid?

Thanks
Wolfgang

Sorry that I can't post any code at the moment, but my file needs to be
cleanded up first.


Post a reply to this message

From: Charles C
Subject: Re: Adding text in a local coordinate system
Date: 9 Apr 2006 21:35:01
Message: <web.4439b57713f8e9b160ffde0@news.povray.org>
There's an include file for putting things in front of the camera, but I
can't remember what it's called.  It's there though.

You could also put both the text and the camera in a known coordinate system
and then put both where you need them after the fact:  Center your text at
the origin, and put the camera a short distance out along one of the axis
looking at the text straight on...  Then you could rotate both to the angle
of your liking. Also do the same rotation to some vector.  (Initial vector
should equal the location of the camera.) Translate the camera (and text)
out to your Scene_Center, minus the vector value.   Finally translate the
camera (and text) one more time by the vector value * some multiplier to
get it however far away you want it to be from the Scene_Center.  If what I
just said is all wrong, somebody else correct :-)

Charles


Post a reply to this message

From: Tim
Subject: Re: Adding text in a local coordinate system
Date: 11 Apr 2006 12:05:00
Message: <web.443bd39513f8e94cdecfa30@news.povray.org>
"wollinger" <wol### [at] gmznet> wrote:
> Hi,
>
> I have a scene where all of my objects are shifted by a vector
> <400000,255000,0>. The height_field displays a mountain with an approx
> altitude of 2000 meters. Dimensions of the whole area is 50x50 km. My
> camera is therefore somewhere in the middle <425000,280000,3000> and I
> declared a Scene_Center at <425000,285000,2000> . The camera is lookin_at
> the Scene_Center. Now I want to display some text in this scene. How can I
> achive that the text is displayed normal to my setup? The font is always
> skewed. Are there any "tutorials" whow to deal with a local grid?
>
> Thanks
> Wolfgang
>
> Sorry that I can't post any code at the moment, but my file needs to be
> cleanded up first.

Hi Wollinger,

I think the include file Charles C is referring to is screen.inc.  Theres a
scene file providing an example of its use at scenes/incdemo/screen.pov

Tim


Post a reply to this message

From: wollinger
Subject: Re: Adding text in a local coordinate system
Date: 18 Apr 2006 17:20:01
Message: <web.444556e713f8e9b44498390@news.povray.org>
Hi Tim

life could be so easy! I now did some calculations with the built in sin and
cos functions to place my text in the screen where I wanted to have it. It
also works, but using screen.inc seems much easier.

Thanks for that hint!
Wolfgang
>
> I think the include file Charles C is referring to is screen.inc.  Theres a
> scene file providing an example of its use at scenes/incdemo/screen.pov
>
> Tim


Post a reply to this message

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