POV-Ray : Newsgroups : povray.general : rounded_objects: a new feature? : Re: rounded_objects: a new feature? Server Time
3 May 2024 04:30:07 EDT (-0400)
  Re: rounded_objects: a new feature?  
From: Le Forgeron
Date: 13 Sep 2016 12:54:45
Message: <57d82f55@news.povray.org>
Le 13/09/2016 à 18:09, John Greenwood a écrit :
> 
> The way this would work is, as I understand it, basically the same as blobs,
> but, to avoid confusion, I will describe what I have in mind without using blob
> terminology.
> 
> rounded_object command would followed by a surface count scalar, normally an
> integer and a number of element definitions of different types.
> 
> One type of element will be an infinite plane with an inside and an outside. It
> could be defined either by a vector for a point in the plane and a direction
> vector defining the normal and the side, or by three vectors for points in the
> plane, with the inside defined by the handedness of these points. There would be
> a scalar value to define the radius of the corners

I would recommend to stick to point+normal, as handedness is unreliable
term.
and the radius might be encoded as the length of the normal.

> 
> 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?)

hmmm interesting, maybe it could already be tested with isosurface (to
validate the concept)

> 
> 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.
> 
> Other elements would be an infinite cylinder, an infinite cone and a sphere. So,
> for example, a finite cylinder would be defined by adding two plane elements
> with a surface count of 2. A finite cone needs a single additional plane and a
> surface count of 1. A hemisphere would be defined by a sphere and a plane and a
> surface count of 1. Two overlapping sphere elements with a surface count of 1
> will give the intersection and a value of 0 the union.
> 
> These elements could be assigned a negative radius and be subtracted from the
> rest of the elements in the rounded object.

kind of inversed ? it is not needed for plane (just turn the vector in
opposite direction)
but can be meaningful for cylinder, cone, sphere and other.

infinite cylinder would be specified by a point, a radius and a vector
along the axis.
Once again the length of the vector can be abused to have the rounding
radius value.


> 
> I think it may be possible for an already defined rounded object to be used as
> an element. The trick would be for the fields of its component elements to be
> summed but its contribution to the overall sum to be limited to 1. Like the
> other enclosed elements, the radius field could be reversed to subtract the
> shape of the pre-defined object element from the rest.
> 
> The radii of elements in a rounded object do not have to be the same and I think
> that, if the surface count was not an integer it may be possible to swell or
> shrink the object by an amount less than the corner radius.
> 
> Am I thinking on the right lines?
> 
> 
>


Post a reply to this message

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