POV-Ray : Newsgroups : povray.binaries.scene-files : UK Flag (Union Jack) : Re: Procedural Stars? Was Re: UK Flag (Union Jack) Server Time
2 Sep 2024 20:15:42 EDT (-0400)
  Re: Procedural Stars? Was Re: UK Flag (Union Jack)  
From: Bob Hughes
Date: 3 Mar 2000 12:27:39
Message: <38bff60b@news.povray.org>
I know of a procedurally done star at Mike Hough's Povray tutorial web pages:
http://members.xoom.com/POVRAY3/procedural.html
Might be more of a trick getting it onto that flag though.

Bob

"Jerry" <jer### [at] acusdedu> wrote in message
news:jerry-CACFC0.08395103032000@news.povray.org...
| In article <38BEF26E.50E0120C@exaweb.de>, Peter Santo <gwe### [at] exawebde>
| wrote:
| >Why did I create such a scene file? I needed a picture of a
| >British Flag in very high resolution and with absolutely
| >correct geometry. Additionally, I wanted to experiment
| >with layered pigments.
|
| I did the same thing, for similar reasons, with the United States flag
| and one of the Confederate flags. I couldn't figure out how to make the
| stars procedural, however. Anyone have any ideas on how to make these
| flags fully procedural?
|
| // Persistence of Vision Ray Tracer Scene Description File
| // Author: Jerry Stratton (jer### [at] acusdedu)
| #include "colors.inc"
| #include "textures.inc"
| #declare flag_red = color rgb <.8,0,0>;
| #declare flag_white = color rgb <.8,.8,.8>;
| #declare flag_blue = color rgb <0,0,.8>;
|
| #declare flag_normal = normal {
|    wrinkles 2
|    scale .05
|    turbulence .25
| }
|
| #declare flag_dirt = texture {
|    pigment {
|       bozo
|       turbulence .2
|       color_map {
|          [0.0  color Gray50 filter .5]
|          [0.5  color White transmit 1]
|          [1.0  color White transmit 1]
|       }
|    }
|    scale .1
| }
|
| #declare conf_bar = texture {
|    pigment {
|       gradient x
|       frequency 1
|       color_map {
|          [0.0  color flag_white]
|          [0.08 color flag_white]
|          [0.09 color White transmit 1]
|          [1.0  color White transmit 1]
|       }
|    }
|    finish {
|       ambient .5
|    }
| }
| #declare conf_blue = pigment {
|    gradient x
|    frequency 1
|    color_map {
|       [0.0  color flag_blue]
|       [0.06 color flag_blue]
|       [0.06 color White transmit 2]
|       [1.0  color White transmit 2]
|    }
| }
| #declare conf_stars = pigment {
|    image_map {
|       gif "constar.gif"
|    }
|    translate <-.5,0,0>
|    scale <1,330/230,1>
|    scale .1
|    translate <0,-.2,0>
| }
| #declare conf_blue_bar = texture {
|    pigment {
|       average
|       pigment_map {
|          [1 conf_blue]
|          [1 conf_stars]
|       }
|    }
|    finish {
|       ambient .5
|    }
| }
|
| #declare bar_rotate = 45*sqrt(2);
|
| #declare confederate_texture = texture {
|    pigment { color flag_red }
|    normal {
|       flag_normal
|    }
|    finish {
|       ambient .4
|    }
| }
| texture { conf_bar
|    rotate <0,0,bar_rotate>
|    normal { flag_normal}
| }
| texture { conf_bar
|    rotate <0,0,-bar_rotate>
|    normal { flag_normal }
| }
| texture { conf_blue_bar
|    rotate <0,0,bar_rotate>
|    normal { flag_normal }
| }
| texture { conf_blue_bar
|    rotate <0,0,-bar_rotate>
|    normal { flag_normal }
| }
| texture { flag_dirt }
|
|
|
| #declare blue_box = pigment {
|    boxed
|    color_map {
|       [0.0  color White transmit 2]
|       [0.1  color White transmit 2]
|       [0.2  color Blue]
|       [1.0  color Blue]
|    }
| }
| #declare white_stars = pigment {
|    image_map {
|       gif "fedstar.gif"
|    }
|    scale .3
| }
|
| #declare federal_texture = texture {
|    pigment {
|       gradient y
|       frequency 13
|       color_map {
|          [0.0  color flag_red]
|          [0.41 color flag_red]
|          [0.42 color Black]
|          [0.50 color Black]
|          [0.51 color flag_white]
|          [0.90 color flag_white]
|          [0.91 color Black]
|          [0.99 color Black]
|          [1.0  color flag_red]
|       }
|       translate <0,-.48,0>
|    }
|    finish {
|       ambient .4
|    }
| }
| texture {
|    pigment {
|       average
|       pigment_map {
|          [1 blue_box]
|          [1 white_stars]
|       }
|       scale .3
|       scale <7/13,7/13,1>
|       translate <-4/13*2/.75,5/13,0>*.3
|    }
|    finish {
|       ambient .4
|    }
| }
| texture { flag_dirt }
|
|
| #declare conf_flag_pigment = texture {
|    confederate_texture
|    translate <.45,.25,0>
|    scale 2
|    scale <.825,1,1>
| }
|
|
| #declare fed_flag_pigment = texture {
|    federal_texture
|    translate <.383, .25,0>
|    scale 2
|    scale <.825, 1, 1>
| }
|
| file://Make some flags
| camera {
|    perspective
|    location <0.0, 0.0, -2.5>
|    look_at <0.0, 0.0, 0.0>
| }
| light_source {
|    <0.0, 100, -100>
|    rgb <1.000000, 1.000000, 1.000000>
| }
| background {
|    rgb  < 0, 1, 1>
| }
|
| box {
|    <0,0,0>,<1,1,.1>
|    texture {
|       fed_flag_pigment
|    }
|    scale <1.5,1,1>
|    rotate <0,0,33>
|    translate <-.5,-.5.0>
|    translate <-.6,0,0>
| }
| box {
|    <0,0,0>,<1.5,1,.1>
|    texture {
|       conf_flag_pigment
|    }
|    rotate <0,0,33>
|    translate <-.5,-.5.0>
|    translate <1,0,.3>
| }


Post a reply to this message

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