|
![](/i/fill.gif) |
Something like this:
======================================
texture {
gradient x
texture_map {
[0.2 pigment{Red}]
[0.4 pigment { Blue }]
[0.6 pigment { Yellow}]
[0.9 pigment{Green }]}
}
=======================================
But I couldn't undesrstand right the values that are before the pigment.
news:42b96cf9$1@news.povray.org...
> Hi Mike,
>
> And using more than two colors?
>
> I was reading the documentation about that. They say that:
> "When the gradient x function returns values from 0.0 to 0.3 the red
> highlighted texture is used. From 0.3 to 0.6 the texture identifier
> T_Wood11 is used. From 0.6 up to 0.9 a blend of T_Wood11 and a shiny
> DMFWood4 is used. From 0.9 on up only the shiny wood is used."
>
> I thought that number is used to divide the object in different parts, for
> exemple if your are using 3 colors you can put 1/3 before the pigment
> instead of the 1/2 that you've put the divide the object. But I obtain
> some strange results.
>
> ======================================
> texture {gradient x
> texture_map {[0.3 pigment {rgb <0,0,1>}]
> [0.6 pigment {rgb <1,0,0>}]
> [0.9 pigment { rgb <0, 1, 0>}] }
> //translate <-0.5,0,0> // move transition point to the origin
> scale 100 // scale up the texture_map
> translate <0.95/2,0,0> // move the transition point to half way
> ======================================
>
> Well, I'm not understanding it properly.
>
> Thanks for the anwers,
> Oleguer
>
>
> news:dCr### [at] econym demon co uk...
>> Wasn't it Oleguer Vilella who wrote:
>>>Hi again,
>>>
>>>Using this function:
>>>======================================
>>>#declare Blobs = function { f_blob2(x, y, z, 0.95, 4, 1.8, 1) }
>>>isosurface {
>>>function { Blobs(x, y, z) }
>>>max_gradient 6
>>>contained_by { sphere { 0, 9 } }
>>>scale 2
>>>rotate 75*y
>>>translate <0, 0, 0>
>>>pigment { color Blue }
>>>}
>>>======================================
>>>I've here two blobs situated along the y axis. Is it anyway to give a
>>>texture to the first and then giving another texture and color to the
>>>other
>>>using the function?
>>
>> You can't do it from the function itself, because the function only
>> thinks of the whole shape as a single primitive object. It doesn't know
>> that the resulting shape is going to look like two blobs.
>>
>> What you can do, is to use a texture_map to apply different textures, or
>> a pigment_map to apply different pigments to chosen regions of the
>> surface, like this:
>>
>> (The "0.95/2" I used is calculated to be half way to the blob separation
>> "0.95" specified in the first line.)
>>
>> #declare Blobs = function { f_blob2(x, y, z, 0.95, 4, 1.8, 1) }
>> isosurface {
>> function { Blobs(x, y, z) }
>> max_gradient 6
>> contained_by { sphere { 0, 9 } }
>> texture{gradient x
>> texture_map {[0.5 pigment {rgb <0,0,1>}]
>> [0.5 pigment {rgb <1,0,0>}]}
>> translate <-0.5,0,0> // move transition point to the origin
>> scale 100 // scale up the texture_map
>> translate <0.95/2,0,0> // move the transition point to half way
>> }
>> scale 2
>> rotate 75*y
>> translate <0, 0, 0>
>> }
>>
>>
>> Or
>>
>> pigment {gradient x
>> pigment_map {[0.5 rgb <0,0,1>]
>> [0.5 rgb <1,0,0>]}
>> translate <-0.5,0,0> // move transition point to the origin
>> scale 100 // scale up the texture_map
>> translate <0.95/2,0,0> // move the transition point to half way
>> }
>>
>> --
>> Mike Williams
>> Gentleman of Leisure
>
>
Post a reply to this message
|
![](/i/fill.gif) |