POV-Ray : Newsgroups : povray.unofficial.patches : OBJECT IDEA Server Time
6 Oct 2024 18:39:48 EDT (-0400)
  OBJECT IDEA (Message 5 to 14 of 44)  
<<< Previous 4 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: Thorsten Froehlich
Subject: Re: OBJECT IDEA
Date: 10 Jul 2002 04:38:27
Message: <3d2bf283$1@news.povray.org>
In article <3d2bca3e$1@news.povray.org> , "Majukatur" 
<maj### [at] hotmailcom> wrote:

> Well, this object not is a mesh of triangles, is a curve defined by 3 points
> and its normal vectors, it is not an aproximation. There is an equation that
> have all this characteristics, not is a mesh of triangles, is a mesh of
> patchs, and it is easy to write this kind of meshes MANUALLY, for example,
> you need only 4 "triangles" to describe an sphere, with normal meshes you
> need hundreds of triangles. For describe ANY ellipse you need only 12
> "triangles".

Why build a sphere out of triangles if you can just use the sphere object in
POV-Ray?  Sounds like reinventing the wheel to me...

    Thorsten


Post a reply to this message

From: Warp
Subject: Re: OBJECT IDEA
Date: 10 Jul 2002 10:32:12
Message: <3d2c456c@news.povray.org>
By the way, I strongly suggest that you either use the actual reply
functionality of your newsreader or configure it to quote articles properly.
In that format it's extremely difficult to see what is a quote and what is
a reply.

