POV-Ray : Newsgroups : povray.newusers : Labels on geometrical figures Server Time
4 Jul 2024 13:37:02 EDT (-0400)
  Labels on geometrical figures (Message 1 to 6 of 6)  
From: Ellef Fange Gjelstad
Subject: Labels on geometrical figures
Date: 11 May 2010 09:20:01
Message: <web.4be9592a46e13db470a952e70@news.povray.org>
Hi,

I am making simple geometrical figures to be used in a math class.  Students are
supposed to calculate volum, surface area etc.

I would want to draw some labels and "help lines" on the figures.  E.g. I want
to put one line and one letter "r" for the radius, and one line marking the
height.

One option is to do this in the style of Friedrich Lohmueller
(http://www.f-lohmueller.de/pov_tut/addon/00_Basic_Templates/24_shapes_lo.inc/__index.htm).
 However, I would rather want all lines to be black and in the same width (e.g.
5pixels), regardless of the distance to the width.  That is, I don't want the
lines and letter to be objects in 3d space, but rather markings over the
picture.  At the same time, I want the line to be automatically placed on the
right location, e.g. from the bottom of the cylinder to the top.

Is this possible in pov-ray?

Regards, Ellef Fange Gjelstad


Post a reply to this message

From: Alain
Subject: Re: Labels on geometrical figures
Date: 11 May 2010 12:47:20
Message: <4be98a18$1@news.povray.org>

> Hi,
>
> I am making simple geometrical figures to be used in a math class.  Students are
> supposed to calculate volum, surface area etc.
>
> I would want to draw some labels and "help lines" on the figures.  E.g. I want
> to put one line and one letter "r" for the radius, and one line marking the
> height.
>
> One option is to do this in the style of Friedrich Lohmueller
>
(http://www.f-lohmueller.de/pov_tut/addon/00_Basic_Templates/24_shapes_lo.inc/__index.htm).
>   However, I would rather want all lines to be black and in the same width (e.g.
> 5pixels), regardless of the distance to the width.  That is, I don't want the
> lines and letter to be objects in 3d space, but rather markings over the
> picture.  At the same time, I want the line to be automatically placed on the
> right location, e.g. from the bottom of the cylinder to the top.
>
> Is this possible in pov-ray?
>
> Regards, Ellef Fange Gjelstad
>
>
For been black, just use pigment{rgb 0}. You can also use finish{ambient 
0 diffuse 0}. Any object with that finish will appear totaly black.
If you add no_shadow, the object won't cast any shadow.


Take a look at screen.inc

It contains a collection of macros made specificaly to put things like 
labels and such relative to the camera.

You can also use the orthographic camera. That camera shoots parallel 
rays at the scene. With that camera, perspective is suppressed, it's 
effectively a model for an infinite focal distance.

Just change your camera to:
camera{orthographic ...}

For the labbels themself, you use a text object and specify a very small 
thickness :

text {  ttf "arial.ttf" "R"	0.001,0 pigment{rgb 0}no_shadow }

This makes a very thin black "R" that don't cast any shadow.


Alain


Post a reply to this message

From: Christian Froeschlin
Subject: Re: Labels on geometrical figures
Date: 11 May 2010 15:08:28
Message: <4be9ab2c@news.povray.org>
Ellef Fange Gjelstad wrote:

> However, I would rather want all lines to be black and in the same width (e.g.
> 5pixels), regardless of the distance to the width. 

you could achieve this with an orthogonal camera. However, the
object would then also look different as it loses perspective.
The alternative would be to model the lines with a thickness
which increases with distance from camera (e.g. sphere_sweep).


Post a reply to this message

From: MCC900
Subject: Re: Labels on geometrical figures
Date: 4 Jul 2010 19:20:01
Message: <web.4c311712ff74e5a827e72c8f0@news.povray.org>
Christian Froeschlin <chr### [at] chrfrde> wrote:
> Ellef Fange Gjelstad wrote:
>
> > However, I would rather want all lines to be black and in the same width (e.g.
> > 5pixels), regardless of the distance to the width.
>
> you could achieve this with an orthogonal camera. However, the
> object would then also look different as it loses perspective.
> The alternative would be to model the lines with a thickness
> which increases with distance from camera (e.g. sphere_sweep).

Yes...
That or having all of the lines at the same distance from the camera.
What I mean is something like when you take a picture 'grabbing' a person at the
distance between your fingers...
So the lines would look like if they were next to the figures.
The text (if you're going to make the text using pov as well) should be probably
pointing to the camera as well, no matter where it is located.
Just an idea...


Post a reply to this message

From: Alain
Subject: Re: Labels on geometrical figures
Date: 5 Jul 2010 13:57:36
Message: <4c321d10$1@news.povray.org>

> Christian Froeschlin<chr### [at] chrfrde>  wrote:
>> Ellef Fange Gjelstad wrote:
>>
>>> However, I would rather want all lines to be black and in the same width (e.g.
>>> 5pixels), regardless of the distance to the width.
>>
>> you could achieve this with an orthogonal camera. However, the
>> object would then also look different as it loses perspective.
>> The alternative would be to model the lines with a thickness
>> which increases with distance from camera (e.g. sphere_sweep).
>
> Yes...
> That or having all of the lines at the same distance from the camera.
> What I mean is something like when you take a picture 'grabbing' a person at the
> distance between your fingers...
> So the lines would look like if they were next to the figures.
> The text (if you're going to make the text using pov as well) should be probably
> pointing to the camera as well, no matter where it is located.
> Just an idea...
>
>
>
>
As I said in a previous post: Look at the screen.inc file.

The purpose of that include is to allow you to add captions and objects 
at a specific location on the image regardless of your point of view.
There is a sample scene that puts a reticle and some text that never 
change location regardless of where the camera is located.


Alain


Post a reply to this message

From: Ellef Fange Gjelstad
Subject: Re: Labels on geometrical figures
Date: 18 Aug 2010 10:15:01
Message: <web.4c6bea1dff74e5a83d51a7b10@news.povray.org>
Alain <aze### [at] qwertyorg> wrote:
>
> As I said in a previous post: Look at the screen.inc file.

Thanks very much; I have got help in the thread "New version screen.inc" in
povray.binaries.scene-files .


Post a reply to this message

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