POV-Ray : Newsgroups : povray.newusers : 2D line drawing? Server Time
4 Nov 2024 23:14:56 EST (-0500)
  2D line drawing? (Message 1 to 7 of 7)  
From: Dennis Miller
Subject: 2D line drawing?
Date: 11 Aug 2002 21:15:51
Message: <3d570c47$1@news.povray.org>
What's the easiest way to create a simple vertical or horizontal solid line
in POV? Wouldn't a "line" object be useful:

line {line_start, line_end; width}

or something like that? I don't want to have to use the edge of a 3D object
to get this effect.
Thanks much,
Dennis


Post a reply to this message

From: Ken
Subject: Re: 2D line drawing?
Date: 11 Aug 2002 21:44:03
Message: <3D57135E.41121988@pacbell.net>
Dennis Miller wrote:
> 
> What's the easiest way to create a simple vertical or horizontal solid line
> in POV? Wouldn't a "line" object be useful:
> 
> line {line_start, line_end; width}
> 
> or something like that? I don't want to have to use the edge of a 3D object
> to get this effect.

You can use a zero thickness box - i.e. box{<-1,-.05,0,>,<1,.05,0>}

-- 
Ken Tyler


Post a reply to this message

From: Christopher James Huff
Subject: Re: 2D line drawing?
Date: 11 Aug 2002 21:56:12
Message: <chrishuff-AD6C77.20442511082002@netplex.aussie.org>
In article <3d570c47$1@news.povray.org>,
 "Dennis Miller" <dhm### [at] attbicom> wrote:

> What's the easiest way to create a simple vertical or horizontal solid line
> in POV?

Probably a very thin cylinder. The standard screen.inc include file 
would be helpful in positioning it, just make it thin enough to look 
like a line but not so thin it can't be rendered accurately. Set the 
diffuse to 0 and ambient to 1 in the finish to make it unaffected by 
lighting.


> Wouldn't a "line" object be useful:
> 
> line {line_start, line_end; width}
> 
> or something like that? I don't want to have to use the edge of a 3D object
> to get this effect.

No, simply because that isn't how POV generates the images. It doesn't 
draw stuff on the image, it traces rays through the 3D scene for each 
pixel. Where would a 2D "line" object go?
This is something you would generally use post-processing for.

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/


Post a reply to this message

From: Warp
Subject: Re: 2D line drawing?
Date: 11 Aug 2002 22:32:34
Message: <3d571e42@news.povray.org>
Dennis Miller <dhm### [at] attbicom> wrote:
> Wouldn't a "line" object be useful:

> line {line_start, line_end; width}

  By all means. But first give us the algorithm for raytracing that
(it should work with reflections and refractions as well).
  It could be a post-process effect, though (ie. if we don't need it
working with reflections and refractions). In this case it could just be
added to the really long list of other post-process effect requests...

-- 
#macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
[1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
-1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp -


Post a reply to this message

From: Dennis Miller
Subject: Re: 2D line drawing?
Date: 12 Aug 2002 08:34:38
Message: <3d57ab5e$1@news.povray.org>
Okay, thanks for the help on this one. I understand that the "drawing"
aspect is the wrong paradigm. I need a very complex grid of thin lines and
will also look into mesh...
Thanks,
D.

"Dennis Miller" <dhm### [at] attbicom> wrote in message
news:3d570c47$1@news.povray.org...
> What's the easiest way to create a simple vertical or horizontal solid
line
> in POV? Wouldn't a "line" object be useful:
>
> line {line_start, line_end; width}
>
> or something like that? I don't want to have to use the edge of a 3D
object
> to get this effect.
> Thanks much,
> Dennis
>
>
>
>


Post a reply to this message

From: nospam
Subject: Re: 2D line drawing?
Date: 19 Sep 2002 23:18:49
Message: <3d87406e.6577283@localhost>
On Sun, 11 Aug 2002 14:15:14 -0400, "Dennis Miller"
<dhm### [at] attbicom> wrote:

>What's the easiest way to create a simple vertical or horizontal solid line
>in POV? Wouldn't a "line" object be useful:
>
>line {line_start, line_end; width}
>
>or something like that? I don't want to have to use the edge of a 3D object
>to get this effect.
>Thanks much,
>Dennis
>
>
>
>

Don't know exactly what you are doing but you might want
to try an orthogrphic camera.  Then use a cylinder to draw
each line.  To make the line the thickness of one screen
pixel in a resolution independant way, set the thickness
of the cylinder to be (1 / image_height) or maybe to
(0.5 * (1 / image_height)).  Hope this helps.

Oh!  This is a v3.5-only trick, just so you know.


Post a reply to this message

From: Philippe Lhoste
Subject: Re: 2D line drawing?
Date: 20 Sep 2002 10:11:02
Message: <Xns928FA46B65749PhiLho@204.213.191.226>
"Dennis Miller" <dhm### [at] attbicom> wrote in
news:3d570c47$1@news.povray.org: 

> What's the easiest way to create a simple vertical or horizontal solid
> line in POV? Wouldn't a "line" object be useful:
> 
> line {line_start, line_end; width}
> 
> or something like that? I don't want to have to use the edge of a 3D
> object to get this effect.

Come to think of it, since such 2D drawing primitives are asked from time
to time, you can do them with ImageMagick, which has a number of drawing
capabilities, including text drawing. Works on most platforms. It is a
good post-processing program, I think. 

-- 
--=#=--=#=--=#=--=#=--=#=--=#=--=#=--=#=--=#=--
Philippe Lhoste (Paris -- France)
Professional programmer and amateur artist
http://jove.prohosting.com/~philho/


Post a reply to this message

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