POV-Ray : Newsgroups : povray.text.scene-files : L*C*h(uv) functions : Re: L*C*h(uv) functions Server Time
23 Apr 2024 04:42:36 EDT (-0400)
  Re: L*C*h(uv) functions  
From: clipka
Date: 22 Nov 2016 03:31:26
Message: <5834025e$1@news.povray.org>
Am 22.11.2016 um 08:45 schrieb Mike Horvath:
> On 11/22/2016 2:44 AM, clipka wrote:
>> Am 22.11.2016 um 08:33 schrieb Mike Horvath:
>>
>>>>     convertLCH2RGB_R(y*200-100,sqrt(x*x+z*z)*100,atan2(x/z)*pi/180)
>>
>>> THANK YOU!!
>>>
>>> However atan2 requires two parameters and your math only has one.
>>
>> Sorry, try atan2(x,z).
>>
> 
> Here is the whole file again with your changes. The shape I get when I
> render is that of a pointy cap. I don't know if that's correct or not.

How would I know -- I'm not familiar with that colour model.

Now you need to intersect that shape with the five others -- or use the
combined function:

    min(
      convertLCH2RGB_R(y*200-100,sqrt(x*x+z*z)*100,atan2(x,z)*pi/180),
      convertLCH2RGB_G(y*200-100,sqrt(x*x+z*z)*100,atan2(x,z)*pi/180),
      convertLCH2RGB_B(y*200-100,sqrt(x*x+z*z)*100,atan2(x,z)*pi/180),
      1-convertLCH2RGB_R(y*200-100,sqrt(x*x+z*z)*100,atan2(x,z)*pi/180),
      1-convertLCH2RGB_G(y*200-100,sqrt(x*x+z*z)*100,atan2(x,z)*pi/180),
      1-convertLCH2RGB_B(y*200-100,sqrt(x*x+z*z)*100,atan2(x,z)*pi/180)
    )

should do the job, I think.


Post a reply to this message

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