POV-Ray : Newsgroups : povray.binaries.images : Rounded block section, isosurface equivalent : Re: Rounded block section, isosurface equivalent Server Time
28 Apr 2024 01:44:23 EDT (-0400)
  Re: Rounded block section, isosurface equivalent  
From: StephenS
Date: 5 Sep 2016 16:26:09
Message: <57cdd4e1$1@news.povray.org>
On 05/09/2016 4:09 PM, Le_Forgeron wrote:
> Help yourself,
>
> Le 05/09/2016 à 21:04, StephenS a écrit :
>> abs(x-Radius/2)-Radius/2+Block_gap   // wrong except for 90 degrees
>>    )
>
> What is abs(x-Radius/2)-Radius/2+Block_gap, but the projection of the coordinate on
the normal of the plane, for a very particular case,
>
> Actually, abs is slicing twice, so
> abs(x-Radius/2)-Radius/2+Block_gap can be replaced by -x+Block_gap for the same
effect of cutting along a plane.
I may have seen this if I started from scratch, but I started from my 
box code.
>
> now, replace the -x by the computation of the distance along the normal at 120° and
you are nearly done.
>
>
> isosurface{
>  function {
>   max(
>    sqrt(pow(x,2)+pow(z,2))-Radius+Block_gap,
>    abs(y-Height/2)-Height/2+Block_gap,  // cylinder height
>    abs(z-Radius/2)-Radius/2+Block_gap,  // my reference edge
>    -x*sin(radians(120))+z*cos(radians(120))+Block_gap
I saw this from the isosurface tutorial, but was not sure how to fit, 
abs(x-Radius/2)-Radius/2+Block_gap, to it.
>    )
>  }
>  contained_by { box { <-Radius,0,-Radius>, <Radius,Height,Radius> } }
>  texture { pigment { color rgb 1 } }
> }
>
>
> Have a good night.
>
Not yet, still time for one more render ;-)

Thanks.

Stephen S


Post a reply to this message

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