![](/i/fill.gif) |
![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
>>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 ?
>
Thinking of a polytopes as the "convex hulls"
(http://mathworld.wolfram.com/ConvexHull.html) of their vertices, the
sum of two polytopes A and B is the convex hull of all points a+b, where
a is a vertex of A and b is a vertex of B.
In the example above <0, 0, 0> is a point a+b (of 16 possible
combinations) in the interior of the convex hull. So it is not one of
the 12 vertices of this polytope.
I hope this explains it.
Achill
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
On Thu, 24 Apr 2003 09:53:38 +0200, Achill <ach### [at] ma tum de> 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.
Using this mathematical name from begining of this thread could help. I wonder
why you prefered to deliver some spaghetti-like explanation without this direct
link :-)
> Besides I think this would give some nice effects. For example a general
> "rounding" by adding a sphere.
As for adding sphere into objects there is another solution/workaround (but not
perfect). You can look into my 'rounded' extension to isocsg library
http://www-public.tu-bs.de:8080/~y0013390/pov/ic/
If you define some object with rounded version of macros and this object is not
very complicated you can then use threshold to achive object almost identical to
adding sphere (http://news.povray.org/povray.binaries.images/23003/).
I imagine you could write macro to do similiar operation for meshes but it is
obiously harder task than using already made macros from isocsg library. But
isosurfaces are usually (always ?) slower than meshes.
Except adding sphere, is there any other 3D application where you can add two
any objects?
> > 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.
>
> I am not familiar with "povray's insides".
If you are talking about using POV-Ray SDL (scene description language) things
like macro, pattern, array or object are not "povray's insides". Otherwise I
hardly see what can be "povray's outsides" ;-)
ABX
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
>>Minkowski sum, see http://mathworld.wolfram.com/MinkowskiSum.html)
>
> Using this mathematical name from begining of this thread could help. I wonder
> why you prefered to deliver some spaghetti-like explanation without this direct
> link :-)
>
I thought "vector sum" is more familiar.
Sorry for that... :-)
>
>>Besides I think this would give some nice effects. For example a general
>>"rounding" by adding a sphere.
>
>
> As for adding sphere into objects there is another solution/workaround (but not
> perfect). You can look into my 'rounded' extension to isocsg library
> http://www-public.tu-bs.de:8080/~y0013390/pov/ic/
> If you define some object with rounded version of macros and this object is not
> very complicated you can then use threshold to achive object almost identical to
> adding sphere (http://news.povray.org/povray.binaries.images/23003/).
>
> I imagine you could write macro to do similiar operation for meshes but it is
> obiously harder task than using already made macros from isocsg library. But
> isosurfaces are usually (always ?) slower than meshes.
Thank you very much for all the hints.
My original idea was to program a CSG "sum", since given two objects
with an "inside" and an "outside", it should be possible to "describe"
the "inside" and "outside" of the sum?!?
As I said before, I do not know povray too well. So this might be an
impossible or even extremly stupid idea?!?
> Except adding sphere, is there any other 3D application where you can add two
> any objects?
Adding an ellipsoid rounds objects in different directions differently
--- could be useful?
It is hard to imagine (at least for me) what adding of arbitrary objects
would look like --- but maybe there are some interesting effects possible?
>>I am not familiar with "povray's insides".
>
>
> If you are talking about using POV-Ray SDL (scene description language) things
> like macro, pattern, array or object are not "povray's insides". Otherwise I
> hardly see what can be "povray's outsides" ;-)
yepp :-)
Achill
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Achill wrote:
>
> [...]
> >
> >
> > 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.
> >
>
> The sum of a set with any sphere of the same radius is the same, up to a
> translation. Moreover, the operation is commutative.
So the sum of a
sphere { <1,0,0>, 0.1 }
and a
sphere { <0,0,2>, 0.1 }
would be a
sphere { <0,0,0>, 0.2 }
???
Now that's a really strange idea for combining shapes...
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
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
On Thu, 24 Apr 2003 12:28:05 +0200, Christoph Hormann <chr### [at] gmx de>
wrote:
> So the sum of a
> sphere { <1,0,0>, 0.1 }
> and a
> sphere { <0,0,2>, 0.1 }
> would be a
> sphere { <0,0,0>, 0.2 }
> ???
Call it "rounded sphere" ;-)
ABX
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
On Wed, 23 Apr 2003 11:09:19 EDT, "Achill" <ach### [at] ma tum de> wrote:
>Is there a (CSG-like?) possibility to create the vector sum of objects or at
>least of simple solids?
>
>Thanks for your help.
I have just written a number of macros to introduce sets in POV.
Currently the macros include: AddToSet, DeleteFromSet, FindInSet,
ElementsInSet, IntersectSets, UnionSets, DifferenceSets and a number
of utility macros (PrintSet, SetToFile, SetFromFile etc.)
I'll clean up the code and release them these days. I hope it helps
your situation.
Peter Popov ICQ : 15002700
Personal e-mail : pet### [at] vip bg
TAG e-mail : pet### [at] tag povray org
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Christoph Hormann wrote:
>
> Achill wrote:
>
>>[...]
>>
>>>
>>>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.
>>>
>>
>>The sum of a set with any sphere of the same radius is the same, up to a
>>translation. Moreover, the operation is commutative.
>
>
> So the sum of a
>
> sphere { <1,0,0>, 0.1 }
>
> and a
>
> sphere { <0,0,2>, 0.1 }
>
> would be a
>
> sphere { <0,0,0>, 0.2 }
>
> ???
>
> Now that's a really strange idea for combining shapes...
It would give a
sphere { <1,0,2>, 0.2 }
Generally, if you have a convex (see
http://mathworld.wolfram.com/Convex.html) solid A and skalar values x,y,
then x*A + y*A = (x+y)*A.
Note also that a translation of a set A by a vector t may be regarded as
a special sum {t}+A.
Achill
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Peter Popov wrote:
> On Wed, 23 Apr 2003 11:09:19 EDT, "Achill" <ach### [at] ma tum de> wrote:
>
>
>>Is there a (CSG-like?) possibility to create the vector sum of objects or at
>>least of simple solids?
>>
>>Thanks for your help.
>
>
> I have just written a number of macros to introduce sets in POV.
> Currently the macros include: AddToSet, DeleteFromSet, FindInSet,
> ElementsInSet, IntersectSets, UnionSets, DifferenceSets and a number
> of utility macros (PrintSet, SetToFile, SetFromFile etc.)
>
> I'll clean up the code and release them these days. I hope it helps
> your situation.
>
That sounds great!
I am very curious... :-)
Achill
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
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
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
In article <3EA### [at] ma tum de>, Achill <ach### [at] ma tum de>
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] earthlink net>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tag povray org
http://tag.povray.org/
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |