![](/i/fill.gif) |
![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
I'm working on a US Flag texture. I've been able to get 48 stars using a repeat
warp and a macro Chris Colefax offered some time back for a star texture
(sorry... can't find the post).
Any ideas on how to get the 50 stars in the 5 6's, 4 5's pattern? I've included
my repeat statement for reference.
Stars should look like:
* * * * * *
* * * * *
* * * * * *
* * * * *
* * * * * *
* * * * *
* * * * * *
* * * * *
* * * * * *
Repeat warp currently used:
#declare OldGloryBlue = rgb <0,40,104> / 255;
#declare P_USAStars =
pigment
{
star_pigment(5, 40, pigment_map
{
[0 OldGloryBlue]
[0.00001 White]
})
translate <1,1,0>
warp { repeat x * 3 }
warp { repeat y * 2.75 }
scale StarDia / 2
translate 6 * Stripe * y + <0.5,0.4,0> * StarDia
}
This isn't terribly accurate, but it works. For 48 stars. And I need 50 :-)
BTW, there is a black border around the flag and between the stripes and around
the union. This will be adjustable in the final pattern.
Thanks all,
Michael
--
#macro M(D,J)text{ttf"cyrvetic.ttf"D 1,0translate-J}#end#macro N(E,K)#local A=
M(E,K)light_source{-z*30rgb 1projected_through{A}}#end N("Michael"<1.6,-.2,5>)
N("Johnson"<1.9.8,5>)sphere{z*9,4pigment{gradient x+y scale 10color_map{[0 rgb
x][1rgb x+y]}sine_wave}} // (c)2001 Michael D Johnson red### [at] wv adelphia net
Post a reply to this message
Attachments:
Download 'flagtexture.jpg' (30 KB)
Preview of image 'flagtexture.jpg'
![flagtexture.jpg](/povray.binaries.images/attachment/%3C3be62945%40news.povray.org%3E/flagtexture.jpg?preview=1)
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Redbeard wrote:
>
> I'm working on a US Flag texture. I've been able to get 48 stars using a repeat
> warp and a macro Chris Colefax offered some time back for a star texture
> (sorry... can't find the post).
>
> Any ideas on how to get the 50 stars in the 5 6's, 4 5's pattern? I've included
> my repeat statement for reference.
>
> Stars should look like:
> * * * * * *
> * * * * *
> * * * * * *
> * * * * *
> * * * * * *
> * * * * *
> * * * * * *
> * * * * *
> * * * * * *
>
> Repeat warp currently used:
> #declare OldGloryBlue = rgb <0,40,104> / 255;
> #declare P_USAStars =
> pigment
> {
> star_pigment(5, 40, pigment_map
> {
> [0 OldGloryBlue]
> [0.00001 White]
> })
>
> translate <1,1,0>
> warp { repeat x * 3 }
> warp { repeat y * 2.75 }
> scale StarDia / 2
> translate 6 * Stripe * y + <0.5,0.4,0> * StarDia
> }
>
> This isn't terribly accurate, but it works. For 48 stars. And I need 50 :-)
You want to try an offset in the second warp:
warp { repeat y*2.75 offset <1.5,0,0> }
Note that the x offset is half the value of the first repeat warp
Josh English
eng### [at] spiritone com
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
"Josh English" <eng### [at] spiritone com> wrote in message
news:3BE6CDF5.C107301B@spiritone.com...
>
> You want to try an offset in the second warp:
> warp { repeat y*2.75 offset <1.5,0,0> }
>
> Note that the x offset is half the value of the first repeat warp
>
> Josh English
> eng### [at] spiritone com
That helped a lot. Now I just have to clean it up... I might go with a further
patterned texture so I can procedurally limit the number of stars on each row.
Right now on the rows with five stars I've got part of a star on either side.
I'm getting there though. Thanks for the help.
Michael
--
#declare R=<8,4,.6>/3;#declare C=function{pattern{object{text{ttf"crystal.ttf"
"MDJ"1,0translate-R/4}}}}camera{location-z*30}box{-R,R pigment{rgbf 1}interior
{media{emission.1density{function{C(x,y,z)}density_map{[0mandel 50color_map{[0
rgb 0][.2rgb x][1rgb x+y]}interior 1,1.5scale 60translate<-33.75,2.85>exponent
4][1rgb<2,2>]}}}}scale 24hollow}// (c) 2001 MDJohnson red### [at] wv adelphia net
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
If you're using 3.5, perhaps using the 'object' pattern would be easier to
manipulate.
-tgq
"Redbeard" <red### [at] wv adelphia net> wrote in message
news:3be7f5f0$1@news.povray.org...
>
> "Josh English" <eng### [at] spiritone com> wrote in message
> news:3BE6CDF5.C107301B@spiritone.com...
> >
> > You want to try an offset in the second warp:
> > warp { repeat y*2.75 offset <1.5,0,0> }
> >
> > Note that the x offset is half the value of the first repeat warp
> >
> > Josh English
> > eng### [at] spiritone com
>
> That helped a lot. Now I just have to clean it up... I might go with a
further
> patterned texture so I can procedurally limit the number of stars on each
row.
> Right now on the rows with five stars I've got part of a star on either
side.
>
> I'm getting there though. Thanks for the help.
>
> Michael
>
> --
> #declare R=<8,4,.6>/3;#declare
C=function{pattern{object{text{ttf"crystal.ttf"
> "MDJ"1,0translate-R/4}}}}camera{location-z*30}box{-R,R pigment{rgbf
1}interior
> {media{emission.1density{function{C(x,y,z)}density_map{[0mandel
50color_map{[0
> rgb 0][.2rgb x][1rgb x+y]}interior 1,1.5scale
60translate<-33.75,2.85>exponent
> 4][1rgb<2,2>]}}}}scale 24hollow}// (c) 2001 MDJohnson
red### [at] wv adelphia net
>
>
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
"Trevor Quayle" <Tin### [at] hotmail com> wrote in message
news:3be802c2$1@news.povray.org...
> If you're using 3.5, perhaps using the 'object' pattern would be easier to
> manipulate.
>
> -tgq
>
>
Well, yes and no. It would be easier to arrange. But adding a potential border
between the stars and the field would be more difficult, I think. Also, as it
stands my pattern is infinitely thick. That is, you can slice it at any point
along the z-axis and get the same pattern.
But... object pattern with warps... hmmm... I'll have to try that.
Thanks for the suggestion!
Michael
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |