 |
 |
|
 |
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Am 22.11.2016 um 09:43 schrieb Mike Horvath:
> On 11/22/2016 3:31 AM, clipka wrote:
>> 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)
>> )
>
> I think the last parameter should be atan2(x,z)*180/pi because atan2
> returns radians and convertLCH2RGB_R expects degrees.
I guess you're right about this one.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On 11/22/2016 4:44 AM, clipka wrote:
> Am 22.11.2016 um 09:43 schrieb Mike Horvath:
>> On 11/22/2016 3:31 AM, clipka wrote:
>>> 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)
>>> )
>>
>> I think the last parameter should be atan2(x,z)*180/pi because atan2
>> returns radians and convertLCH2RGB_R expects degrees.
>
> I guess you're right about this one.
>
I am also not sure if using atan2 is good, since that only covers 90
degrees, whereas the hue circle must use all 360 degrees.
Mike
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On 11/22/2016 7:59 PM, Mike Horvath wrote:
> On 11/22/2016 4:44 AM, clipka wrote:
>> Am 22.11.2016 um 09:43 schrieb Mike Horvath:
>>> On 11/22/2016 3:31 AM, clipka wrote:
>>>> 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)
>>>> )
>>>
>>> I think the last parameter should be atan2(x,z)*180/pi because atan2
>>> returns radians and convertLCH2RGB_R expects degrees.
>>
>> I guess you're right about this one.
>>
>
> I am also not sure if using atan2 is good, since that only covers 90
> degrees, whereas the hue circle must use all 360 degrees.
>
> Mike
Sorry. Disregard that. It works.
Mike
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Am 23.11.2016 um 02:11 schrieb Mike Horvath:
>> I am also not sure if using atan2 is good, since that only covers 90
>> degrees, whereas the hue circle must use all 360 degrees.
>>
>> Mike
>
> Sorry. Disregard that. It works.
That's the fun thing about `atan2(a,b)`: In contrast to `atan(a/b)` it
doesn't lose the information about the quadrant; it also avoids the
singularity at b=0 (provided a<>0).
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On 11/22/2016 3:31 AM, clipka wrote:
>> 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.
>
Using "min" all I got was a cube. Switching to "max" instead, I got a
shape... of some sort. I'm not sure it's the correct one. Check the
thread in p.b.i and tell me if the images show the same object.
http://news.povray.org/583548b6%40news.povray.org
Mike
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
I've attached the latest version of the script.
Mike
Post a reply to this message
Attachments:
Download 'cielch_color_solid_cylinder_isosurface.pov.txt' (9 KB)
|
 |
|  |
|  |
|
 |
|
 |
|  |
|
 |