-- 
#macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
[1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
-1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp -


Post a reply to this message

From: Christopher James Huff
Subject: Re: OBJECT IDEA
Date: 10 Jul 2002 13:42:51
Message: <chrishuff-D5DCBC.12395910072002@netplex.aussie.org>
In article <3d2b4e76@news.povray.org>,
 "Majukatur" <maj### [at] hotmailcom> wrote:

> Well, this is an idea that I had, is about the meshes, I was thinking, the
> smooth triangle have a simulated normal that seems to be smooth, but it

> smooth_triangle really smoothed?, if the syntax of the smooth_triangle is
> conserved we can use the new shape with old mesh objects without problem,
> but with better quality.

There have been a couple people working on macros to produce "curved" 
smooth triangles. The only good way to do that seems to be to divide 
each triangle into more triangles on a curved surface...trying to solve 
directly for the surface would probably be too slow for a mesh with a 
fair number of triangles. Their macros are probably in the scene file 
groups on this server. You might also want to look for information on 
subdivision surfaces.

-- 
Christopher James Huff <chr### [at] maccom>
POV-Ray TAG e-mail: chr### [at] tagpovrayorg
TAG web site: http://tag.povray.org/


Post a reply to this message

From: Le Forgeron
Subject: Re: OBJECT IDEA
Date: 10 Jul 2002 13:47:26
Message: <3D2C6D06.5E44F486@free.fr>
Thorsten Froehlich wrote:
> 
> In article <3d2bca3e$1@news.povray.org> , "Majukatur"
> <maj### [at] hotmailcom> wrote:
> 
> > Well, this object not is a mesh of triangles, is a curve defined by 3 points
> > and its normal vectors, it is not an aproximation. There is an equation that
> > have all this characteristics, not is a mesh of triangles, is a mesh of
> > patchs, and it is easy to write this kind of meshes MANUALLY, for example,
> > you need only 4 "triangles" to describe an sphere, with normal meshes you
> > need hundreds of triangles. For describe ANY ellipse you need only 12
> > "triangles".
> 
> Why build a sphere out of triangles if you can just use the sphere object in
> POV-Ray?  Sounds like reinventing the wheel to me...
> 
>     Thorsten

By 3 points and 3 normals (only direction, with the same constraints that
is now on smooth_triangle (normals go to the same side)), how many spheres go through
?
If you are lucky, one; else none.
Problem is that most of the time, you will be unlucky (at least due to computational
errors but not only). 
This is because the center of the sphere should be at the intersection
of the three lines made by the normals and points. and there is no reason for theses
lines to intersect, even two by two. There is in fact no reason that two of them be
in any common plane.

Another approach with a sphere might be to use a mapping from the first point&normal
to always be a well know point on the sphere (such as the intersection of x axis with
the unit sphere) and then, using only the normals informations, placing the second and
third points of a geodesic triangle (additional contrainte for the second point should
be added also, so that it lies in the xOy plane for instance).
Then you will need to compute a transformation matrix (3 points give 3 points, so that
should be easy) and perform the intersection test against the geodesic triangle on
the unit sphere (as well as the normal computation).

Problems are:
Any two normals should not even be parallel (whereas currently it is possible with
smooth_triangle)
The three normals must ABSOLUTELY define a free base of 3D space 
And of course, the triangle must not be degenerated (or flat)

So it's not that easy to do by hand! At least the parser must be very strict.

Additional caveat: 
- the matrix found may be dependent on the order of the points,
which might end up that an ABC triangle is not identical to a ACB, 
or even a BCA triangle!!! [I need a mathematician here !!]
- Computation of the intersection with the geodesic triangle is not
straight ahead. The third point has far too much freedom, from a programmer
point of view! The hit on the sphere is easy (copy&paste from current sphere object)
but then the only hope I could see is to express the normal in the base of the 
three triangle normales, if any coefficient is negative, it's outside of the geodesic
triangle.

Rendering time (per triangle) is probably fine, but I'm afraid of optimisation,
because bounding the curved_triangle is probably not easy to do exactly
(bounding of unit sphere transformed by the inverse matrix is the best I can imagine,
and it leaves a lot of false positives).

I'm not sure, given the additional contraints and all the trouble,
 that this new object is forth its developpement. 
Could you come with some (basic) scenes/objects, which are not already covered
by the existings objects ? (the sphere was a bad example !)
-- 
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

From: TinCanMan
Subject: Re: OBJECT IDEA
Date: 10 Jul 2002 14:44:21
Message: <3d2c8085$2@news.povray.org>
> > Why build a sphere out of triangles if you can just use the sphere
object in
> > POV-Ray?  Sounds like reinventing the wheel to me...
> >
> >     Thorsten

> By 3 points and 3 normals (only direction, with the same constraints that
<snip>
> Non Sine Numine
> http://grimbert.cjb.net/
> Etiquette is for those with no breeding;
> fashion for those with no taste.

That's one heck of a reply, but I think you misunderstood what Thorsten was
implying. He was talking about building a sphere using meshes not building
meshes out of spheres (though that is very interesting and you gave quite a
thorough answer)

BTW to Thorsten: I think the original reference to building a sphere out of
meshes was just a simple analogy, not meant to be taken literally but meant
to be extended to more complex objects.

-tgq


Post a reply to this message

From: Majukatur
Subject: Re: OBJECT IDEA
Date: 10 Jul 2002 14:47:51
Message: <3d2c8157@news.povray.org>
Thorsten


example to show you a comparative between this shape and the mesh of
triangles.

FC


Post a reply to this message

From: Le Forgeron
Subject: Re: OBJECT IDEA
Date: 11 Jul 2002 16:16:59
Message: <3D2DE746.4AB766CA@free.fr>
TinCanMan wrote:
> 
> > > Why build a sphere out of triangles if you can just use the sphere
> object in
> > > POV-Ray?  Sounds like reinventing the wheel to me...
> > >
> > >     Thorsten
> 
> > By 3 points and 3 normals (only direction, with the same constraints that
> <snip>
> > Non Sine Numine
> > http://grimbert.cjb.net/
> > Etiquette is for those with no breeding;
> > fashion for those with no taste.
> 
> That's one heck of a reply, but I think you misunderstood what Thorsten was
> implying. He was talking about building a sphere using meshes not building
> meshes out of spheres (though that is very interesting and you gave quite a
> thorough answer)
> 

I agree, I was replying after to Thorsten but my target was the original
poster in the previous post.

Internal mental note: Learn to reply correctly!->

I mainly agree with Thorsten that building a sphere with this idea is worthless
and conter-productive.
And more over, it will introduced another 2D object which cannot be used in CSG
either. Meshes are a pleague, once you start with them, you stop thinging about
volume.

> BTW to Thorsten: I think the original reference to building a sphere out of
> meshes was just a simple analogy, not meant to be taken literally but meant
> to be extended to more complex objects.

Me too, but is there such complex objects that could be done by hand ?
(it was the reason of the initial idea...) 

Now, where is the original poster ?
Because (s)he has some answers to provide if (s)he really wants some work to be
done...

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

From: Ben Chambers
Subject: Re: OBJECT IDEA
Date: 11 Jul 2002 21:57:17
Message: <3d2e377d@news.povray.org>
"Majukatur" <maj### [at] hotmailcom> wrote in message
news:3d2b4e76@news.povray.org...
> Hi all.
>
> Well, this is an idea that I had, is about the meshes, I was thinking, the
> smooth triangle have a simulated normal that seems to be smooth, but it

> smooth_triangle really smoothed?, if the syntax of the smooth_triangle is
> conserved we can use the new shape with old mesh objects without problem,
> but with better quality.

Check out my curvetri.inc, posted in p.b.s-f (I think :)

...Chambers


Post a reply to this message

From: Patrick Elliott
Subject: Re: OBJECT IDEA
Date: 12 Jul 2002 18:00:29
Message: <1103_1026511141@news.povray.org>
On Thu, 11 Jul 2002 18:58:32 -0700, "Ben Chambers" <bdc### [at] yahoocom> wrote:
> 
> "Majukatur" <maj### [at] hotmailcom> wrote in message
> news:3d2b4e76@news.povray.org...
> > Hi all.
> >
> > Well, this is an idea that I had, is about the meshes, I was thinking, the
> > smooth triangle have a simulated normal that seems to be smooth, but it

> > smooth_triangle really smoothed?, if the syntax of the smooth_triangle is
> > conserved we can use the new shape with old mesh objects without problem,
> > but with better quality.
> 
> Check out my curvetri.inc, posted in p.b.s-f (I think :)
> 
> ....Chambers
> 

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...


Post a reply to this message

From: TinCanMan
Subject: Re: OBJECT IDEA
Date: 12 Jul 2002 19:08:51
Message: <3d2f6183$1@news.povray.org>
> 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.

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.

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.

-tgq


Post a reply to this message

<<< Previous 4 Messages Goto Latest 10 Messages Next 10 Messages >>>

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