POV-Ray : Newsgroups : povray.newusers : (vector) sum of two objects Server Time
31 Jul 2024 06:17:44 EDT (-0400)
  (vector) sum of two objects (Message 21 to 30 of 52)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: SAS
Subject: Re: (vector) sum of two objects
Date: 24 Apr 2003 09:22:05
Message: <MPG.1911f552ac74fc49896a3@news.povray.org>
Achill wrote:

> > Let's say we have a unit cube between <0,0,0> and <1,1,1> and a sphere at
> > <0,0,0> with radius 1.  What is the 'vector sum' of these objects?
> 
> As far as I understand the macro
> "Round_Box_Union(PtA, PtB, EdgeRadius)",
> it would be "Round_Box_Union(<0,0,0>, <1,1,1>, 1)".

It would be Round_Box_Union(<-1,-1,-1>, <2,2,2>, 1), because the 
Round_Box macros cut away from the specified box, rather than 
adding to it.


Post a reply to this message

From: Christopher James Huff
Subject: Re: (vector) sum of two objects
Date: 24 Apr 2003 09:48:25
Message: <cjameshuff-0C4912.09481524042003@netplex.aussie.org>
In article <3EA### [at] matumde>, Achill <ach### [at] matumde> 
wrote:

> I do not know of a concrete "practical usage" either. My main idea was 
> to visualize the mathematical defintion of the vector sum (also known as 
> Minkowski sum, see http://mathworld.wolfram.com/MinkowskiSum.html) of 
> two arbitrary sets.
> 
> Besides I think this would give some nice effects. For example a general 
> "rounding" by adding a sphere.

I think you need to learn more about how raytracing works. POV can not 
take the "vector sum of all points on an object", because it doesn't 
know all points on the object. Raytracing works by finding the 
intersection point of rays with surfaces, the various shape types use a 
wide variety of methods to do this, ranging from simple geometric 
formulas to complex root-finding algorithms. You can't just add these 
intersection finding algorithms together to get a new one.

Your idea seems to depend on having two sets of points and resulting in 
a third set, POV does not have the first two sets and wouldn't be able 
to do anything with the third (though there is a method for raytracing 
point fields that might be useful with this, it is not currently 
implemented in POV).

Yes, a general rounding algorithm would be nice sometimes, but it is not 
possible without completely changing the way POV handles shapes. If it 
is ever added to POV, it will probably be a mesh processing feature.

-- 
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: Achill
Subject: Re: (vector) sum of two objects
Date: 24 Apr 2003 09:50:54
Message: <3EA7EBA5.5000601@ma.tum.de>
SAS wrote:
> Achill wrote:
> 
> 
>>>Let's say we have a unit cube between <0,0,0> and <1,1,1> and a sphere at
>>><0,0,0> with radius 1.  What is the 'vector sum' of these objects?
>>
>>As far as I understand the macro
>>"Round_Box_Union(PtA, PtB, EdgeRadius)",
>>it would be "Round_Box_Union(<0,0,0>, <1,1,1>, 1)".
> 
> 
> It would be Round_Box_Union(<-1,-1,-1>, <2,2,2>, 1), because the 
> Round_Box macros cut away from the specified box, rather than 
> adding to it.

So I did not understand the macro too far... :-)
Should have tried before mailing...

Achill


Post a reply to this message

From: Christopher James Huff
Subject: Re: (vector) sum of two objects
Date: 24 Apr 2003 09:53:47
Message: <cjameshuff-EFB98A.09533124042003@netplex.aussie.org>
In article <3EA### [at] matumde>, Achill <ach### [at] matumde> 
wrote:

> > Let's say we have a unit cube between <0,0,0> and <1,1,1> and a sphere at
> > <0,0,0> with radius 1.  What is the 'vector sum' of these objects?
> 
> As far as I understand the macro
> "Round_Box_Union(PtA, PtB, EdgeRadius)",
> it would be "Round_Box_Union(<0,0,0>, <1,1,1>, 1)".

The vector sum of a sphere and a box is 3 boxes, 8 spheres, and 12 
cylinders?

-- 
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: Achill
Subject: Re: (vector) sum of two objects
Date: 24 Apr 2003 10:06:14
Message: <3EA7EF3C.5000008@ma.tum.de>
Christopher James Huff wrote:
> In article <3EA### [at] matumde>, Achill <ach### [at] matumde> 
> wrote:
> 
> 
>>>Let's say we have a unit cube between <0,0,0> and <1,1,1> and a sphere at
>>><0,0,0> with radius 1.  What is the 'vector sum' of these objects?
>>
>>As far as I understand the macro
>>"Round_Box_Union(PtA, PtB, EdgeRadius)",
>>it would be "Round_Box_Union(<0,0,0>, <1,1,1>, 1)".
> 
> 
> The vector sum of a sphere and a box is 3 boxes, 8 spheres, and 12 
> cylinders?

Its the union of them, yes.
That is a consequence of the so called "Steiner Theorem" in "convex 
geometry".

Achill


Post a reply to this message

From: Achill
Subject: Re: (vector) sum of two objects
Date: 24 Apr 2003 10:11:57
Message: <3EA7F092.4010402@ma.tum.de>
Christopher James Huff wrote:
> In article <3EA### [at] matumde>, Achill <ach### [at] matumde> 
> wrote:
> 
> I think you need to learn more about how raytracing works. 

That is certainly true --- as it is with most things... :-)
(That's why I am posting to "newusers".)


> POV can not 
> take the "vector sum of all points on an object", because it doesn't 
> know all points on the object. Raytracing works by finding the 
> intersection point of rays with surfaces, the various shape types use a 
> wide variety of methods to do this, ranging from simple geometric 
> formulas to complex root-finding algorithms. You can't just add these 
> intersection finding algorithms together to get a new one.
 >
> Your idea seems to depend on having two sets of points and resulting in 
> a third set, POV does not have the first two sets and wouldn't be able 
> to do anything with the third (though there is a method for raytracing 
> point fields that might be useful with this, it is not currently 
> implemented in POV).

I saw on http://www.f-lohmueller.de/pov_tut/csg/povcsg1e.htm that CSG 
operations may be used with all shapes which have a clear defined 
"inside" and "outside", in particular with solids. My idea was that it 
should be possible to determine "inside" and "outside" of the sum (at 
least for the sum of solids) as well...?!?

I must admit, I do not know how povray "knows" to distiguish "inside" 
and "outside".



> Yes, a general rounding algorithm would be nice sometimes, but it is not 
> possible without completely changing the way POV handles shapes. If it 
> is ever added to POV, it will probably be a mesh processing feature.


I see that I will have to learn much more about povray and raytracing in 
general... :-)

Achill


Post a reply to this message

From: ABX
Subject: Re: (vector) sum of two objects
Date: 24 Apr 2003 10:18:51
Message: <4dsfavsgv7emj49rr7irlfv9j7cfvf6mkr@4ax.com>
On Thu, 24 Apr 2003 16:11:30 +0200, Achill <ach### [at] matumde> wrote:
> I must admit, I do not know how povray "knows" to distiguish "inside" 
> and "outside".

It's hardcoded definition of each primitive object. Like math representation of
its surface, function to calculate normal vectors, mapping uv space on its
surface etc.

ABX


Post a reply to this message

From: Christopher James Huff
Subject: Re: (vector) sum of two objects
Date: 24 Apr 2003 11:51:22
Message: <cjameshuff-9DB8F5.11510924042003@netplex.aussie.org>
In article <3EA### [at] matumde>, Achill <ach### [at] matumde> 
wrote:

> Its the union of them, yes.
> That is a consequence of the so called "Steiner Theorem" in "convex 
> geometry".

And how do you compute a union of primitives equivalent to a given "sum" 
of objects? Your reasoning process seems to have been "it will make a 
rounded box, and here's a rounded box macro".

-- 
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: Christopher James Huff
Subject: Re: (vector) sum of two objects
Date: 24 Apr 2003 11:54:27
Message: <cjameshuff-C4BC2A.11541624042003@netplex.aussie.org>
In article <3EA### [at] matumde>, Achill <ach### [at] matumde> 
wrote:

> I saw on http://www.f-lohmueller.de/pov_tut/csg/povcsg1e.htm that CSG 
> operations may be used with all shapes which have a clear defined 
> "inside" and "outside", in particular with solids. My idea was that it 
> should be possible to determine "inside" and "outside" of the sum (at 
> least for the sum of solids) as well...?!?
> 
> I must admit, I do not know how povray "knows" to distiguish "inside" 
> and "outside".

It can check whether a given point is inside or outside the object, 
using a hard-coded object-specific algorithm. How does that help? It 
doesn't get you any closer to summing objects.

-- 
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: ABX
Subject: Re: (vector) sum of two objects
Date: 24 Apr 2003 12:05:03
Message: <h32gavo8csv7vcgefdsi0fl3ei8orr0cdq@4ax.com>
On Thu, 24 Apr 2003 11:51:09 -0400, Christopher James Huff
<cja### [at] earthlinknet> wrote:
> Your reasoning process seems to have been "it will make a 
> rounded box, and here's a rounded box macro".

That's me who suggested that macro. When I refered to it I wasn't sure if he is
interested in METHOD or RESULT of his description. Since there was no way to
duplicate METHOD in universal way I could only help with referring tool where
similiar RESULT he described was achived. As to the newuser who come here to
achive something I showed him shortest way to achive RESULT he described in
example. I thought it could save him learning of full POV SDL power.
I'm still not sure if he is rather interested in RESULT of specific case of his
sum or in general METHOD. I hope my hints helped him and I hope you are not
angry that I answered instead of licensed TAG member ;-)

ABX


Post a reply to this message

<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>

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