POV-Ray : Newsgroups : povray.newusers : (vector) sum of two objects Server Time
31 Jul 2024 10:21:54 EDT (-0400)
  (vector) sum of two objects (Message 1 to 10 of 52)  
Goto Latest 10 Messages Next 10 Messages >>>
From: Achill
Subject: (vector) sum of two objects
Date: 23 Apr 2003 11:10:11
Message: <web.3ea6ac9f97d4f590e54f3efb0@news.povray.org>
Is there a (CSG-like?) possibility to create the vector sum of objects or at
least of simple solids?

Thanks for your help.

Achill


Post a reply to this message

From: ABX
Subject: Re: (vector) sum of two objects
Date: 23 Apr 2003 11:11:50
Message: <e5bdav85ocv9r6vskit389p7ftvhqtlr6r@4ax.com>
On Wed, 23 Apr 2003 11:09:19 EDT, "Achill" <ach### [at] matumde> wrote:
> Is there a (CSG-like?) possibility to create the vector sum of objects or at
> least of simple solids?

Before answer, can you describe more? Example with description of two components
and expected result...

ABX


Post a reply to this message

From: Achill Schuermann
Subject: Re: (vector) sum of two objects
Date: 23 Apr 2003 12:33:01
Message: <3EA6C026.6010005@ma.tum.de>
> Before answer, can you describe more? Example with description of two components
> and expected result...

Mathematically, the (vector) sum A+B of two sets A and B is defined as 
the set of all points x=a+b with a in A and b in B.
A+B = { x : x=a+b, a in A and b in B }.

A "simple" example is the sum of two convex polyhedra (cube, 
tetrahedron, octahedron, etc.) which is again a polyhedron.

Another example is the sum of a set A with a sphere of radius r, 
centered at <0,0,0>, which gives the set of all points "within distance 
r of A". This would give a nice "rounding effect".

I hope this gives a little idea of what i had in mind.

Achill


Post a reply to this message

From: ABX
Subject: Re: (vector) sum of two objects
Date: 23 Apr 2003 12:45:02
Message: <r7gdavcrboohskhfqaniuo3dai0tgd8s9k@4ax.com>
On Wed, 23 Apr 2003 18:32:38 +0200, Achill Schuermann <ach### [at] matumde> wrote:
> > Before answer, can you describe more? Example with description of two components
> > and expected result...
>
> Mathematically, the (vector) sum A+B of two sets A and B is defined as 
> the set of all points x=a+b with a in A and b in B.
> A+B = { x : x=a+b, a in A and b in B }.

In my knowledge sum of sets is
A+B = { x : x in A or x in B }
which can be union{} or merge{} object in POV.

> A "simple" example is the sum of two convex polyhedra (cube, 
> tetrahedron, octahedron, etc.) which is again a polyhedron.
>
> Another example is the sum of a set A with a sphere of radius r, 
> centered at <0,0,0>, which gives the set of all points "within distance 
> r of A". This would give a nice "rounding effect".
>
> I hope this gives a little idea of what i had in mind.

Not for me :-(
A I said initially as a 'sum' i thought you mean union{}
http://www.povray.org/documentation/view/171/
http://www.povray.org/documentation/view/40/
but in above text you seam expect that sphere+box=rounded box. This link can
help http://www.povray.org/documentation/view/261/#round_box_union

ABX


Post a reply to this message

From: Christoph Hormann
Subject: Re: (vector) sum of two objects
Date: 23 Apr 2003 13:07:03
Message: <3EA6C837.BB38782A@gmx.de>
Achill Schuermann wrote:
> 
> Mathematically, the (vector) sum A+B of two sets A and B is defined as
> the set of all points x=a+b with a in A and b in B.
> A+B = { x : x=a+b, a in A and b in B }.

I have no idea what you are talking about but we are not dealing with sets
of points but with surfaces.  Your definition of a vector sum does not
seem to be applicable for surfaces.  

> A "simple" example is the sum of two convex polyhedra (cube,
> tetrahedron, octahedron, etc.) which is again a polyhedron.

That's not an example.  

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?

Christoph

-- 
POV-Ray tutorials, include files, Sim-POV,
HCR-Edit and more: http://www.tu-bs.de/~y0013390/
Last updated 28 Feb. 2003 _____./\/^>_*_<^\/\.______


Post a reply to this message

From: Achill
Subject: Re: (vector) sum of two objects
Date: 23 Apr 2003 13:07:21
Message: <3EA6C82F.1070205@ma.tum.de>
>>A+B = { x : x=a+b, a in A and b in B }.
> 
> 
> In my knowledge sum of sets is
> A+B = { x : x in A or x in B }
> which can be union{} or merge{} object in POV.

I did not mean "union". Although, the (vector) sum can be viewed as the 
union of all possible vector additions a+b with vectors a in A and b in B.


>>I hope this gives a little idea of what i had in mind. 
> 
> Not for me :-(
 > ...
> but in above text you seam expect that sphere+box=rounded box. This link can
> help http://www.povray.org/documentation/view/261/#round_box_union

Thank you for the hint. The macros
   Round_Box_Union(PtA, PtB, EdgeRadius),
   Round_Box_Merge(PtA, PtB, EdgeRadius),
   Round_Cylinder_Union(PtA, PtB, Radius, EdgeRadius),
   Round_Cylinder_Merge(PtA, PtB, Radius, EdgeRadius),
   Round_Cone_Union(PtA, RadiusA, PtB, RadiusB, EdgeRadius),
   Round_Cone_Merge(PtA, RadiusA, PtB, RadiusB, EdgeRadius)
with Radius=EdgeRadius and RadiusB=EdgeRadius respectively seem to give 
special examples of sums with a sphere.

Still, it would be nice to have a general "sum" or at least a "sum with 
a sphere"...

Achill


Post a reply to this message

From: Achill
Subject: Re: (vector) sum of two objects
Date: 23 Apr 2003 13:33:13
Message: <3EA6CE43.2060102@ma.tum.de>
>>Mathematically, the (vector) sum A+B of two sets A and B is defined as
>>the set of all points x=a+b with a in A and b in B.
>>A+B = { x : x=a+b, a in A and b in B }.
> 
> 
> I have no idea what you are talking about but we are not dealing with sets
> of points but with surfaces.  Your definition of a vector sum does not
> seem to be applicable for surfaces.  

The defintion is applyable to arbitrary pointsets --- also too surfaces.
Besides, I thought povray is using solids also.



> 
>>A "simple" example is the sum of two convex polyhedra (cube,
>>tetrahedron, octahedron, etc.) which is again a polyhedron.
> 
> That's not an example.  

Well, ok.
A concrete example would be the sum of the tetrahedron T with vertices
<0,0,0>, <1,0,0>, <0,1,0> and <0,0,1> with "its negative" -T with 
vertices <0,0,0>, <-1,0,0>, <0,-1,0> and <0,0,-1>.
The outcome is a polyhedron (polytope) with vertices
<-1, 0, 0>, <0, -1, 0>, <0, 0, -1>, <1, 0, 0>, <1, -1, 0>, <1, 0, -1>, 
<0, 1, 0>, <-1, 1, 0>, <0, 1, -1>, <0, 0, 1>, <-1, 0, 1>, <0, -1, 1>.

Generally, such vector sums of polytopes can be evaluated for example 
with the program "polymake" (www.math.tu-berlin.de/polymake/)


> 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)".


Achill


Post a reply to this message

From: Christoph Hormann
Subject: Re: (vector) sum of two objects
Date: 23 Apr 2003 14:07:24
Message: <3EA6D65B.4BAB8280@gmx.de>
Achill wrote:
> 
> [...]
> 
> Well, ok.
> A concrete example would be the sum of the tetrahedron T with vertices
> <0,0,0>, <1,0,0>, <0,1,0> and <0,0,1> with "its negative" -T with
> vertices <0,0,0>, <-1,0,0>, <0,-1,0> and <0,0,-1>.
> The outcome is a polyhedron (polytope) with vertices
> <-1, 0, 0>, <0, -1, 0>, <0, 0, -1>, <1, 0, 0>, <1, -1, 0>, <1, 0, -1>,
> <0, 1, 0>, <-1, 1, 0>, <0, 1, -1>, <0, 0, 1>, <-1, 0, 1>, <0, -1, 1>.
> 
> Generally, such vector sums of polytopes can be evaluated for example
> with the program "polymake" (www.math.tu-berlin.de/polymake/)

Well, so much for polyhedra - you can surely create any polyhedron you
want with meshes.  

> > 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)".

So the vector sum of an arbitrary surface and a sphere at <0,0,0> with
radius 1 is the same as with any other sphere with the radius 1?  Sounds
strange.  Furthermore this means that this sum is not commutative.  

Christoph

-- 
POV-Ray tutorials, include files, Sim-POV,
HCR-Edit and more: http://www.tu-bs.de/~y0013390/
Last updated 28 Feb. 2003 _____./\/^>_*_<^\/\.______


Post a reply to this message

From: Tor Olav Kristensen
Subject: Re: (vector) sum of two objects
Date: 23 Apr 2003 15:44:28
Message: <Xns9366DDB084CCEtorolavkhotmailcom@204.213.191.226>
Achill <ach### [at] matumde> wrote in news:3EA### [at] matumde:

> 
>>>Mathematically, the (vector) sum A+B of two sets A and B is defined
>>>as the set of all points x=a+b with a in A and b in B.
>>>A+B = { x : x=a+b, a in A and b in B }.

...

> A concrete example would be the sum of the tetrahedron T with vertices
> <0,0,0>, <1,0,0>, <0,1,0> and <0,0,1> with "its negative" -T with 
> vertices <0,0,0>, <-1,0,0>, <0,-1,0> and <0,0,-1>.
> The outcome is a polyhedron (polytope) with vertices
> <-1, 0, 0>, <0, -1, 0>, <0, 0, -1>, <1, 0, 0>, <1, -1, 0>, <1, 0, -1>,
> <0, 1, 0>, <-1, 1, 0>, <0, 1, -1>, <0, 0, 1>, <-1, 0, 1>, <0, -1, 1>.
...

Why isn't <0, 0, 0> in the outcome list ?


Tor Olav


Post a reply to this message

From: ABX
Subject: Re: (vector) sum of two objects
Date: 24 Apr 2003 01:50:40
Message: <7fueavs379noqouu7nvbj2vck3mojfa1u6@4ax.com>
On Wed, 23 Apr 2003 19:06:55 +0200, Achill <ach### [at] matumde> wrote:
> > In my knowledge sum of sets is
> > A+B = { x : x in A or x in B }
> > which can be union{} or merge{} object in POV.
>
> I did not mean "union". Although, the (vector) sum can be viewed as the 
> union of all possible vector additions a+b with vectors a in A and b in B.

I have never seen practical usage of it (can you deliver some url references ?)
but the only solution I can imagine is script based solution. First make some
smart macro to achive array with grid of points of result based on two input
patterns/objects/arrays. Then turn it into density file and render as
media/isosurface.

ABX


Post a reply to this message

Goto Latest 10 Messages Next 10 Messages >>>

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