POV-Ray : Newsgroups : povray.unofficial.patches : OBJECT IDEA : Re: OBJECT IDEA Server Time
8 Jul 2024 17:15:55 EDT (-0400)
  Re: OBJECT IDEA  
From: Le Forgeron
Date: 14 Jul 2002 11:51:59
Message: <3D319D16.2A04CC@free.fr>
TinCanMan wrote:
> 
> > Been thinking about this... This idea may be very mathimatically
> intensive, but lets say you did
> > the folowing... Use the three points on the triangle and there
> relationship to the normal provided
> > (assuming you can) and find an area of a real sphere defined by those
> points and with same
> > real curvature, then use the math for generating spheres to produce those
> points within the
> > that triangle. This assumes you can calculate based on those point and a
> curve what the radius
> > would need to be for the sphere, but would in theory produce a true curve,
> without the need to
> > tessilate the object further. I haven't a clue how myself, but
> geometrically it should work. Or so
> > I assume...
> >
> 
> At first thought on this, I don't think it will work.
> 
> First of all, the three points and three normals will, in most cases, not be
> able to realize a sphere. Any sized sphere large enough to contain all three
> points (i.e., can 'rest' on the three points without falling through) can be
> defined by these three points, but unless the patch has a spherical
> curvature, it can never match all 3 normals.

It's even worth than that, but you did not seem to have read my previous posts
on the subject.

> Secondly, you want each triangle to run smoothly into the next.  Simple
> analysis of spheres will tell you that no two spheres of different radii can
> be intersected in such a way that their surfaces intersect smoothly.

Where did you get this second point ?
It was never implied, at least from the explanation.
But it's interesting... and might be expected 

> 
> I don't mean to rain on your parade but I just wanted to point this out
> before someone puts a lot of time into trying this only to find it won't
> work.  In reality, I don't think there are any simple POV primitives (blobs
> and isosurfaces notwithstanding, but I don't even want to think about the
> complexity of that) that can define every possible curved triangle.

There is many cases to study, according to the 4 normals.
(the three explicit ones and the one of the triangle)

If they all meet at one point, you get a part of a sphere,
where the intersection is the center of the sphere.

But what is most interesting, is when one of the explicit normal is
heading outward of the triangle while the two others are inward 
(or vice-versa), the surface need to be subdivided in more curves.

Similarly, when the three normals do not meet (most of the time!),
it might be wise to subdivide.

I ended up trying to generate a spherical triangle from the initial data, 
only to find out that the mapping is far too difficult (for me, at least).
So I only implemented a cleaner object to which you only provide the 
simple data:

The hull is just a triangle on a sphere:
 the first vertex is fixed (<1,0,0>,
 the second one evolves on nearly a circle (*),
 and the third and last one evolves on the remaining sphere.

*: excepted that the second vertex cannot be identical or opposite to
the first vertex.

Syntax is currently like the superellipsoid & torus, 
except it take a 3D vector instead of 2D.

hull { <elevation of second, phi of third, elevation of third> ....

The used sphere is the unit sphere, but you can of course scale/translate/rotate/...
it.
See a quick movie with a hull in p.b.a

-- 
Non Sine Numine
http://grimbert.cjb.net/
Etiquette is for those with no breeding;
fashion for those with no taste.


Post a reply to this message

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