POV-Ray : Newsgroups : povray.newusers : How to get preserve color through an intersection call? : Re: How to get preserve color through an intersection call? Server Time
4 Jul 2024 14:06:27 EDT (-0400)
  Re: How to get preserve color through an intersection call?  
From: Brad
Date: 3 Oct 2010 15:15:00
Message: <web.4ca8d5dc627fd6a8881e51860@news.povray.org>
Hi Alain,


> Whenever you use a difference or intersections, the various surfaces
> take the texture of the object that define THAT surface. The end of the
> cutouts thake their colouration from the sphere and their sides from the
> cylinders.


Ahh, I did not realize this. That fact helps a lot.



> You need to make your pierced shell, then place coloured and transparent
> pieces into the holes.
> You can make some sets of cutouts and give each the desided colouration.
> One red set, one green set and one blue set in your case.

I see that I must go this route now. Thanks.

>
> A side note: Why not let POV-Ray compute the end points of your
> cylinders? Just use a cylinder like this one:
> cylinder{0, 10*x, 0.5}

Does "10*x" simply mean <10,0,0>? I'm guessing so. I don't see how that would
make it all that much cleaner though because then I would have to determine the
rotation to place it where I wanted for each one and each cylinder would then
have more data specifying it than in my original case. Unless I misunderstand...


> Then, you rotate it to where you want it. This gives you a cleaner code.
> Also, when you have very small values like 5.66549845232e-15, you can
> replace them with 0 (zero), the difference is absolutely negligeable. In
> fact, usualy, any value smaller than 1e-6 can be changed to zero.

Yes, that's definitely true. But I generate the cylindrical syntax from a python
script that I wrote, and that is how it's outputted with no formatting. I could
make it cleaner and have it report 0 instead of these really small numbers, but
I wasn't intending to use the bunch_of_cylinders block as something that I
planned to read and change by hand anyway.

Thanks for your help! I'll make the changes after lunch and see how it looks!


Post a reply to this message

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