POV-Ray : Newsgroups : povray.unofficial.patches : OBJECT IDEA Server Time
6 Oct 2024 16:19:11 EDT (-0400)
  OBJECT IDEA (Message 15 to 24 of 44)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: Patrick Elliott
Subject: Re: OBJECT IDEA
Date: 13 Jul 2002 18:56:59
Message: <1103_1026600922@news.povray.org>
On Fri, 12 Jul 2002 19:08:54 -0400, "TinCanMan" <Tin### [at] hotmailcom> wrote:
> 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


Hadn't thought of that.. I was thinking of a single normal definiing the center of the
triangle and
therefor the curve of the whole thing.. Forgot there where 3. lol However.. What about
an
ellipsoid? That I think would, but kind of creates and even bigger mess figuring it
out. lol May still
not work, but it may be worth the try anyway since if it wasn't possible it should
produce a very
interesting shape, which itself would be very difficult to produce correctly.

Though I agree that in most cases it probably isn't needed, but I kind of get tired of
supposedly
'high-end' models that when rendered require you go back and photoshop the edges
because
you can't smooth out obvious surfaces on the line parallel to the camera view. I don't
care how
good you are with photoshop you miss some and for people like me that are horrible at
it... lol
Additional tessalation is a very poor answer imho. There has got to be a better way
and this one
could produce interesting results in the attempt for anyone with the knowledge to make
the attempt.

First step I think would be to figure out how much to move the points to make them
match a true
sphere, then use that displacement to scale that part to an ellipsiod. Since the
normals would still
be pointing the right way for both that section of the ellipsiod and the intended
curve... Hard to say
without trying, at least for me. Hmm. Though... there may be problems there too, but
only in the sense
of rotation, the needed curve will occure someplace at the right angles on an
ellipsoid, but finding it is
the rub. :p


Post a reply to this message

From: Le Forgeron
Subject: Re: OBJECT IDEA
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

From: Le Forgeron
Subject: Re: OBJECT IDEA
Date: 14 Jul 2002 11:57:19
Message: <3D319F0A.D73B6DB4@free.fr>
Patrick Elliott wrote:

> Hadn't thought of that.. I was thinking of a single normal definiing the center of
the triangle and
> therefor the curve of the whole thing.. Forgot there where 3. lol However.. What
about an
> ellipsoid? That I think would, but kind of creates and even bigger mess figuring it
out. lol May still
> not work, but it may be worth the try anyway since if it wasn't possible it should
produce a very
> interesting shape, which itself would be very difficult to produce correctly.

Ellipsoid is only a linear transformation of a sphere, so it won't help when the
normals
do not meet.

> 
> Though I agree that in most cases it probably isn't needed, but I kind of get tired
of supposedly
> 'high-end' models that when rendered require you go back and photoshop the edges
because
> you can't smooth out obvious surfaces on the line parallel to the camera view. I
don't care how
> good you are with photoshop you miss some and for people like me that are horrible
at it... lol
> Additional tessalation is a very poor answer imho. There has got to be a better way
and this one
> could produce interesting results in the attempt for anyone with the knowledge to
make the attempt.
> 
> First step I think would be to figure out how much to move the points to make them
match a true
> sphere,

If you keep insisting on getting both vertices and normales, you have too much
constraint
for the
general case to work.

> then use that displacement to scale that part to an ellipsiod. Since the normals
would still
> be pointing the right way for both that section of the ellipsiod and the intended
curve... 

A linear transformation would help you to make convergent the normale!

> Hard to say
> without trying, at least for me. Hmm. Though... there may be problems there too, but
only in the sense
> of rotation, the needed curve will occure someplace at the right angles on an
ellipsoid, but finding it is
> the rub. :p

Consider when a normal is turned toward the center of the triangle and an other is 
turning away of that center. You won't find that surface on a sphere, or even on
ellipsoid.


