POV-Ray : Newsgroups : povray.binaries.images : polygon to circle loft : Re: polygon to circle loft Server Time
7 Nov 2024 15:35:49 EST (-0500)
  Re: polygon to circle loft  
From: LanuHum
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

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