POV-Ray : Newsgroups : povray.newusers : negative objects Server Time
13 Nov 2024 07:24:55 EST (-0500)
  negative objects (Message 1 to 7 of 7)  
From: Bill Brehm
Subject: negative objects
Date: 3 Nov 2000 21:04:00
Message: <3a036e90@news.povray.org>
Hi,

This one's hard for me to describe, so I hope the point get across.

I'd like to create an compound object that adds something to the scene, but
also removes something else from whatever it happens to intersect.

I guess I'll do it by example.

Say I make a golf course lawn. I want to add a bunch of holes with a golf
ball in each of them. I don't want have to use a difference object to create
the ground then specify the coordinates of each hole and then have to repeat
each coordinate to place the golf balls. I'd like to create a "golf ball in
a hole" object which when place in the ground would "drill a hole" in the
ground and then create a ball. If I decided to add some holes, I wouldn't
have to go back and modify two objects, the drilled ground and the group of
balls. If I decided to use this object inside the club house or on a golf
cart, it would drill the holes in those objects and add the balls.

Any ideas?

Thanks,

Bill


Post a reply to this message

From: Steve
Subject: Re: negative objects
Date: 3 Nov 2000 22:54:42
Message: <slrn907223.q2u.steve@zero-pps.localdomain>
On Fri, 3 Nov 2000 19:04:01 -0700, Bill Brehm wrote:
>Hi,
>
>This one's hard for me to describe, so I hope the point get across.
>
>I'd like to create an compound object that adds something to the scene, but
>also removes something else from whatever it happens to intersect.
>
>I guess I'll do it by example.
>
>Say I make a golf course lawn. I want to add a bunch of holes with a golf
>ball in each of them. I don't want have to use a difference object to create
>the ground then specify the coordinates of each hole and then have to repeat
>each coordinate to place the golf balls. I'd like to create a "golf ball in
>a hole" object which when place in the ground would "drill a hole" in the
>ground and then create a ball. If I decided to add some holes, I wouldn't
>have to go back and modify two objects, the drilled ground and the group of
>balls. If I decided to use this object inside the club house or on a golf
>cart, it would drill the holes in those objects and add the balls.

Nope.  You'll have to do it the way you thought you were going to 
have to do it, I don't think that there's any easier way.     

-- 
Cheers
Steve              email mailto:ste### [at] zeroppsuklinuxnet

%HAV-A-NICEDAY Error not enough coffee  0 pps. 

web http://www.zeropps.uklinux.net/

or  http://start.at/zero-pps

  3:41am  up 24 days,  6:03,  3 users,  load average: 1.02, 1.15, 1.16


Post a reply to this message

From: Gilles Tran
Subject: Re: negative objects
Date: 4 Nov 2000 05:06:31
Message: <3A03DF94.6551A46F@inapg.inra.fr>
Bill Brehm wrote:

> I'd like to create an compound object that adds something to the scene, but
> also removes something else from whatever it happens to intersect.

Like Steve said, there's no direct way to do this. However, you can make it a
little simpler by using an array.
#declare n=20;
#declare Pos=array[n]
#declare Pos[0]=<10,0,10>;
#declare Pos[1]=<14,0,11>;
...

#declare GolfBall=sphere{0,1}
//Then run a loop to put the golf balls
#declare i=0;#while (i<n) object{GolfBall translate Pos[i]} #declare i=i+1; #end

//and then another loop to make the ground
difference{
    plane{y,0}
    #declare i=0;#while (i<n) object{GolfBall scale 1.1 translate Pos[i]}
#declare i=i+1; #end
}

G.


Post a reply to this message

From: Tom Melly
Subject: Re: negative objects
Date: 4 Nov 2000 08:15:06
Message: <3a040bda@news.povray.org>
"Bill Brehm" <bbr### [at] netzeronet> wrote in message
news:3a036e90@news.povray.org...

Probably a macro is the best way to do this. I don't think there is a single
object that can do this (feature request?).


Post a reply to this message

From: Bill Brehm
Subject: Re: negative objects
Date: 4 Nov 2000 09:18:58
Message: <3a041ad2@news.povray.org>
How does one go about making feature requests? I have a few others besides
this one.

Bill


"Tom Melly" <tom### [at] tomandlucouk> wrote in message
news:3a040bda@news.povray.org...
> "Bill Brehm" <bbr### [at] netzeronet> wrote in message
> news:3a036e90@news.povray.org...
>
> Probably a macro is the best way to do this. I don't think there is a
single
> object that can do this (feature request?).
>
>


Post a reply to this message

From: Tom Melly
Subject: Re: negative objects
Date: 4 Nov 2000 19:27:56
Message: <3a04a98c@news.povray.org>
"Bill Brehm" <bbr### [at] netzeronet> wrote in message
news:3a041ad2@news.povray.org...
> How does one go about making feature requests? I have a few others besides
> this one.

general - but be prepared for a potentially rough ride if anyone thinks they
are ill-thought-out or already covered. ;)


Post a reply to this message

From: John VanSickle
Subject: Re: negative objects
Date: 7 Nov 2000 12:10:17
Message: <3A083775.DACE6D0@erols.com>
Tom Melly wrote:
> 
> "Bill Brehm" <bbr### [at] netzeronet> wrote in message
> news:3a036e90@news.povray.org...
> 
> Probably a macro is the best way to do this.

I don't think so.  But two loops, one for the holes and the other for
the balls, will do the job.

> I don't think there is a single object that can do this (feature
> request?).

It will probably be shot down.  The scene language is sufficiently
capable of the task.

Regards,
John


Post a reply to this message

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