-- 
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: Patrick Elliott
Subject: Re: OBJECT IDEA
Date: 14 Jul 2002 14:45:26
Message: <1103_1026672237@news.povray.org>
On Sun, 14 Jul 2002 17:55:54 +0200, Le Forgeron <jgr### [at] freefr> wrote:
> Patrick Elliott wrote:
> 
> Consider when a normal is turned toward the center of the triangle and an other is 
> turning away of that center. You won't find that surface on a sphere, or even on
> ellipsoid.
> 

Hmm.. Ok that is true. :p It does make for some limited utility. Oh, well just
throwing
out ideas. I never claimed to actually have a clue what I was doing. lol


Post a reply to this message

From: Rune
Subject: Re: OBJECT IDEA
Date: 14 Jul 2002 16:11:28
Message: <3d31daf0@news.povray.org>
Le Forgeron wrote:
> Ellipsoid is only a linear transformation of a
> sphere, so it won't help when the normals do not meet.

Does that logic apply?

Three normals of a sphere will always meet in the same point. But three
normals of a ellipsoid will not always meet in the same point. I'm not
saying that an ellipsoid is a solution, but just questioning this
particular argument.

Rune
--
3D images and anims, include files, tutorials and more:
rune|vision:  http://runevision.com (updated July 12)
POV-Ray Ring: http://webring.povray.co.uk


Post a reply to this message

From: Patrick Elliott
Subject: Re: OBJECT IDEA
Date: 15 Jul 2002 14:07:15
Message: <1103_1026756327@news.povray.org>
On Sun, 14 Jul 2002 22:13:32 +0200, "Rune" <run### [at] mobilixnetdk> wrote:
> Le Forgeron wrote:
> > Ellipsoid is only a linear transformation of a
> > sphere, so it won't help when the normals do not meet.
> 
> Does that logic apply?
> 
> Three normals of a sphere will always meet in the same point. But three
> normals of a ellipsoid will not always meet in the same point. I'm not
> saying that an ellipsoid is a solution, but just questioning this
> particular argument.
> 
> Rune

I believe he is refering to trangles that bend two directions. i.e. the triangle
itself looks
like:

____
        \
          \
            \______

According to the normals provided. And he is correct that under such circumstances
you can never find any primitive that has such a shape. It does occure to me that
in such instances one may be able to find two curves on an ellipsoid that may conform
to such a shape, but you end up tracing the interior of one and the exterior of
another,
not to mention it maybe not working at all, since all three corners could be distorted
in
ways that make it impossible to find any combination that would match. :p There has
got to be a better way of doing this, but... A method that used ellipsoid matching
could
probably 'fix' about 90% of the triangles in the average mesh, but that last 10% are a
problem. And in some objects the percentages could end up drastically shifting the
other way. Oh, well.. Hopefully someone will come up with a decent solution, probably
about the same time someone gets rid of coincident surfaces that are the true bane
of my existance. lol


Post a reply to this message

From: Warp
Subject: Re: OBJECT IDEA
Date: 15 Jul 2002 14:43:40
Message: <3d3317dc@news.povray.org>
Patrick Elliott <sel### [at] rrazcom> wrote:
> ____
>         \
>           \
>             \______

  Please don't tell me you are using a variable-width font to write and read
news.
  (It just wouldn't make any sense. By doing so you are assuming that
everyone else in the whole world is using the exact same font and font size
that you are.)

-- 
#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: Le Forgeron
Subject: Re: OBJECT IDEA
Date: 16 Jul 2002 05:19:21
Message: <3D33E42A.593F2D8C@free.fr>
Rune wrote:
> 
> Le Forgeron wrote:
> > Ellipsoid is only a linear transformation of a
> > sphere, so it won't help when the normals do not meet.
> 
> Does that logic apply?
> 
> Three normals of a sphere will always meet in the same point. But three
> normals of a ellipsoid will not always meet in the same point. I'm not
> saying that an ellipsoid is a solution, but just questioning this
> particular argument.
> 

