POV-Ray : Newsgroups : povray.advanced-users : 2D graphical elements Server Time
27 Jun 2024 14:21:56 EDT (-0400)
  2D graphical elements (Message 11 to 20 of 20)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: posfan12
Subject: Re: 2D graphical elements
Date: 6 Mar 2011 20:30:00
Message: <web.4d7434f01ecabac28693b1390@news.povray.org>
I guess I should have said "in scene" instead of "on screen". I.e. it should be
possible to place the 2D elements *anywhere* in the scene - not just parallel to
the viewing plane.


Post a reply to this message

From: clipka
Subject: Re: 2D graphical elements
Date: 6 Mar 2011 23:50:12
Message: <4d746404$1@news.povray.org>
Am 07.03.2011 02:29, schrieb posfan12:
> I guess I should have said "in scene" instead of "on screen". I.e. it should be
> possible to place the 2D elements *anywhere* in the scene - not just parallel to

I guess a macro library would be the way to go there. Making the objects 
effectively 2D could be achieved by using an almost-zero depth, or 
intersecting with a simple 2D shape such as a disk or two triangles 
arranged as a square or something.


Post a reply to this message

From: Trevor G Quayle
Subject: Re: 2D graphical elements
Date: 7 Mar 2011 00:00:01
Message: <web.4d74663e1ecabac2b05ef170@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:
> Am 07.03.2011 02:29, schrieb posfan12:
> > I guess I should have said "in scene" instead of "on screen". I.e. it should be
> > possible to place the 2D elements *anywhere* in the scene - not just parallel to
>
> I guess a macro library would be the way to go there. Making the objects
> effectively 2D could be achieved by using an almost-zero depth, or
> intersecting with a simple 2D shape such as a disk or two triangles
> arranged as a square or something.

If a true zero depth, 2-D object is desired, then the simplest would probably be
to make the 3D version and intersect it with a 2D box (box with one dimension
zero)

-tgq


Post a reply to this message

From: Alain
Subject: Re: 2D graphical elements
Date: 7 Mar 2011 13:12:14
Message: <4d751ffe@news.povray.org>

> clipka<ano### [at] anonymousorg>  wrote:
>> Am 07.03.2011 02:29, schrieb posfan12:
>>> I guess I should have said "in scene" instead of "on screen". I.e. it should be
>>> possible to place the 2D elements *anywhere* in the scene - not just parallel to
>>
>> I guess a macro library would be the way to go there. Making the objects
>> effectively 2D could be achieved by using an almost-zero depth, or
>> intersecting with a simple 2D shape such as a disk or two triangles
>> arranged as a square or something.
>
> If a true zero depth, 2-D object is desired, then the simplest would probably be
> to make the 3D version and intersect it with a 2D box (box with one dimension
> zero)
>
> -tgq
>
>

There IS a zero depth object already available beside the triangle. It's 
called a polygon.
It can have an arbitrary number of edges, receive any pigment, like an 
object pattern for example.

Once created, it can easily be scalled, rotated and mooved around just 
like any other object.

No, a disk is NOT a true 2D object. It have a definite interior just 
like a plane. That interior does extend lateraly beyong the visible part 
and thus will interfere with medias.




Alain


Post a reply to this message

From: clipka
Subject: Re: 2D graphical elements
Date: 8 Mar 2011 12:41:54
Message: <4d766a62$1@news.povray.org>
Am 07.03.2011 19:12, schrieb Alain:

> No, a disk is NOT a true 2D object. It have a definite interior just
> like a plane. That interior does extend lateraly beyong the visible part
> and thus will interfere with medias.

Didn't know that. Yuck.


Post a reply to this message

From: Le Forgeron
Subject: Re: 2D graphical elements
Date: 8 Mar 2011 14:22:15
Message: <4d7681e7$1@news.povray.org>
Le 08/03/2011 18:41, clipka nous fit lire :
> Am 07.03.2011 19:12, schrieb Alain:
> 
>> No, a disk is NOT a true 2D object. It have a definite interior just
>> like a plane. That interior does extend lateraly beyong the visible part
>> and thus will interfere with medias.
> 
> Didn't know that. Yuck.

It's a "bug" from the very first days of povray.
Probably a copy-paste of code at that time.


Post a reply to this message

From: posfan12
Subject: Re: 2D graphical elements
Date: 11 Mar 2011 22:45:01
Message: <web.4d7aeb3a1ecabac28693b1390@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:
> I guess a macro library would be the way to go there. Making the objects
> effectively 2D could be achieved by using an almost-zero depth, or
> intersecting with a simple 2D shape such as a disk or two triangles
> arranged as a square or something.

