POV-Ray : Newsgroups : povray.text.scene-files : Arabesque, take 3 Server Time
1 Nov 2024 07:24:41 EDT (-0400)
  Arabesque, take 3 (Message 1 to 2 of 2)  
From: Ron Parker
Subject: Arabesque, take 3
Date: 19 Apr 2001 17:29:38
Message: <slrn9dum62.s0.ron.parker@fwi.com>
[Corrected, for those who already looked at the buggy version]

Something to really bend y'all's brains:

#macro Arabesque3( Param )
  #declare Sd = seed(Param);
  #declare Rv = <rand(Sd),rand(Sd),rand(Sd)>*500;
  #local C=pigment{crackle solid 
    color_map{
      [1/12 red 1]
      [1/12 red 1 green 1][3/12 red 1 green 1]
      [3/12 green 1][5/12 green 1]
      [5/12 green 1 blue 1][7/12 green 1 blue 1]
      [7/12 blue 1][9/12 blue 1]
      [9/12 blue 1 red 1][11/12 blue 1 red 1]
      [11/12 red 1]
    }
  } 
  #local G=pigment{crackle
    pigment_map{[.05 rgb 0][.05 C]}
    scale .15
    translate Rv
    warp {repeat 2*z flip z}
  }      

  #local T15=tan(pi/12);

  #local Hx=pigment {
    radial 
    pigment_map{
      #local i=0;
      #while(i<6)
        [i/6 G scale <T15*sqrt(3),1,1> rotate(30+60*i)*y]
        [(i+1)/6 G scale <T15*sqrt(3),1,1> rotate(30+60*i)*y]
        #local i=i+1;
      #end
    }
    rotate 30*y
  }

  #local H=pigment{
    gradient x
    pigment_map {[.5 G][.5 Hx translate (.5+T15*sqrt(3)/2)*x]}
  }                                                               

  #local J=pigment{
    gradient x
    pigment_map {[T15/2 G scale <T15,1,1>]
       [T15/2 Hx translate (T15*(1+sqrt(3)))/2*x]}
  }

  #local Sq=pigment {
    radial 
    pigment_map{
      #local i=0;
      #while(i<4)
        [i/4 J rotate(45+90*i)*y]
        [(i+1)/4 J rotate(45+90*i)*y]
        #local i=i+1;
      #end
    }
    rotate 45*y
  }
  #local I=pigment{
    gradient x
    pigment_map {[.5 G][.5 Sq translate (.5+.5*T15)*x]}
  }

  #local B=pigment{
    radial 
    pigment_map{
      #local i=0;
      #while(i<12)
        [i/12 #if (i/2 = int(i/2)) I #else H #end rotate(15+30*i)*y]
        [(i+1)/12 #if (i/2 = int(i/2)) I #else H #end rotate(15+30*i)*y]
        #local i=i+1;
      #end
    }  
    rotate 15*y
  }
          
  #local T2=sqrt(3)/2;
  radial 
  pigment_map{
    [1/3 B translate<.5,0,-T2>*(.5+T15*sqrt(3)/2)]
    [1/3 B translate<-1,0,0>*(.5+T15*sqrt(3)/2)]
    [2/3 B translate<-1,0,0>*(.5+T15*sqrt(3)/2)]
    [2/3 B translate<.5,0,T2>*(.5+T15*sqrt(3)/2)]
  }                                   
  translate (.5+T15*sqrt(3)/2)*x
  warp{repeat 1.5*x*(.5+T15*sqrt(3)/2) flip x}
  warp{repeat .5*sqrt(3)*z*(.5+T15*sqrt(3)/2) flip z}
#end


plane {y 0 pigment {Arabesque3(70969)} finish {ambient 1}}
camera {location 3*y sky z look_at 0}


-- 
Ron Parker   http://www2.fwi.com/~parkerr/traces.html
My opinions.  Mine.  Not anyone else's.


Post a reply to this message

From: Geoff Wedig
Subject: Re: Arabesque, take 3
Date: 20 Apr 2001 08:34:38
Message: <3ae02cde@news.povray.org>
Ron Parker <ron### [at] povrayorg> wrote:

> [Corrected, for those who already looked at the buggy version]

> Something to really bend y'all's brains:

Oh, very nice...

Geoff


Post a reply to this message

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