Maybe you're right, and for some cases you can find an ellipsoid 
which could accomodate the three normals (even if I have no idea of
how to find the ellipsoid parameters; using a unit sphere is easier
for the math). 
But a linear transform cannot transform a positive curvature into
a negative one. So the ellipsoid won't solve all the cases.

Given also the troubling case where two normals are parallel (which
cannot be solve on someting like a sphere or even an ellipsoid),
I wonder if the curved triangle shouldn't be on a torus instead (*).

At least for the two parallel normals case, it seems that two vertices 
would be on the very top circle of the torus with the third vertex somewhere
so that its normals is ok. Currently, I can only figure the math to 
position the first vertex, the circle where the second vertex is and 
where the third vertex might be.
Maybe using also the true normal of the initial triangle might help to
limit the position of the second and third vertices. 

Once the triangle on the torus is defined, we still go back to the classical
transformation of three points from one space to another, nothing really difficult!
But maybe the torus is not even the right solution.

(*): The more I look at the problem, the more it make me think of an analogy with 
conic curves (the 6 classical conic curves in 2D can all be view as the intersection
of a plane and an infinite double cone: ellipse, parabol, hyperbol, point, single and
double generating lines), which would means that to solve the really curved triangle,
you have first to find out which 3D objects should be used according to the
parameters...
Looks like an intersection of hyperplane with an hypercone, where the position of the
hyperplane
is made according to the parameter, isn't it ?
Only problem is that I can imagine in 3D, but 4D is a bit too much (excepted when it's
3D+Time,
which is not the case here)

-- 
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: 16 Jul 2002 08:17:55
Message: <3d340ef3$1@news.povray.org>
> Maybe you're right, and for some cases you can find an ellipsoid
> which could accomodate the three normals (even if I have no idea of
> how to find the ellipsoid parameters; using a unit sphere is easier
> for the math).
> But a linear transform cannot transform a positive curvature into
> a negative one. So the ellipsoid won't solve all the cases.
>
> Given also the troubling case where two normals are parallel (which
> cannot be solve on someting like a sphere or even an ellipsoid),
> I wonder if the curved triangle shouldn't be on a torus instead (*).
>
> At least for the two parallel normals case, it seems that two vertices
> would be on the very top circle of the torus with the third vertex
somewhere
> so that its normals is ok. Currently, I can only figure the math to
> position the first vertex, the circle where the second vertex is and
> where the third vertex might be.
> Maybe using also the true normal of the initial triangle might help to
> limit the position of the second and third vertices.
>
> Once the triangle on the torus is defined, we still go back to the
classical
> transformation of three points from one space to another, nothing really
difficult!
> But maybe the torus is not even the right solution.
>
>
I would assume that for a curved triangle that had two parallel normals,
that the entire edge between those two normals would have the same normal.
for a torus, it is true that we can make a triangle that has two parallel
normals (ie, on the top of the torus) but it is quite easy to see that
between these two points the edge will curve (or even disappear in some
cases).
I don't think that simple primitives have the solution.  There must be some
way of creating quadratic type surfaces without having a discrete mesh.
Perhaps isosurfaces could be accomodated, but I would think that would come
at great CPU expense.

-tgq


Post a reply to this message

From: TinCanMan
Subject: Re: OBJECT IDEA
Date: 16 Jul 2002 08:22:51
Message: <3d34101b$1@news.povray.org>
> I don't think that simple primitives have the solution.  There must be
some
> way of creating quadratic type surfaces without having a discrete mesh.
> Perhaps isosurfaces could be accomodated, but I would think that would
come
> at great CPU expense.
>
Just a furrther thought here.
I don't know how the vertices and normals are interpolated for a triangle,
but if it is a simple surface that can be described using some type of
equation, then perhaps that equation can be put into an isosurface function.
Anyone up for that?

-tgq


Post a reply to this message

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

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