POV-Ray : Newsgroups : povray.advanced-users : How to cap a cylinder by a 2d-function? : Re: How to cap a cylinder by a 2d-function? Server Time
16 Apr 2024 17:48:26 EDT (-0400)
  Re: How to cap a cylinder by a 2d-function?  
From: Sherry K  Shaw
Date: 6 Dec 2016 19:21:23
Message: <58475603@news.povray.org>
Kay wrote:

> I fear any boolean operations aren't accessable with
> isosurface. Are they?
>

You can't put an #if statement into a function, but you CAN use the 
result of a comparison as a numeric value in a function.  For example:

f_rounded_box( x*(1+((y/100)*(y>0))), y, z, 6, 36, 78, 12 )

In an isosurface, this creates a rounded box that's straight-sided below 
y=0 and tapers gently above.  (Don't forget to include functions.inc.)

Hope this is useful.

--Sherry Shaw

-- 
#macro T(E,N)sphere{x,.4rotate z*E*60translate y*N pigment{wrinkles scale
.3}finish{ambient 1}}#end#local I=0;#while(I<5)T(I,1)T(1-I,-1)#local I=I+
1;#end camera{location-5*z}plane{z,37 pigment{granite color_map{[.7rgb 0]
[1rgb 1]}}finish{ambient 2}}//                                   TenMoons


Post a reply to this message

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