|
|
"And" <49341109@ntnu.edu.tw> wrote:
> It is fast. It only took 3s to render on my fx-8350 computer.
>
> #declare height = 0.5;
> #declare poly_n = 6;
> #declare poly_r = 0.5;
> #declare cycle_r = 0.13;
> #declare an = 2*pi/poly_n;
> #declare poly_thr = poly_r*cos(an/2);
> #declare bound=max(cycle_r,poly_r);
> #declare multi = 1000;
>
> #declare poly_obj =
> polynomial{
> 4,
> xyz(0,2,2):multi*1,
> xyz(2,0,1):multi*2*height,
> xyz(1,0,2):multi*2*(poly_thr-cycle_r),
> xyz(2,0,0):multi*(-pow(height, 2)),
> xyz(0,0,2):multi*(-pow(cycle_r - poly_thr, 2)),
> xyz(1,0,1):multi*2*height*(-2*poly_thr + cycle_r),
> xyz(1,0,0):multi*2*pow(height,2)*poly_thr,
> xyz(0,0,1):multi*2*height*poly_thr*(poly_thr - cycle_r),
> xyz(0,0,0):multi*(-pow(poly_thr*height, 2))
> sturm
> }
>
> #declare mockup2 =
> difference{
> cylinder{
> <0,0,0.0>,<0,0,height>, bound
> }
>
> #for(i, 0, poly_n-1)
> object{
> poly_obj
> inverse
> rotate <0,0,degrees(an*i)>
> }
> plane{
> <1,0,0>,-poly_thr
> rotate <0,0,degrees(an*i)>
> }
> #end
> }
>
> mockup2
:)
Wonderful toy!
It is possible to play year. :)
Substituting different figures, we receive different forms.
Post a reply to this message
Attachments:
Download 'scene.jpg' (7 KB)
Preview of image 'scene.jpg'
|
|