POV-Ray : Newsgroups : povray.general : The copious free time of the POV-Ray group : Re: The copious free time of the POV-Ray group Server Time
11 Aug 2024 15:12:30 EDT (-0400)
  Re: The copious free time of the POV-Ray group  
From: Twyst
Date: 1 Jul 1999 15:51:10
Message: <377bc6ae@news.povray.org>
> Note: a buch of interesting information on the toriodal variant of the
> superquadric appeared in one of the Graphics Gems books.
>
> Unlike the normal torus, you won't find an exact (general) solution for
> the intersection of a ray with the surface.  This thing is way worse
> than an three variable polynomial with integral powers.
>
> For someone with time on their hands, what you need to do is to follow
> the example of what I did in the superquadric code.  Chop the surface
> into octants, find intersections with the bounding box+planes that
> chopped it, then do a N-R solution.
>
> The difficulty with this particular surface is that it doesn't guarantee
> just one solution per octant.  Even worse, there is no simple way to
> slice the octant to make that happen (yes, I thought about this one a
> few years back and didn't think it was worth the time).
>
> I suppose an interval arithmetic approach would work pretty well, but
> that requires adding quite a bit of code.
>
> Triangles are probably best here...


Yes, but the problem is twofold, when it comes to triangles.
a) Can't CSG.
b) degenerate triangles.

I might simply take the C code on that page, and make a DXF-outputting mesh
generator/ (DXF supports quad meshes...)

I truly wish povray had a 'quad mesh' - less chance of degenerate triangles
(Note: it might work as a variant on the polygon code - simply stipulate
that all points are coplanar. )


Twyst
>
> Xander


Post a reply to this message

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