









 
 




 
 


I want to use the "f_r" function to color a sphere from black (inner) to
white (outer). However, there needs to be a hole in the center equal to
1/7 of the sphere's radius, and the gradient must start at this location
instead of the sphere's exact center.
Here is what I have:
pigment
{
function {f_r(x,y,z) * 6/7 + 1/7}
pigment_map
{
[0 color srgb 0]
[1 color srgb 1]
}
}
But the results are not correct.
How do I accomplish this? Thanks!
Mike
Post a reply to this message


 
 




 
 


Le 170308 Ã 19:45, Mike Horvath a Ã©crit :
> I want to use the "f_r" function to color a sphere from black (inner) to
> white (outer). However, there needs to be a hole in the center equal to
> 1/7 of the sphere's radius, and the gradient must start at this location
> instead of the sphere's exact center.
>
> Here is what I have:
>
> pigment
> {
> function {f_r(x,y,z) * 6/7 + 1/7}
> pigment_map
> {
> [0 color srgb 0]
> [1 color srgb 1]
> }
> }
>
> But the results are not correct.
>
> How do I accomplish this? Thanks!
>
>
> Mike
function {f_r(x,y,z)}
pigment_map{
[1/7 rgbt 1] // optionnal
[1/7 srgb 0]
[1 srgb 1]
}
Fully transparent from the center up to 1/7 th of the radius.
Then, black at 1/7 th of the radius.
Finally, gradually fade to white.
Post a reply to this message


 
 




 
 


On 3/9/2017 11:31 AM, Alain wrote:
> Le 170308 Ã 19:45, Mike Horvath a Ã©crit :
>> I want to use the "f_r" function to color a sphere from black (inner) to
>> white (outer). However, there needs to be a hole in the center equal to
>> 1/7 of the sphere's radius, and the gradient must start at this location
>> instead of the sphere's exact center.
>>
>> Here is what I have:
>>
>> pigment
>> {
>> function {f_r(x,y,z) * 6/7 + 1/7}
>> pigment_map
>> {
>> [0 color srgb 0]
>> [1 color srgb 1]
>> }
>> }
>>
>> But the results are not correct.
>>
>> How do I accomplish this? Thanks!
>>
>>
>> Mike
>
> function {f_r(x,y,z)}
> pigment_map{
> [1/7 rgbt 1] // optionnal
> [1/7 srgb 0]
> [1 srgb 1]
> }
>
> Fully transparent from the center up to 1/7 th of the radius.
> Then, black at 1/7 th of the radius.
> Finally, gradually fade to white.
Thanks! That works.
Mike
Post a reply to this message


 
 




 

