POV-Ray : Newsgroups : povray.newusers : Only render intersections from list of objects Server Time
21 Dec 2024 23:53:12 EST (-0500)
  Only render intersections from list of objects (Message 1 to 8 of 8)  
From: qox
Subject: Only render intersections from list of objects
Date: 16 Apr 2014 11:45:00
Message: <web.534ea46d8ab2cb8c24f12bd0@news.povray.org>
I can't think of a way to achieve this.

All my objects (let's say spheres) are in a file, that I can render with

union
{
   #include OBJECTS_FILE
}

But I'd like to render only intersections between 2 (or more) spheres.

intersection
{
   #include OBJECTS_FILE
}
wouldn't work since it renders the intersection bewteen ALL objects.

Can povray do that ?

Thanks for your help


Post a reply to this message

From: Le Forgeron
Subject: Re: Only render intersections from list of objects
Date: 16 Apr 2014 14:15:34
Message: <534ec8c6$1@news.povray.org>
Le 16/04/2014 17:40, qox nous fit lire :
> I can't think of a way to achieve this.
> 
> All my objects (let's say spheres) are in a file, that I can render with
> 
> union
> {
>    #include OBJECTS_FILE
> }
> 
> But I'd like to render only intersections between 2 (or more) spheres.
> 
> intersection
> {
>    #include OBJECTS_FILE
> }
> wouldn't work since it renders the intersection bewteen ALL objects.
> 
> Can povray do that ?

No. But I have a patch that can.

It would be a interunion (or intermerge). Yet to be documented, but
functional.

interunion {
 #include OBJECTS_FILE
  range{ <2,-1> }
}


Post a reply to this message

From: Stephen
Subject: Re: Only render intersections from list of objects
Date: 16 Apr 2014 14:39:38
Message: <534ece6a$1@news.povray.org>
On 16/04/2014 7:15 PM, Le_Forgeron wrote:
> Yet to be documented, but
> functional.

Want a job at a famous printer company, with me?
You would fit right in. :-P


-- 
Regards
     Stephen

I solemnly promise to kick the next angle, I see.


Post a reply to this message

From: Le Forgeron
Subject: Re: Only render intersections from list of objects
Date: 16 Apr 2014 14:55:10
Message: <534ed20e@news.povray.org>
Le 16/04/2014 20:39, Stephen nous fit lire :
> On 16/04/2014 7:15 PM, Le_Forgeron wrote:
>> Yet to be documented, but
>> functional.
> 
> Want a job at a famous printer company, with me?
> You would fit right in. :-P
> 
> 
Alas, too late.

See it at >
http://wiki.povray.org/content/User:Le_Forgeron#GSD_:_Generalised_Symetric_Difference

Source code as usual in repository:

Git: https://github.com/LeForgeron/Hgpovray
Mercurial: https://bitbucket.org/LeForgeron/hgpovray


Post a reply to this message

From: Warp
Subject: Re: Only render intersections from list of objects
Date: 16 Apr 2014 15:05:08
Message: <534ed464@news.povray.org>
Le_Forgeron <jgr### [at] freefr> wrote:
> Le 16/04/2014 17:40, qox nous fit lire :
> > I can't think of a way to achieve this.
> > 
> > All my objects (let's say spheres) are in a file, that I can render with
> > 
> > union
> > {
> >    #include OBJECTS_FILE
> > }
> > 
> > But I'd like to render only intersections between 2 (or more) spheres.
> > 
> > intersection
> > {
> >    #include OBJECTS_FILE
> > }
> > wouldn't work since it renders the intersection bewteen ALL objects.
> > 
> > Can povray do that ?

> No. But I have a patch that can.

> It would be a interunion (or intermerge). Yet to be documented, but
> functional.

> interunion {
>  #include OBJECTS_FILE
>   range{ <2,-1> }
> }

For some reason I can't make heads or tails of either the question or
the answer. (Also, I haven't the slightest clue what the "<2,-1>" above
is supposed to signify.)

-- 
                                                          - Warp


Post a reply to this message

From: Le Forgeron
Subject: Re: Only render intersections from list of objects
Date: 16 Apr 2014 15:14:23
Message: <534ed68f$1@news.povray.org>
Le 16/04/2014 21:05, Warp nous fit lire :
> Le_Forgeron <jgr### [at] freefr> wrote:
>> interunion {
>>  #include OBJECTS_FILE
>>   range{ <2,-1> }
>> }
> 
> For some reason I can't make heads or tails of either the question or
> the answer. (Also, I haven't the slightest clue what the "<2,-1>" above
> is supposed to signify.)
> 

the question, if I got it right, was: assume a set of objects that might
intersect (by pair, not with every other...), can we display not the
objects but only their overlapping volumes, even the ones which are only
from two objects of the set.

the range <2,-1> is the specification for the answer: keep all
intersection points that are inside 2 or more objects.
( -1 is a way to specify all objects, without having to counting them).

(<1,-1> is a classical union, but union would then be faster)


Post a reply to this message

From: Stephen
Subject: Re: Only render intersections from list of objects
Date: 16 Apr 2014 16:11:23
Message: <534ee3eb$1@news.povray.org>
On 16/04/2014 7:55 PM, Le_Forgeron wrote:
> Alas, too late.

Everyone needs a nudge, now and again. :-)

The results look interesting. :-D

-- 
Regards
     Stephen

I solemnly promise to kick the next angle, I see.


Post a reply to this message

From: qox
Subject: Re: Only render intersections from list of objects
Date: 17 Apr 2014 04:50:01
Message: <web.534f951150dd051624f12bd0@news.povray.org>
Le_Forgeron <jgr### [at] freefr> wrote:
> the question, if I got it right, was: assume a set of objects that might
> intersect (by pair, not with every other...), can we display not the
> objects but only their overlapping volumes, even the ones which are only
> from two objects of the set.
>
> the range <2,-1> is the specification for the answer: keep all
> intersection points that are inside 2 or more objects.
> ( -1 is a way to specify all objects, without having to counting them).
>
> (<1,-1> is a classical union, but union would then be faster)

Thanks, this is exactly what I asked for, only better phrased...
Sadly, I have no idea how to apply a patch, so I can't test it.

some code (c++) that fails to do so. I'm better off looking into povray's
source..


Post a reply to this message

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