|
|
In article <slr### [at] fwicom>, Ron Parker
<ron### [at] povrayorg> wrote:
> On Wed, 18 Apr 2001 08:54:51 +0200, Anton Raves wrote:
> >I thought it would be quicker if I could find an URL in which they show
> >one, the following address below shows a transparent green one at the
> >rear of that model.
> >
> >http://www.brickshelf.com/scans/2000/2964/2964-15.html
>
> This is a little close. I adapted it from my golf ball code, so if there
> are any variables with funny names, that's why:
Ron,
Thank you very much for the code you posted here, it set me off in the
right direction! The only problem I could find with your code was that
it didn't allow it to be used as a transparent piece, so I changed all
that was required into the following code:
#macro half_hexagon_dome(color_tex)
merge {
difference {
intersection {
#local count1 = 0;
#local count2 = 0;
#local count3 = 12;
box { <-20, 2, -20> <20, 20, 20> }
#while (count1 <= 90)
#local count4 = count2;
#while (count4 < 360)
box { <-1000, -1000, -1000> <1000, 15.9, 1000>
bounded_by { sphere { <0, 15.9, 0> 1.9875 } }
rotate <0, 0, 90 - count1>
rotate <0, count4, 0>
}
#local count4 = count4 + count3;
#end
#if (count1 >= 30)
#if ( count3 < 72 )
#local count3 = 360/(360/count3-5);
#else
#local count3 = 360;
#end
#else
#local count2 = count3/2 - count2;
#end
#local count1 = count1 + 10;
#end
}
sphere { <0, 0, 0> 14.3 }
}
difference {
cylinder { 0*y, 2.000001*y, 15.9 }
box { <-16, -1, -2.5> <16, 1.999999, 2.5> }
box { <-2.5, -1, -16> <2.5, 1.999998, 16> }
cylinder { -1*y, 2.000005*y, 14.3 }
}
texture { color_tex }
bounded_by { sphere { <0, 0, 0> 16.1 } }
}
#end
You've received an image of a Lego(TM) model in your email, showing off
the piece that I was needing to be able to finish that model...
Many thanks for helping me out in the right direction!
Anton
Post a reply to this message
|
|