POV-Ray : Newsgroups : povray.newusers : (vector) sum of two objects : Re: (vector) sum of two objects Server Time
31 Jul 2024 10:18:37 EDT (-0400)
  Re: (vector) sum of two objects  
From: Christopher James Huff
Date: 24 Apr 2003 14:34:50
Message: <cjameshuff-E8C94E.14344324042003@netplex.aussie.org>
In article <h32gavo8csv7vcgefdsi0fl3ei8orr0cdq@4ax.com>,
 ABX <abx### [at] abxartpl> wrote:

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

Oh, sorry about that then.


> 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 ;-)

The TAG does not have any exclusive rights on giving help. ;-)

Anyway, I've been assuming he wants a general "sum" object similar to 
the CSG union object. In this case, a way of finding an intersection 
between a ray and the sum of the objects is necessary. The given 
descriptions involve adding points on the objects together to get new 
points, but POV doesn't have those points in the first place, it finds 
them as necessary using object-specific methods. The original poster 
asked about insideness testing...each object has a function that can 
determine if a given point is inside it, which doesn't seem at all 
helpful for this.

It might be possible to find a large enough number of points do get fair 
approximations of the surfaces by randomly tracing rays at the objects. 
You could then operate on these point fields and either patch POV to 
render them directly (there are algorithms for directly raytracing point 
fields) or convert them into a mesh. I'm not sure how good the results 
will look, and you will need to handle a *lot* of points. The original 
poster seems to be expecting something more like a CSG operation, which 
is just impossible as far as I can tell. The macro mentioned can do it, 
but it was created by hand...I see no way of telling a program to 
combine arbitrary shapes and get a composite of several objects of 
different types (spheres, boxes, and cylinders in this case) as a result.

-- 
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

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