POV-Ray : Newsgroups : povray.binaries.images : Application of magnet fractal pattern : Re: Application of magnet fractal pattern Server Time
3 Oct 2024 15:14:40 EDT (-0400)
  Re: Application of magnet fractal pattern  
From: Robert Dawson
Date: 11 Jan 2000 09:41:04
Message: <387b4100@news.povray.org>
Nieminen Juha <war### [at] punarastascstutfi> wrote in message
news:387b1f9b@news.povray.org...
>   Would you like to share the texture code with us?

    Sure. Should have included it yesterday.


==============================snip
snip====================================================
/*  Turbulated magnet1m marble textures demo code */

camera { location <3,6,-10> look_at <0,3,0> angle 35 }
light_source { <100,100,-40>, 0.8 area_light <15, 0, 0>, <0, 5, 5>, 5, 5}
light_source { <-50,100,-200>, 0.8 area_light <15, 0, 0>, <0, 15, >, 5, 5 }

union{
        cylinder { <0,-0.1,0><0,0.1,0>,2}
        torus{2,0.1}

/*The tabletop texture is based very closely on Nieminen Juha's original
pattern demo, but turbulated.*/
 pigment {
  magnet1m 30
  color_map { [0 rgb <1,.7,.3>][.5 rgb <.8,.4,.1>][1 rgb <1,.7,.3>] }
  fractal_exterior_type 6,.001
  fractal_interior_type 1,200
  translate <-2,-1,0> scale 10
  warp{turbulence 0.5}
 }
 normal {
  magnet1m 30 1
  slope_map { [0 <1,0>][1 <0,-1>] }
  fractal_interior_type 1,200
  translate <-2,-1,0> scale 10
  warp{turbulence 0.5}
 }
 finish { specular .5 reflection 0.05 }
 translate<0,3,0>

}

cylinder{<0,0,0>,<0,3,0>,0.2 pigment{rgb 0.8} finish{reflection 0.5 diffuse
0.5}}

plane{<0,1,0>,0 pigment{checker  color rgb<1,0,0>  color rgb 1}
finish{diffuse 0.7 ambient 0.3}} /*imaginative!*/

plane{<0,0,1>,5 pigment{     /*Bookmatched "marble" tiles*/

                  marble pigment_map{[0.03 color rgb 0.3][0.03    /* These
two lines yield the "cracks"*/
                     marble pigment_map{[0.03 color rgb 0.3][0.03

                        magnet1m 30   /*and here's the tile texture*/
          color_map { [0 rgb <0.85,0.8,0.7>][0.25 rgb 1][0.3 rgb
<0.3,0.3,0.2>][.45 rgb <1,0.9,0.8>][0.65 rgb 0.5][1 rgb 1] }
          fractal_exterior_type 6,.001
          fractal_interior_type 1,200
          translate <-1.7,-1,0> scale 10
          warp{turbulence 1.7}
          warp{repeat x offset 0.036*z flip x}
          warp{repeat y offset 0.06*z flip y}]} rotate <0,0,90>]}}
   finish{diffuse 0.7 ambient 0.3}}


    /*Enjoy! -RJMD*/


Post a reply to this message

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