POV-Ray : Newsgroups : povray.newusers : Labels on geometrical figures : Re: Labels on geometrical figures Server Time
7 Jul 2024 07:25:02 EDT (-0400)
  Re: Labels on geometrical figures  
From: Alain
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

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