|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Here are the L*C*h(uv) functions I created. How do I turn them into
pigments?
Mike
Post a reply to this message
Attachments:
Download 'cielch_color_solid_cylinder_iso.pov.txt' (5 KB)
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Mike Horvath <mik### [at] gmailcom> wrote:
> Here are the L*C*h(uv) functions I created. How do I turn them into
> pigments?
>
> Mike
http://www.povray.org/documentation/view/3.6.1/378/
?
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On 11/21/2016 3:02 PM, Bald Eagle wrote:
> Mike Horvath <mik### [at] gmailcom> wrote:
>> Here are the L*C*h(uv) functions I created. How do I turn them into
>> pigments?
>>
>> Mike
>
> http://www.povray.org/documentation/view/3.6.1/378/
> ?
>
I have three separate functions for R, G and B.
#declare convertLCH2RGB_R = function(L,C,H)
{correctRGB1(funcXYZ2RGBb1(funcLAB2XYZb1(funcLCH2LABa1(L,C,H),funcLCH2LABa2(L,C,H),funcLCH2LABa3(L,C,H)),funcLAB2XYZb2(funcLCH2LABa1(L,C,H),funcLCH2LABa2(L,C,H),funcLCH2LABa3(L,C,H)),funcLAB2XYZb3(funcLCH2LABa1(L,C,H),funcLCH2LABa2(L,C,H),funcLCH2LABa3(L,C,H))),funcXYZ2RGBb2(funcLAB2XYZb1(funcLCH2LABa1(L,C,H),funcLCH2LABa2(L,C,H),funcLCH2LABa3(L,C,H)),funcLAB2XYZb2(funcLCH2LABa1(L,C,H),funcLCH2LABa2(L,C,H),funcLCH2LABa3(L,C,H)),funcLAB2XYZb3(funcLCH2LABa1(L,C,H),funcLCH2LABa2(L,C,H),funcLCH2LABa3(L,C,H))),funcXYZ2RGBb3(funcLAB2XYZb1(funcLCH2LABa1(L,C,H),funcLCH2LABa2(L,C,H),funcLCH2LABa3(L,C,H)),funcLAB2XYZb2(funcLCH2LABa1(L,C,H),funcLCH2LABa2(L,C,H),funcLCH2LABa3(L,C,H)),funcLAB2XYZb3(funcLCH2LABa1(L,C,H),funcLCH2LABa2(L,C,H),funcLCH2LABa3(L,C,H))))}
#declare convertLCH2RGB_G = function(L,C,H)
{correctRGB2(funcXYZ2RGBb1(funcLAB2XYZb1(funcLCH2LABa1(L,C,H),funcLCH2LABa2(L,C,H),funcLCH2LABa3(L,C,H)),funcLAB2XYZb2(funcLCH2LABa1(L,C,H),funcLCH2LABa2(L,C,H),funcLCH2LABa3(L,C,H)),funcLAB2XYZb3(funcLCH2LABa1(L,C,H),funcLCH2LABa2(L,C,H),funcLCH2LABa3(L,C,H))),funcXYZ2RGBb2(funcLAB2XYZb1(funcLCH2LABa1(L,C,H),funcLCH2LABa2(L,C,H),funcLCH2LABa3(L,C,H)),funcLAB2XYZb2(funcLCH2LABa1(L,C,H),funcLCH2LABa2(L,C,H),funcLCH2LABa3(L,C,H)),funcLAB2XYZb3(funcLCH2LABa1(L,C,H),funcLCH2LABa2(L,C,H),funcLCH2LABa3(L,C,H))),funcXYZ2RGBb3(funcLAB2XYZb1(funcLCH2LABa1(L,C,H),funcLCH2LABa2(L,C,H),funcLCH2LABa3(L,C,H)),funcLAB2XYZb2(funcLCH2LABa1(L,C,H),funcLCH2LABa2(L,C,H),funcLCH2LABa3(L,C,H)),funcLAB2XYZb3(funcLCH2LABa1(L,C,H),funcLCH2LABa2(L,C,H),funcLCH2LABa3(L,C,H))))}
#declare convertLCH2RGB_B = function(L,C,H)
{correctRGB3(funcXYZ2RGBb1(funcLAB2XYZb1(funcLCH2LABa1(L,C,H),funcLCH2LABa2(L,C,H),funcLCH2LABa3(L,C,H)),funcLAB2XYZb2(funcLCH2LABa1(L,C,H),funcLCH2LABa2(L,C,H),funcLCH2LABa3(L,C,H)),funcLAB2XYZb3(funcLCH2LABa1(L,C,H),funcLCH2LABa2(L,C,H),funcLCH2LABa3(L,C,H))),funcXYZ2RGBb2(funcLAB2XYZb1(funcLCH2LABa1(L,C,H),funcLCH2LABa2(L,C,H),funcLCH2LABa3(L,C,H)),funcLAB2XYZb2(funcLCH2LABa1(L,C,H),funcLCH2LABa2(L,C,H),funcLCH2LABa3(L,C,H)),funcLAB2XYZb3(funcLCH2LABa1(L,C,H),funcLCH2LABa2(L,C,H),funcLCH2LABa3(L,C,H))),funcXYZ2RGBb3(funcLAB2XYZb1(funcLCH2LABa1(L,C,H),funcLCH2LABa2(L,C,H),funcLCH2LABa3(L,C,H)),funcLAB2XYZb2(funcLCH2LABa1(L,C,H),funcLCH2LABa2(L,C,H),funcLCH2LABa3(L,C,H)),funcLAB2XYZb3(funcLCH2LABa1(L,C,H),funcLCH2LABa2(L,C,H),funcLCH2LABa3(L,C,H))))}
Actually, I can create a pigment already. But I don't know how to use
the functions in a isosurface or a parametric to make the 3D object the
pigment gets applied to, if possible.
Mike
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Mike,
FYI:
you define
#local VRGB = <funcXYZ2RGBb1(VXYZ.x,VXYZ.y,VXYZ.z),
funcXYZ2RGBb2(VXYZ.x,VXYZ.y,VXYZ.z), funcXYZ2RGBb3(VXYZ.x,VXYZ.y,VXYZ.z)>;
and then (re)define the same variable in the very next line:
#local VRGB = <funcRGB2RGBa1(VRGB.x,VRGB.y,VRGB.z),
funcRGB2RGBa2(VRGB.x,VRGB.y,VRGB.z), funcRGB2RGBa3(VRGB.x,VRGB.y,VRGB.z)>;
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On 11/21/2016 3:13 PM, Bald Eagle wrote:
> Mike,
>
> FYI:
>
> you define
> #local VRGB = <funcXYZ2RGBb1(VXYZ.x,VXYZ.y,VXYZ.z),
> funcXYZ2RGBb2(VXYZ.x,VXYZ.y,VXYZ.z), funcXYZ2RGBb3(VXYZ.x,VXYZ.y,VXYZ.z)>;
>
> and then (re)define the same variable in the very next line:
> #local VRGB = <funcRGB2RGBa1(VRGB.x,VRGB.y,VRGB.z),
> funcRGB2RGBa2(VRGB.x,VRGB.y,VRGB.z), funcRGB2RGBa3(VRGB.x,VRGB.y,VRGB.z)>;
>
>
>
The second function takes RGB as input and outputs RGB as well, so I
didn't rename the variable. You can change the variable name if that
suits you.
Mike
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On 11/21/2016 3:10 PM, Mike Horvath wrote:
> On 11/21/2016 3:02 PM, Bald Eagle wrote:
>> Mike Horvath <mik### [at] gmailcom> wrote:
>>> Here are the L*C*h(uv) functions I created. How do I turn them into
>>> pigments?
>>>
>>> Mike
>>
>> http://www.povray.org/documentation/view/3.6.1/378/
>> ?
>>
>
>
>
> I have three separate functions for R, G and B.
>
> #declare convertLCH2RGB_R = function(L,C,H)
>
{correctRGB1(funcXYZ2RGBb1(funcLAB2XYZb1(funcLCH2LABa1(L,C,H),funcLCH2LABa2(L,C,H),funcLCH2LABa3(L,C,H)),funcLAB2XYZb2(funcLCH2LABa1(L,C,H),funcLCH2LABa2(L,C,H),funcLCH2LABa3(L,C,H)),funcLAB2XYZb3(funcLCH2LABa1(L,C,H),funcLCH2LABa2(L,C,H),funcLCH2LABa3(L,C,H))),funcXYZ2RGBb2(funcLAB2XYZb1(funcLCH2LABa1(L,C,H),funcLCH2LABa2(L,C,H),funcLCH2LABa3(L,C,H)),funcLAB2XYZb2(funcLCH2LABa1(L,C,H),funcLCH2LABa2(L,C,H),funcLCH2LABa3(L,C,H)),funcLAB2XYZb3(funcLCH2LABa1(L,C,H),funcLCH2LABa2(L,C,H),funcLCH2LABa3(L,C,H))),funcXYZ2RGBb3(funcLAB2XYZb1(funcLCH2LABa1(L,C,H),funcLCH2LABa2(L,C,H),funcLCH2LABa3(L,C,H)),funcLAB2XYZb2(funcLCH2LABa1(L,C,H),funcLCH2LABa2(L,C,H),funcLCH2LABa3(L,C,H)),funcLAB2XYZb3(funcLCH2LABa1(L,C,H),funcLCH2LABa2(L,C,H),funcLCH2LABa3(L,C,H))))}
>
> #declare convertLCH2RGB_G = function(L,C,H)
>
{correctRGB2(funcXYZ2RGBb1(funcLAB2XYZb1(funcLCH2LABa1(L,C,H),funcLCH2LABa2(L,C,H),funcLCH2LABa3(L,C,H)),funcLAB2XYZb2(funcLCH2LABa1(L,C,H),funcLCH2LABa2(L,C,H),funcLCH2LABa3(L,C,H)),funcLAB2XYZb3(funcLCH2LABa1(L,C,H),funcLCH2LABa2(L,C,H),funcLCH2LABa3(L,C,H))),funcXYZ2RGBb2(funcLAB2XYZb1(funcLCH2LABa1(L,C,H),funcLCH2LABa2(L,C,H),funcLCH2LABa3(L,C,H)),funcLAB2XYZb2(funcLCH2LABa1(L,C,H),funcLCH2LABa2(L,C,H),funcLCH2LABa3(L,C,H)),funcLAB2XYZb3(funcLCH2LABa1(L,C,H),funcLCH2LABa2(L,C,H),funcLCH2LABa3(L,C,H))),funcXYZ2RGBb3(funcLAB2XYZb1(funcLCH2LABa1(L,C,H),funcLCH2LABa2(L,C,H),funcLCH2LABa3(L,C,H)),funcLAB2XYZb2(funcLCH2LABa1(L,C,H),funcLCH2LABa2(L,C,H),funcLCH2LABa3(L,C,H)),funcLAB2XYZb3(funcLCH2LABa1(L,C,H),funcLCH2LABa2(L,C,H),funcLCH2LABa3(L,C,H))))}
>
> #declare convertLCH2RGB_B = function(L,C,H)
>
{correctRGB3(funcXYZ2RGBb1(funcLAB2XYZb1(funcLCH2LABa1(L,C,H),funcLCH2LABa2(L,C,H),funcLCH2LABa3(L,C,H)),funcLAB2XYZb2(funcLCH2LABa1(L,C,H),funcLCH2LABa2(L,C,H),funcLCH2LABa3(L,C,H)),funcLAB2XYZb3(funcLCH2LABa1(L,C,H),funcLCH2LABa2(L,C,H),funcLCH2LABa3(L,C,H))),funcXYZ2RGBb2(funcLAB2XYZb1(funcLCH2LABa1(L,C,H),funcLCH2LABa2(L,C,H),funcLCH2LABa3(L,C,H)),funcLAB2XYZb2(funcLCH2LABa1(L,C,H),funcLCH2LABa2(L,C,H),funcLCH2LABa3(L,C,H)),funcLAB2XYZb3(funcLCH2LABa1(L,C,H),funcLCH2LABa2(L,C,H),funcLCH2LABa3(L,C,H))),funcXYZ2RGBb3(funcLAB2XYZb1(funcLCH2LABa1(L,C,H),funcLCH2LABa2(L,C,H),funcLCH2LABa3(L,C,H)),funcLAB2XYZb2(funcLCH2LABa1(L,C,H),funcLCH2LABa2(L,C,H),funcLCH2LABa3(L,C,H)),funcLAB2XYZb3(funcLCH2LABa1(L,C,H),funcLCH2LABa2(L,C,H),funcLCH2LABa3(L,C,H))))}
>
>
> Actually, I can create a pigment already. But I don't know how to use
> the functions in a isosurface or a parametric to make the 3D object the
> pigment gets applied to, if possible.
>
> Mike
Oops! You'll need to know these as well.
#declare correctRGB1 = function(R,G,B) {min(max(R,0),1)}
#declare correctRGB2 = function(R,G,B) {min(max(G,0),1)}
#declare correctRGB3 = function(R,G,B) {min(max(B,0),1)}
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On 11/21/2016 3:29 PM, Mike Horvath wrote:
> On 11/21/2016 3:10 PM, Mike Horvath wrote:
>> On 11/21/2016 3:02 PM, Bald Eagle wrote:
>>> Mike Horvath <mik### [at] gmailcom> wrote:
>>>> Here are the L*C*h(uv) functions I created. How do I turn them into
>>>> pigments?
>>>>
>>>> Mike
>>>
>>> http://www.povray.org/documentation/view/3.6.1/378/
>>> ?
>>>
>>
>>
>>
>> I have three separate functions for R, G and B.
>>
>> #declare convertLCH2RGB_R = function(L,C,H)
>>
{correctRGB1(funcXYZ2RGBb1(funcLAB2XYZb1(funcLCH2LABa1(L,C,H),funcLCH2LABa2(L,C,H),funcLCH2LABa3(L,C,H)),funcLAB2XYZb2(funcLCH2LABa1(L,C,H),funcLCH2LABa2(L,C,H),funcLCH2LABa3(L,C,H)),funcLAB2XYZb3(funcLCH2LABa1(L,C,H),funcLCH2LABa2(L,C,H),funcLCH2LABa3(L,C,H))),funcXYZ2RGBb2(funcLAB2XYZb1(funcLCH2LABa1(L,C,H),funcLCH2LABa2(L,C,H),funcLCH2LABa3(L,C,H)),funcLAB2XYZb2(funcLCH2LABa1(L,C,H),funcLCH2LABa2(L,C,H),funcLCH2LABa3(L,C,H)),funcLAB2XYZb3(funcLCH2LABa1(L,C,H),funcLCH2LABa2(L,C,H),funcLCH2LABa3(L,C,H))),funcXYZ2RGBb3(funcLAB2XYZb1(funcLCH2LABa1(L,C,H),funcLCH2LABa2(L,C,H),funcLCH2LABa3(L,C,H)),funcLAB2XYZb2(funcLCH2LABa1(L,C,H),funcLCH2LABa2(L,C,H),funcLCH2LABa3(L,C,H)),funcLAB2XYZb3(funcLCH2LABa1(L,C,H),funcLCH2LABa2(L,C,H),funcLCH2LABa3(L,C,H))))}
>>
>>
>> #declare convertLCH2RGB_G = function(L,C,H)
>>
{correctRGB2(funcXYZ2RGBb1(funcLAB2XYZb1(funcLCH2LABa1(L,C,H),funcLCH2LABa2(L,C,H),funcLCH2LABa3(L,C,H)),funcLAB2XYZb2(funcLCH2LABa1(L,C,H),funcLCH2LABa2(L,C,H),funcLCH2LABa3(L,C,H)),funcLAB2XYZb3(funcLCH2LABa1(L,C,H),funcLCH2LABa2(L,C,H),funcLCH2LABa3(L,C,H))),funcXYZ2RGBb2(funcLAB2XYZb1(funcLCH2LABa1(L,C,H),funcLCH2LABa2(L,C,H),funcLCH2LABa3(L,C,H)),funcLAB2XYZb2(funcLCH2LABa1(L,C,H),funcLCH2LABa2(L,C,H),funcLCH2LABa3(L,C,H)),funcLAB2XYZb3(funcLCH2LABa1(L,C,H),funcLCH2LABa2(L,C,H),funcLCH2LABa3(L,C,H))),funcXYZ2RGBb3(funcLAB2XYZb1(funcLCH2LABa1(L,C,H),funcLCH2LABa2(L,C,H),funcLCH2LABa3(L,C,H)),funcLAB2XYZb2(funcLCH2LABa1(L,C,H),funcLCH2LABa2(L,C,H),funcLCH2LABa3(L,C,H)),funcLAB2XYZb3(funcLCH2LABa1(L,C,H),funcLCH2LABa2(L,C,H),funcLCH2LABa3(L,C,H))))}
>>
>>
>> #declare convertLCH2RGB_B = function(L,C,H)
>>
{correctRGB3(funcXYZ2RGBb1(funcLAB2XYZb1(funcLCH2LABa1(L,C,H),funcLCH2LABa2(L,C,H),funcLCH2LABa3(L,C,H)),funcLAB2XYZb2(funcLCH2LABa1(L,C,H),funcLCH2LABa2(L,C,H),funcLCH2LABa3(L,C,H)),funcLAB2XYZb3(funcLCH2LABa1(L,C,H),funcLCH2LABa2(L,C,H),funcLCH2LABa3(L,C,H))),funcXYZ2RGBb2(funcLAB2XYZb1(funcLCH2LABa1(L,C,H),funcLCH2LABa2(L,C,H),funcLCH2LABa3(L,C,H)),funcLAB2XYZb2(funcLCH2LABa1(L,C,H),funcLCH2LABa2(L,C,H),funcLCH2LABa3(L,C,H)),funcLAB2XYZb3(funcLCH2LABa1(L,C,H),funcLCH2LABa2(L,C,H),funcLCH2LABa3(L,C,H))),funcXYZ2RGBb3(funcLAB2XYZb1(funcLCH2LABa1(L,C,H),funcLCH2LABa2(L,C,H),funcLCH2LABa3(L,C,H)),funcLAB2XYZb2(funcLCH2LABa1(L,C,H),funcLCH2LABa2(L,C,H),funcLCH2LABa3(L,C,H)),funcLAB2XYZb3(funcLCH2LABa1(L,C,H),funcLCH2LABa2(L,C,H),funcLCH2LABa3(L,C,H))))}
>>
>>
>>
>> Actually, I can create a pigment already. But I don't know how to use
>> the functions in a isosurface or a parametric to make the 3D object the
>> pigment gets applied to, if possible.
>>
>> Mike
>
> Oops! You'll need to know these as well.
>
> #declare correctRGB1 = function(R,G,B) {min(max(R,0),1)}
> #declare correctRGB2 = function(R,G,B) {min(max(G,0),1)}
> #declare correctRGB3 = function(R,G,B) {min(max(B,0),1)}
>
>
That is wrong. The RGB values should *not* be corrected. In fact, if any
of R, G or B are outside the range of 0 to 1, then the coordinate/color
should be discarded. Sorry!
Mike
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Am 21.11.2016 um 21:56 schrieb Mike Horvath:
>>> Actually, I can create a pigment already. But I don't know how to use
>>> the functions in a isosurface or a parametric to make the 3D object the
>>> pigment gets applied to, if possible.
>>>
>>> Mike
>>
>> Oops! You'll need to know these as well.
>>
>> #declare correctRGB1 = function(R,G,B) {min(max(R,0),1)}
>> #declare correctRGB2 = function(R,G,B) {min(max(G,0),1)}
>> #declare correctRGB3 = function(R,G,B) {min(max(B,0),1)}
>>
>>
>
> That is wrong. The RGB values should *not* be corrected. In fact, if any
> of R, G or B are outside the range of 0 to 1, then the coordinate/color
> should be discarded. Sorry!
So if I understand you correctly, the shape you want is exactly the
volume for which R, G and B are all within the range from 0 to 1.
That sounds like a job for an isosurface to me.
Variant A: Create six isosurfaces, each representing one of the
boundaries (R<0, G<0, B<0, R>1, G>1, B>1), and intersect them.
Variant B: Refactor the functions from variant A, so that they have the
same threshold, combine them using max() or min() to achieve the
intersection effect, and turn that into a single isosurface.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On 11/21/2016 4:23 PM, clipka wrote:
> Am 21.11.2016 um 21:56 schrieb Mike Horvath:
>
>>>> Actually, I can create a pigment already. But I don't know how to use
>>>> the functions in a isosurface or a parametric to make the 3D object the
>>>> pigment gets applied to, if possible.
>>>>
>>>> Mike
>>>
>>> Oops! You'll need to know these as well.
>>>
>>> #declare correctRGB1 = function(R,G,B) {min(max(R,0),1)}
>>> #declare correctRGB2 = function(R,G,B) {min(max(G,0),1)}
>>> #declare correctRGB3 = function(R,G,B) {min(max(B,0),1)}
>>>
>>>
>>
>> That is wrong. The RGB values should *not* be corrected. In fact, if any
>> of R, G or B are outside the range of 0 to 1, then the coordinate/color
>> should be discarded. Sorry!
>
> So if I understand you correctly, the shape you want is exactly the
> volume for which R, G and B are all within the range from 0 to 1.
>
Yes, exactly!
> That sounds like a job for an isosurface to me.
>
> Variant A: Create six isosurfaces, each representing one of the
> boundaries (R<0, G<0, B<0, R>1, G>1, B>1), and intersect them.
>
> Variant B: Refactor the functions from variant A, so that they have the
> same threshold, combine them using max() or min() to achieve the
> intersection effect, and turn that into a single isosurface.
>
I don't know how to do either variant. :(
Mike
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On 11/21/2016 9:33 PM, Mike Horvath wrote:
>> Variant B: Refactor the functions from variant A, so that they have the
>> same threshold,
How to cook a haggis:
First catch your Haggis then...
>
> I don't know how to do either variant. :(
Don't ya just love it when someone says "Simply..." ;)
--
Regards
Stephen
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|