POV-Ray : Newsgroups : povray.general : rounded_objects: a new feature? : Re: rounded_objects: a new feature? Server Time
3 May 2024 08:14:06 EDT (-0400)
  Re: rounded_objects: a new feature?  
From: scott
Date: 14 Sep 2016 03:16:56
Message: <57d8f968$1@news.povray.org>
O> As each ray chugs through design space it will need to know its 
distance from
> each of these planes and on which side it is. Associated with each plane is a
> "field" which has the value of 1 at distances greater than the corner radius
> from the inside and -1 at distances greater than the same distance outside.
> Between these two the strength of the field follows a sine curve, going through
> zero at the plane itself. The field values of all the elements are summed. (The
> calculation might be faster with cubic; the corners would not be exactly
> circular, but would anyone notice or care?)
>
> A simple tetrahedral rounded object can be created with four plane elements. The
> ray decides it has encountered a surface when the sum of the field values is
> greater than the surface count number, which, in this case is 3. In general, for
> convex polyhedra, it would be one less than the number of plane elements.

Could you use an isosurface to test out this idea?

It actually sounds similar to distance field rendering which is used a 
lot in real-time raytracing. Once you have the distance fields then it's 
easy to do a "smooth union" between shapes:

http://www.iquilezles.org/www/articles/smin/smin.htm

Note that there are two distinct types of "round" being discussed, it's 
important not to confuse them. The first is the "CAD" type of perfect 
round that is formed by conceptually rolling a sphere (of radius equal 
to the round you want) along the edge. The second is this type of 
"artistic" round that smoothly blends the two shapes, but is not 
necessarily possible to accurately specify the round radius (or it might 
not even be constant throughout the round).


Post a reply to this message

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