POV-Ray : Newsgroups : povray.programming : Request: new pigment : Re: Request: new pigment Server Time
29 Jul 2024 04:21:57 EDT (-0400)
  Re: Request: new pigment  
From: Ron Parker
Date: 9 Apr 1999 10:28:34
Message: <370e0082.0@news.povray.org>
On Thu, 08 Apr 1999 22:59:31 -0400, Alberto Mendoza <jac### [at] usbve> wrote:
>
>
>"Ronald L. Parker" wrote:...
>
>Well done!.  Playing with the macro I discovered that it works as well if
>
>//    [0/3 hexBlock translate <.5,0,-sqrt(3)/2>]
>    [1/3 hexBlock translate <.5,0,-sqrt(3)/2>]
>    [1/3 hexBlock translate <-1,0,0>]
>    [2/3 hexBlock translate <-1,0,0>]
>    [2/3 hexBlock translate <.5,0,sqrt(3)/2>]
>//    [3/3 hexBlock translate <.5,0,sqrt(3)/2>]
>
>Alberto

Good point.  You can also replace those four remaining lines with

#local i=1; #while (i<=2) 
  [i/3 hexBlock translate vrotate(x,(120*i-60)*y)]
  [i/3 hexBlock translate vrotate(x,(120*i+60)*y)]
#local i=i+1; #end

The only advantage to this is that it might make the .5's and sqrt(3)'s a 
little less cryptic and/or intimidating.


Post a reply to this message

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