POV-Ray : Newsgroups : povray.newusers : (vector) sum of two objects Server Time
31 Jul 2024 06:23:47 EDT (-0400)
  (vector) sum of two objects (Message 33 to 42 of 52)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: Achill
Subject: Re: (vector) sum of two objects
Date: 24 Apr 2003 15:45:28
Message: <3EA83EBD.7030302@ma.tum.de>
ABX wrote:
> 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


Actually I was interested in the general possibility of suming up 
objects, so rather in METHOD. The general interest grew out of some 
special RESULTS, as for example adding a sphere to a polytope. This can 
be achieved with unions (merges) of plane intersections, cylinders and 
spheres.

Achill


Post a reply to this message

From: Achill
Subject: Re: (vector) sum of two objects
Date: 24 Apr 2003 15:45:30
Message: <3EA83EBF.1070000@ma.tum.de>
Christopher James Huff wrote:
> 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.
> 

Knowing now that inside and outside are determined by an individual 
"hard-coded" algorithm, I see why there is propably no way (at least 
none I can think of) to write a general sum for objects.

Thank you very much for your patience and helpful explanations.

Achill


Post a reply to this message

From: Alan Walkington
Subject: Re: (vector) sum of two objects
Date: 24 Apr 2003 15:50:12
Message: <3ea83ff4@news.povray.org>
This might actually be approximated in the following manner:

Given a sphere (A) and a cube(B) in CSG, normalise them at <0,0,0>.and
construct a mesh equivilent for each. Create an alogrithm that, for each
vertice in A, finds an equivelant vertice (or set of vertices) in B and
builds a new mesh using these results.  If I am visualing this properly,
this might give the effect of a 'rounded cube' for this example.

--
Alan Walkington
Technical Staff
United Defense, San Jose


"Achill" <ach### [at] matumde> wrote in message
news: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: Achill
Subject: Re: (vector) sum of two objects
Date: 24 Apr 2003 16:04:29
Message: <3EA84332.50203@ma.tum.de>
Alan Walkington wrote:
> This might actually be approximated in the following manner:
> 
> Given a sphere (A) and a cube(B) in CSG, normalise them at <0,0,0>.and
> construct a mesh equivilent for each. Create an alogrithm that, for each
> vertice in A, finds an equivelant vertice (or set of vertices) in B and
> builds a new mesh using these results.  If I am visualing this properly,
> this might give the effect of a 'rounded cube' for this example.

Adding mesh approximations of solids should be possible, like adding 
polytopes. The "vertices" and some more useless points (which have to be 
excluded, for example with the help of a "convex hull algorithm") are 
given by all possible sums of vertices from the input sets.

That seems to be a bigger project though... :-)

Achill


Post a reply to this message

From: Alan Walkington
Subject: Re: (vector) sum of two objects
Date: 24 Apr 2003 16:40:25
Message: <3ea84bb9$1@news.povray.org>
"Achill" <ach### [at] matumde> wrote in message
news:3EA### [at] matumde...
<snip>
> Adding mesh approximations of solids should be possible, like adding
> polytopes. The "vertices" and some more useless points (which have to be
> excluded, for example with the help of a "convex hull algorithm") are
> given by all possible sums of vertices from the input sets.
>
> That seems to be a bigger project though... :-)
>
Bigger than what?

You are suggesting to create a "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".

Aren't there an infinite number of points within a solid, or for that
matter, on the surface of a solid?
That sounds like a pretty big project to me. ...

You will have to use some approximation ... some definition of a smallest
cell .. to give yourself a finite number of points within the solid.  A mesh
is just doing that to the surface rather than the volume. How is that more
complicated?

Alan


Post a reply to this message

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

> Converting arbitrary point sets into meshes or surfaces is a difficult 
> task (known as "surface reconstruction"). Are there algorithms for this 
> task used with (or in) povray?

I am aware of the difficulties, but there don't seem to be many 
alternatives...as far as I can tell, you would only be able to use the 
vertex information and would get a field of points, losing all 
"connectivity" information. POV does not use any algorithms like this 
and they would probably be difficult and slow to implement in the scene 
description language. As I mentioned, it is possible to test rays 
against a point field instead...this may be a better idea, but would 
require implementing a point field primitive for POV.

