POV-Ray : Newsgroups : povray.general : Tiger stripes Server Time
15 Nov 2024 03:22:21 EST (-0500)
  Tiger stripes (Message 1 to 4 of 4)  
From: Barehunter
Subject: Tiger stripes
Date: 13 Dec 2004 15:40:00
Message: <web.41bdfe0417c6d1056f274f770@news.povray.org>
Hello. I am doing a picture of a white tiger. I almost have the body
complete. what is stumping me is doing the stripes. I started using
image_maps which seems to work. But I have to create each image_map picture
by hand. Is there any formulaic way to generate black stripes on a white
background using pigments or patterns? Thank you.


Post a reply to this message

From: Jim Charter
Subject: Re: Tiger stripes
Date: 13 Dec 2004 16:42:19
Message: <41be0cbb@news.povray.org>
Barehunter wrote:
> Hello. I am doing a picture of a white tiger. I almost have the body
> complete. what is stumping me is doing the stripes. I started using
> image_maps which seems to work. But I have to create each image_map picture
> by hand. Is there any formulaic way to generate black stripes on a white
> background using pigments or patterns? Thank you.
> 
> 
You use orthographic camera and apply any pigment pattern you want to a 
surface. The technique is used often in POV.
A classic example would be the water texture in:
http://www.irtc.org/ftp/pub/stills/1999-08-31/canyon.jpg

But one thing you might look at, that you might not ordinarily think of 
and  because it is much like drawing is the object pattern.  The trick 
is to generate a texture list where the layered textures use a 
transparent pigment for the outer part of the pattern

ie:

camera {
   orthographic
   location <0,0,-1>    // position & direction of view
   look_at  <0,0,0>
   right 1*x            // horizontal size of view
   up 1*y               // vertical size of view
}

#local Sd = seed(1234);
box {                  // this box fits exactly in view
   <-0.5, -0.5, 0>, <0.5, 0.5, 0>

   texture { finish { ambient 1 diffuse 0 } pigment { rgb <1, 1, 1> } }
   #local i=0;#while( i<20 )
         texture { finish { ambient 1 diffuse 0 }
                 pigment {
                         object {
                                 sphere { 0 .04*rand(Sd) }
                                 color rgbt 1
                                 color rgb <1,0,0>
                         }
                         translate <rand(Sd)-.5,rand(Sd)-.5,0>
                 }
         }
   #local i=i+1;#end
}


Post a reply to this message

From: Barehunter
Subject: Re: Tiger stripes
Date: 13 Dec 2004 17:15:01
Message: <web.41be13dc6aa2fefa6f274f770@news.povray.org>
> You use orthographic camera

snip

thanks for the suggestion. While the formula you put down is greek to me at
this point, I copy pasted it and tried it in it's own pov file. I got a
white surface with a bunch of red spots. Not exactly what I had in mind.
Thanks for the suggestion, thoiugh.


Post a reply to this message

From: Jim Charter
Subject: Re: Tiger stripes
Date: 13 Dec 2004 17:50:42
Message: <41be1cc2@news.povray.org>
Barehunter wrote:
>>You use orthographic camera
> 
> 
> snip
> 
> thanks for the suggestion. While the formula you put down is greek to me at
> this point, I copy pasted it and tried it in it's own pov file. I got a
> white surface with a bunch of red spots. Not exactly what I had in mind.
> Thanks for the suggestion, thoiugh.
> 
> 
The point is that you might arrange the spots or whatever's manually or 
with program loops to get the combined advange of manual control and 
programming loops.  My example used random locations for the spheres 
which generated the red shapes but you might equally have exerted more 
control:

camera {
   orthographic
   location <0,0,-1>    // position & direction of view
   look_at  <0,0,0>
   right 1*x            // horizontal size of view
   up 1*y               // vertical size of view
}

#local Sd = seed(1234);
box {                  // this box fits exactly in view
   <-0.5, -0.5, 0>, <0.5, 0.5, 0>

   texture { finish { ambient 1 diffuse 0 } pigment { rgb <1, 1, 1> } }
   #local i=1;#while( i<20 )
         texture { finish { ambient 1 diffuse 0 }
                 pigment {
                         object {
                                 sphere { 0 .01
					scale <1,50,1>
                                         translate < i*.05-.5,0,0>
                                 }
                                 color rgbt 1   //outside color
                                 color rgb <1-.02*i,0,0>   //inside color
                         }

                 }
         }
   #local i=i+1;#end
}

The object pattern creates a color shape where the object named, in this 
case a sphere, intersects with the surface being textured.  You can 
create several of these color shapes on the same surface by using each 
in its own texture which is then layered over the previous.  Layered 
textures work because part of the pigment can be made transparent and 
the underlaying colors show through.  I only mentioned it to you
because it might be useful for drawing a regular pattern such as stripes
where you would still have some control over placement of the shapes.


Post a reply to this message

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