POV-Ray : Newsgroups : povray.binaries.images : Concave shapes (43KB) : Re: Concave shapes (43KB) Server Time
20 Apr 2024 07:15:51 EDT (-0400)
  Re: Concave shapes (43KB)  
From: Tor Olav Kristensen
Date: 8 Oct 2000 18:56:10
Message: <39E0FB6B.A7DFECE0@hotmail.com>
Christoph Hormann wrote:
> 
> Tor Olav Kristensen wrote:
> >
> > Yesterday I did some more work on some CSG-macros of mine.
> > They will "round off" any concave shape made with intersections
> > of planes, like the upper left shape.
> >
> > The lower right shape shows how the resulting shape looks
> > like if both the edges and corners are wounded off.
> >
> 
> looks good, how did you do it ? just CSG with planes, cylinders and spheres?

The starting (convex) shape is just 
intersections of all the involved planes.

Then one macro takes info about these planes 
and calculates where every possible triple 
of non parallel planes meets at potential 
corners (points).

Then another macro removes all the corners 
that are "false" (I.e. those that have one 
or more planes "below" themselves.)

Then some other macros receives the data 
about the final "true" corners and 
constructs the shapes (CSG with cylinders 
and spheres) that are used to "subtract"
from the starting shape.


> > The rendering is slow, so now I'm working on the macro
> > so that it will render much faster.
> >
> 
> I suppose parsing will also be quite slow when working with complicated shapes.

Yes, but not unbearable slow (as the pre-
liminary macros was).


> > When I'm finished with the macros I'll post the source code
> > if anyone is interested.
> >
> 
> Sure we are :-)
> I estimate it's quite a lot of work doing it, so thanks in advance...

Yes, there's a lot of info to manage within 
the macro. But I've now manage to make them 
much faster. But there's still some work 
left to make them stop calculating the same 
things over and over.

Maybe I can force myself to post some code 
soon, even if I'm not satisfied with it yet.


Tor Olav
--
mailto:tor### [at] hotmailcom
http://www.crosswinds.net/~tok/tokrays.html


Post a reply to this message

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