-- 
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: 25 Apr 2003 03:08:17
Message: <3EA8DEC5.7000403@ma.tum.de>
Alan Walkington wrote:
> "Achill" <ach### [at] matumde> wrote in message
> news:3EA### [at] matumde...
> <snip>
> 
>>Adding mesh approximations of solids should be possible, like adding
>>polytopes. The "vertices" and some more useless points (which have to be
>>excluded, for example with the help of a "convex hull algorithm") are
>>given by all possible sums of vertices from the input sets.
>>
>>That seems to be a bigger project though... :-)
>>
> 
> Bigger than what?

I guess it would take some time to implement and develop corresponding 
algorithms for meshes (with certain nice properties). So it is "bigger" 
than anything that I could realize within the next few years...



> You are suggesting to create a "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".

That was only a very special example of a "sum of two sets".



> Aren't there an infinite number of points within a solid, or for that
> matter, on the surface of a solid?
> That sounds like a pretty big project to me. ...

That is why I suggested to use an approximation with meshes.


> You will have to use some approximation ... some definition of a smallest
> cell .. to give yourself a finite number of points within the solid.  A mesh
> is just doing that to the surface rather than the volume. How is that more
> complicated?

Mesh approximations of the surface of a solid is all you need to build 
an approximation of the sum. This is not "more complicated". It is the 
only idea I have for the moment, which could lead to a general sum 
(approximation) of solids. Might be an illusion...?!?

Achill


Post a reply to this message

From: ABX
Subject: Re: (vector) sum of two objects
Date: 25 Apr 2003 03:30:02
Message: <5johavcb3rjtc792kr1v29f36h5sf5r3q4@4ax.com>
On Thu, 24 Apr 2003 21:45:00 +0200, Achill <ach### [at] matumde> wrote:
> Converting arbitrary point sets into meshes or surfaces is a difficult 
> task (known as "surface reconstruction"). Are there algorithms for this 
> task used with (or in) povray?

If your set are "contignous" subsets of 3D space and you can express that set
with some function where for elements (coordinates) from set this functions
gives negative value then you can use isosurface{} object. parametric{} object
can be also in area of your interest.

ABX


Post a reply to this message

From:
Subject: Re: (vector) sum of two objects
Date: 25 Apr 2003 06:56:45
Message: <3ea9146d$1@news.povray.org>
The convex hull would be correct for convex objects only. Used for the
Minkowski sum of a torus and a sphere, this would give a rounded disk,
not a "rounded torus", because the hole of the torus would be eliminated
by the construction of the convex hull.

   Sputnik


--
-------------------------------------

e-mail: fr### [at] computermuseumfh-kielde
-------------------------------------


Post a reply to this message

From:
Subject: Re: (vector) sum of two objects
Date: 25 Apr 2003 07:01:26
Message: <3ea91586$1@news.povray.org>
The same concept is used for pen styles in 2D drawing programs: the center
of the pen is moved along a path, and all points reachable with the pen
shape from the current location on this path are painted with the drawing
color, i.e. all painted points are obtained by location_vector+shape_vector
for all possible location_vectors and shape_vectors.

A practical application of the Minkowski sum would be as a *great* morphing
device. For example

  minkowski_sum {
    object { StartObject scale 1-clock }
    object { FinalObject scale   clock }
    }

would give a smooth transition from StartObject to FinalObject. The
transition could be controlled by more complex blending functions. Given
blending functions, usually with Blend(0)=0 and Blend(1)=1 or even
Blend(0)=<0,0,0> and Blend(1)=<1,1,1>, I'm dreaming of

  minkowski { StartObject*(1-Blend1(clock)) + FinalObject*Blend2(clock) }

Another interesting effect would be

  minkowski { BaseObject + object { PaddingObject rotate Rotation(clock) } }

At least for meshes this should be possible, especially for convex shapes.


   Sputnik


--
-------------------------------------

e-mail: fr### [at] computermuseumfh-kielde
-------------------------------------


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.