POV-Ray : Newsgroups : povray.binaries.images : polygon to circle loft : Re: polygon to circle loft Server Time
17 May 2024 22:46:25 EDT (-0400)
  Re: polygon to circle loft  
From: And
Date: 15 May 2015 01:45:00
Message: <web.55558769908ae4213f4ed4340@news.povray.org>
"LanuHum" <Lan### [at] yandexru> wrote:
> "And" <49341109@ntnu.edu.tw> wrote:
> > Could you give me an example (code)?
> >
> > I never saw it.
>
> #version 3.7;
>
> global_settings {
> }
> background {rgbt<0.05, 0.05, 0.05, 0>}
>
> #declare Default_texture = pigment {rgb 0.8}
>
> #declare Material = texture {pigment {rgbt <0.8,0.8,0.8,0>}}
>
> #declare height = 0.5;
> #declare poly_n = 3;
> #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 = 10;
>
> #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
> texture {pigment {rgb 1}}
> scale 3
> rotate <0,90,90>
> }
>
> mockup2
>
> light_source {
>     <4.08,5.9,5.1>
>     color rgb<1, 1, 1>
> }
>
> camera {
>     location  <0, 0, 0>
>     look_at  <0, 0, -1>
>     right <-1.7777777777777777, 0, 0>
>     up <0, 1, 0>
>     angle  49.134343
>     rotate  <-27.098163, 46.688390, -0.903519>
>     translate <7.481132, 5.343666, 6.507640>
> }

Oh, this section of code has some bugs, please use the file which I uploaded
later.


Post a reply to this message

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