POV-Ray : Newsgroups : povray.newusers : I Need Help With Media : Re: I Need Help With Media (small sample image) Server Time
2 Nov 2024 09:20:44 EDT (-0400)
  Re: I Need Help With Media (small sample image)  
From: Alain
Date: 17 May 2004 19:51:34
Message: <40a95006$1@news.povray.org>
Danny nous apporta ses lumieres ainsi en ce 2004/05/17 16:39... :

>Alain <aze### [at] qwertygov> wrote:
>  
>
>>Danny nous apporta ses lumieres ainsi en ce 2004/05/17 05:23... :
>>
>>    
>>
>>>Alain <aze### [at] qwertygov> wrote:
>>>
>>>
>>>
>>>I used exactly what you told me, and I got a cylinder with white edges that
>>>fades to nothing in the middle (without any red at all), and even those
>>>white edges disappear as the cylinder continues on.  I'm using POV-Ray 3.5,
>>>and here is the code I used:
>>>
>>>cylinder{<100,0,0>,<0,0,0>, .20
>>>        texture {
>>>   pigment { color rgbt 1}
>>>   finish{reflection 0}}
>>>      interior{media{emission rgb 1
>>>      density{ cylindrical
>>>      color_map{[0 rgb 0][0.5 rgb<1,0,0>][0.98 rgb 1][1 rgb 2]}
>>>      }}}
>>>      hollow
>>>      translate<0,0,2>
>>>      }
>>>
>>>Can you tell me what I'm doing wrong, and how to fix it?
>>>
>>>
>>>
>>>      
>>>
>>Set the radius of the cylinder to 1, then rescale it by scale<.2,1,.2>
>>just before you rotate it.
>>You don't need to set finish{reflection 0}}, it's the default value.
>>Set your cylinder verticaly, as it's the orientation of the cylindrical
>>pattern, then rotate the whole thing.
>>...
>>scale<0.2, 1, 0.2>
>>rotate -90*z
>>translate<0, 0, 2>
>>}// that's the last brace
>>
>>Alain
>>    
>>
>
>OK, now it looks good when I don't scale it, but scaling it seems to mess it
>up.
>When I scale it up it still seems to look OK, except the inner white part
>has become enlarged disproportionately.  But when I scale it down, I lose
>the white part completely, and all I have is a very dimly red cylinder.
>Can you explain why it's doing this and how I can make it scale down right?
>
>  
>
Try lowering the 0.98 to a smaler value, thus enlarging the central 
part. As it is now, the white center part only have a radius of 0.02 
units and may disappears when scaled down or if the image is generated 
at a low resolution.
Don't scale only the media but the whole cylinder containing the media.

Alain


Post a reply to this message

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