What are good candidate 3D objects? They should be smooth and also render fast.








From the W3C:
http://www.w3.org/TR/SVG/shapes.html


Plus the 'path' element, which can be any of:

+ straight lines
+ two types of Bezier curves
+ circular and elliptic arcs



-Mike


Post a reply to this message

From: Le Forgeron
Subject: Re: 2D graphical elements
Date: 12 Mar 2011 05:17:29
Message: <4d7b4839$1@news.povray.org>
Le 12/03/2011 04:40, posfan12 nous fit lire :
> clipka <ano### [at] anonymousorg> wrote:
>> I guess a macro library would be the way to go there. Making the objects
>> effectively 2D could be achieved by using an almost-zero depth, or
>> intersecting with a simple 2D shape such as a disk or two triangles
>> arranged as a square or something.
> 
> What are good candidate 3D objects? They should be smooth and also render fast.
> 
> 9.2 The ‘rect’ element
> 9.3 The ‘circle’ element
> 9.4 The ‘ellipse’ element
> 9.5 The ‘line’ element
> 9.6 The ‘polyline’ element
> 9.7 The ‘polygon’ element
> 

Already seen in FS#63

    * Rectangles can have rounded corners
    * Polygons have last point connected to first

circle = disc
ellipse = disc + scale
polygon = polygon !
rect = flat box, but rounded corners would be a bonus
line = flat box + rotate, but need a pen size!
polyline = sequence of flat box & connecting disc, also need a pen size


> From the W3C:
> http://www.w3.org/TR/SVG/shapes.html
> 
> 
> Plus the 'path' element, which can be any of:
> 
> + straight lines
> + two types of Bezier curves
> + circular and elliptic arcs

Spline! (and it will suck for circular & elliptic arcs)
and you will need a text processing to load the fonts, split each letter
apart and put them along the spline.


Post a reply to this message

From: Alain
Subject: Re: 2D graphical elements
Date: 12 Mar 2011 15:20:22
Message: <4d7bd586@news.povray.org>

> clipka<ano### [at] anonymousorg>  wrote:
>> I guess a macro library would be the way to go there. Making the objects
>> effectively 2D could be achieved by using an almost-zero depth, or
>> intersecting with a simple 2D shape such as a disk or two triangles
>> arranged as a square or something.
>
> What are good candidate 3D objects? They should be smooth and also render fast.
>

2 options: 4 sided polygon or very thin box.
The polygon can easily give you a trapeze, parallelogram, or odd quadrangle.

A disk with hollow

An unevenly scalled disk, also with hollow

A thin and narrow box


Already exists.
>
>  From the W3C:
> http://www.w3.org/TR/SVG/shapes.html
>
>
> Plus the 'path' element, which can be any of:
Look at the spline.
>
> + straight lines
> + two types of Bezier curves
> + circular and elliptic arcs
>
>
>
> -Mike
>
>

Alain


Post a reply to this message

From: posfan12
Subject: Re: 2D graphical elements
Date: 13 Mar 2011 09:35:00
Message: <web.4d7cc7481ecabac22e148fbc0@news.povray.org>
Le_Forgeron <jgr### [at] freefr> wrote:
> > What are good candidate 3D objects? They should be smooth and also render fast.
> >
> > 9.2 The ‘rect’ element
> > 9.3 The ‘circle’ element
> > 9.4 The ‘ellipse’ element
> > 9.5 The ‘line’ element
> > 9.6 The ‘polyline’ element
> > 9.7 The ‘polygon’ element
> >
>
> Already seen in FS#63
>
>     * Rectangles can have rounded corners
>     * Polygons have last point connected to first
>
> circle = disc
> ellipse = disc + scale
> polygon = polygon !
> rect = flat box, but rounded corners would be a bonus
> line = flat box + rotate, but need a pen size!
> polyline = sequence of flat box & connecting disc, also need a pen size


1. I'm not 100% all of these are usable when you take into consideration the
fact that SVG can have separate fill and stroke parameters, several types of
curved and/or boxy "line endings" (can't remember the correct term for
these...), and so on.

2. I've been considering instead using triangle meshes for everything, possibly
using one of the various parametric object approximation macros/tools people
have created over the years. It would make things a lot simpler since you could
just plug in the formulas and have the macros/tools take care of the rest. (In
fact, I think most software that renders SVG in real-time tends to operate in a
manner more similar to this technique.) Of course, the visual quality might be
inferior in several instances, but it is possible in most cases to tweak the
fidelity/granularity with which the objects and formulas are approximated and
replaced by meshes.

Some food for thought.


-Mike


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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