POV-Ray : Newsgroups : povray.binaries.images : polygon to circle loft Server Time
20 Apr 2024 10:14:43 EDT (-0400)
  polygon to circle loft (Message 1 to 10 of 51)  
Goto Latest 10 Messages Next 10 Messages >>>
From: And
Subject: polygon to circle loft
Date: 8 May 2015 02:10:00
Message: <web.554c52c931d6ee795fff675a0@news.povray.org>
I was trying to make lofting shape. And here is the fruit.


Post a reply to this message


Attachments:
Download 'decorate3 6 scalez 1.png' (22 KB)

Preview of image 'decorate3 6 scalez 1.png'
decorate3 6 scalez 1.png


 

From: And
Subject: Re: polygon to circle loft
Date: 8 May 2015 02:25:00
Message: <web.554c55c1908ae4215fff675a0@news.povray.org>
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


Post a reply to this message

From: Cousin Ricky
Subject: Re: polygon to circle loft
Date: 8 May 2015 12:12:53
Message: <554ce085$1@news.povray.org>
On 05/08/2015 02:08 AM, And wrote:
> I was trying to make lofting shape. And here is the fruit.

Very good!


Post a reply to this message

From: And
Subject: Re: polygon to circle loft
Date: 9 May 2015 11:00:01
Message: <web.554e2000908ae421bad22bea0@news.povray.org>
Cousin Ricky <ric### [at] yahoocom> wrote:
> On 05/08/2015 02:08 AM, And wrote:
> > I was trying to make lofting shape. And here is the fruit.
>
> Very good!

Thanks!


Post a reply to this message

From: Stephen
Subject: Re: polygon to circle loft
Date: 9 May 2015 11:21:24
Message: <554e25f4$1@news.povray.org>
On 08/05/2015 07:08, And wrote:
> I was trying to make lofting shape. And here is the fruit.
>

It is not low hanging fruit. :-)
If it is not a trade secret. How did you blend the hexagon into a circle?

-- 

Regards
     Stephen


Post a reply to this message

From: LanuHum
Subject: Re: polygon to circle loft
Date: 9 May 2015 12:45:01
Message: <web.554e3974908ae4217a3e03fe0@news.povray.org>
"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'
scene.jpg


 

From: And
Subject: Re: polygon to circle loft
Date: 10 May 2015 08:40:01
Message: <web.554f5097908ae421bad22bea0@news.povray.org>
Stephen <mca### [at] aolcom> wrote:
> On 08/05/2015 07:08, And wrote:
> > I was trying to make lofting shape. And here is the fruit.
> >
>
> It is not low hanging fruit. :-)
> If it is not a trade secret. How did you blend the hexagon into a circle?
>
> --
>
> Regards
>      Stephen

Thanks for your compliment!

Well, it is not a trade secret. And the idea is simple.
I represent it by isosurface then it will be clear:

#declare r = 0.3;
#declare h = 0.3;

#declare f_1 =
function(x,y){
max(x-0.1, y-0.1, -(x+0.1), -(y+0.1) )
}

#declare f_2 =
function(x,y){
sqrt(x*x+y*y) - r
}

#declare f_blend =
function(x,y,z){
(z/h)*f_1(x,y) + (1-z/h)*f_2(x,y)
}


isosurface {
  function {f_blend(x,y,z)}
  contained_by { box { <-0.5, -0.5, 0>, <0.5, 0.5, h> } }
  accuracy 0.001
  max_gradient 40

  texture {
            pigment{ color rgb<1,1.0,0.95>*1.1}
            finish { phong 1}
   }
}


Post a reply to this message

From: And
Subject: Re: polygon to circle loft
Date: 10 May 2015 09:00:07
Message: <web.554f55a5908ae421bad22bea0@news.povray.org>
Then it will blend it from f_1(x,y) to f_2(x,y)
from z=h to z=0


Post a reply to this message

From: LanuHum
Subject: Re: polygon to circle loft
Date: 10 May 2015 09:05:07
Message: <web.554f56c4908ae4217a3e03fe0@news.povray.org>
"And" <49341109@ntnu.edu.tw> wrote:
> Stephen <mca### [at] aolcom> wrote:
> > On 08/05/2015 07:08, And wrote:
> > > I was trying to make lofting shape. And here is the fruit.
> > >
> >
> > It is not low hanging fruit. :-)
> > If it is not a trade secret. How did you blend the hexagon into a circle?
> >
> > --
> >
> > Regards
> >      Stephen
>
> Thanks for your compliment!
>
> Well, it is not a trade secret. And the idea is simple.
> I represent it by isosurface then it will be clear:
>
> #declare r = 0.3;
> #declare h = 0.3;
>
> #declare f_1 =
> function(x,y){
> max(x-0.1, y-0.1, -(x+0.1), -(y+0.1) )
> }
>
> #declare f_2 =
> function(x,y){
> sqrt(x*x+y*y) - r
> }
>
> #declare f_blend =
> function(x,y,z){
> (z/h)*f_1(x,y) + (1-z/h)*f_2(x,y)
> }
>
>
> isosurface {
>   function {f_blend(x,y,z)}
>   contained_by { box { <-0.5, -0.5, 0>, <0.5, 0.5, h> } }
>   accuracy 0.001
>   max_gradient 40
>
>   texture {
>             pigment{ color rgb<1,1.0,0.95>*1.1}
>             finish { phong 1}
>    }
> }

Whether it is possible to make the universal scheme of transition from a curve
to the n-gons?


Post a reply to this message

From: And
Subject: Re: polygon to circle loft
Date: 10 May 2015 09:15:02
Message: <web.554f58e1908ae421bad22bea0@news.povray.org>
"LanuHum" <Lan### [at] yandexru> wrote:
> :)
> Wonderful toy!
> It is possible to play year. :)
> Substituting different figures, we receive different forms.

Thank you. Your word made me happy all day long.


Post a reply to this message

Goto Latest 10 Messages Next 10 Messages >>>

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