POV-Ray : Newsgroups : povray.newusers : Creating Polyhedra with different colors for the faces Server Time
29 Jul 2024 10:20:54 EDT (-0400)
  Creating Polyhedra with different colors for the faces (Message 1 to 10 of 10)  
From: Philip
Subject: Creating Polyhedra with different colors for the faces
Date: 28 Mar 2006 09:55:00
Message: <web.44294e1a3cedcf6deb0084670@news.povray.org>
Hi,

first of all, i'm very new to Pov Ray ;)


Well, I'm trying to render Polyhedra and want the faces to have different
colors.
At the moment I render my polyhedra as intersection of halfspaces, which
works fine.
The question is, how can I give each Face a certain color?

Can someone help?

Thanks in advance,
Philip


Post a reply to this message

From: Warp
Subject: Re: Creating Polyhedra with different colors for the faces
Date: 28 Mar 2006 10:10:09
Message: <442951d1@news.povray.org>
Philip <Phi### [at] yahoocom> wrote:
> At the moment I render my polyhedra as intersection of halfspaces, which
> works fine.

  I don't know what a halfspace is, but if you give each one its own
pigment, it should do what you want.

-- 
                                                          - Warp


Post a reply to this message

From: Philip
Subject: Re: Creating Polyhedra with different colors for the faces
Date: 28 Mar 2006 10:45:00
Message: <web.44295906246859f5e8c60c9f0@news.povray.org>
Warp <war### [at] tagpovrayorg> wrote:
> Philip <Phi### [at] yahoocom> wrote:
> > At the moment I render my polyhedra as intersection of halfspaces, which
> > works fine.
>
>   I don't know what a halfspace is, but if you give each one its own
> pigment, it should do what you want.
>
> --
>                                                           - Warp

Hi,

since I use the intersection command with planes, i can't give each plane
it's own color(what would solve my problem, i think).I've tried that, and
got back an error :(

thanks anyway


Post a reply to this message

From: Roman Reiner
Subject: Re: Creating Polyhedra with different colors for the faces
Date: 28 Mar 2006 10:55:00
Message: <web.44295c25246859f581d8be9d0@news.povray.org>
"Philip" <Phi### [at] yahoocom> wrote:
> Hi,
>
> since I use the intersection command with planes, i can't give each plane
> it's own color(what would solve my problem, i think).I've tried that, and
> got back an error :(
>
> thanks anyway

And what did the error say? It should work as Warp suggested

intersection {
  plane {
    ...
    pigment { ... }
  }
  plane {
    ...
    pigment { ... }
  }
  plane {
    ...
    pigment { ... }
  }
  ...
}

Regards Roman


Post a reply to this message

From: Philip
Subject: Re: Creating Polyhedra with different colors for the faces
Date: 28 Mar 2006 11:15:01
Message: <web.4429606e246859f5e8c60c9f0@news.povray.org>
Well, it DID work,

I tried to write a comma between the distance and the pigment command.
Sorry for bothering.

Thanks a lot,
Philip


Post a reply to this message

From: Txemi Jendrix
Subject: Re: Creating Polyhedra with different colors for the faces
Date: 29 Mar 2006 15:39:46
Message: <442af091@news.povray.org>
Roman Reiner wrote:

> "Philip" <Phi### [at] yahoocom> wrote:
>> Hi,
>>
>> since I use the intersection command with planes, i can't give each plane
>> it's own color(what would solve my problem, i think).I've tried that, and
>> got back an error :(
Why not use a difference to obtain the results you want?
Using your sample:
> [snip]

difference {
box {
  ...
     pigment { ... } // doesn't matter what

plane {
  ...
     pigment { ... }
   }
   plane {
     ...
     pigment { ... }
   }
   plane {
     ...
     pigment { ... }
   }
   ...
 }

I didn't try it, it's a thought.

> intersection {
>   plane {
>     ...
>     pigment { ... }
>   }
>   plane {
>     ...
>     pigment { ... }
>   }
>   plane {
>     ...
>     pigment { ... }
>   }
>   ...
> }
> 
> Regards Roman

Bye
-- 
Txemi Jendrix.
Povray and CG: www.txemijendrix.com
Music: www.losmiercoles.net


Post a reply to this message

From: Roman Reiner
Subject: Re: Creating Polyhedra with different colors for the faces
Date: 29 Mar 2006 17:00:00
Message: <web.442b02c2246859f576d9909d0@news.povray.org>
This would work as well and leads to the same result but your version needs
one unnecessary object more (the box) and is therefore slightly slower.
Shouldn't play a role with such a simple object though.

Regards Roman


Post a reply to this message

From: Warp
Subject: Re: Creating Polyhedra with different colors for the faces
Date: 30 Mar 2006 02:46:47
Message: <442b8ce7@news.povray.org>
Txemi Jendrix <txe### [at] nospamcom> wrote:
> Why not use a difference to obtain the results you want?

  Why? What would be the advantage?

-- 
                                                          - Warp


Post a reply to this message

From: Txemi Jendrix
Subject: Re: Creating Polyhedra with different colors for the faces
Date: 31 Mar 2006 08:33:30
Message: <442d2fa9@news.povray.org>
Warp wrote:

> Txemi Jendrix <txe### [at] nospamcom> wrote:
>> Why not use a difference to obtain the results you want?
> 
>   Why? What would be the advantage?
> 

This is what Philip told us about his problem:

"since I use the intersection command with planes, 
i can't give each plane it's own color(what would 
solve my problem, i think).I've tried that, and
got back an error :("

I was trying to give him an alternative.

I know there is no advantage.
-- 
Txemi Jendrix.
Povray and CG: www.txemijendrix.com
Music: www.losmiercoles.net


Post a reply to this message

From: Txemi Jendrix
Subject: Re: Creating Polyhedra with different colors for the faces
Date: 31 Mar 2006 08:34:19
Message: <442d2fda@news.povray.org>
Roman Reiner wrote:

> This would work as well and leads to the same result but your version
> needs one unnecessary object more (the box) and is therefore slightly
> slower. Shouldn't play a role with such a simple object though.
> 
> Regards Roman

Look my response to Warp
-- 
Txemi Jendrix.
Povray and CG: www.txemijendrix.com
Music: www.losmiercoles.net


Post a reply to this message

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