comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Simple 3D Visualisation
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Simple 3D Visualisation [message #36447] Wed, 17 September 2003 21:47
Rick Towler is currently offline  Rick Towler
Messages: 821
Registered: August 1998
Senior Member
"Mark Hadfield" wrote...
> Adam Rees wrote:
>> David,
>> You're quite right. I think I've just got used to IDLE being able to
99%
>> of the things I ask of it. I have made some progress if anyone is
>> interested. Its not pretty though. I've produced a connectivity array
which
>> contains all the possible combinations of points to produce a myriad of
>> triangles (28000 ish polygons). Then searched through and removed all
the
>> duplicates taking the total down to 4000 ish. Using mesh_decimate and
>> mesh_validate (I'm 100% sure what these do) I've then decreased the
number
>> to 1000 odd. Obviously there are still many I don't need but nonetheless
>> this is low enough for my computer to handle the object easily and thus
for
>> me to do most things that I need.

>> My final problem is that some exterior triangles are facing the
wrong
>> way. I think it may have something to do with the directions of the
normals
>> at the vertices but that will have to wait until tomorrow. If anyone has
any
>> ideas please let me know. I'm spending FAR to much time on this.

Yes, your normals are pointing the wrong way because the windings of those
triangles is backwards. Reverse the order (e.g. original is {3,3,2,1} try
{3,3,1,2}). I am pretty sure they follow the right-hand rule in IDL but I
can't find anything in the docs right now.


> That's not surprising. You seem to be reinventing some very big (3D
> geometrical) wheels.

Very very big. It seems that you have found a solution that suits you and
since you don't want to spend a lot of time on this you probably don't want
to go too much further. But there are some really cool algorithms out there
that can do quite a good job with your data.


> You still haven't really explained on what basis you want to join these
> vertices. Do you have any information you're not telling us about which
> vertices should be connected?

Are there any assumptions that can be made?


> Anyway, I'm no expert on this stuff, but you might want to have a look
> at the QHULL procedure. And a Google search on terms like "convex hull"
> and "Delaunay triangulation" might give you some ideas.

You'll also want to google (both web and groups) for "surface
reconstruction", "marching cubes", "deformable models", "shape
reconstruction", "volume meshing"... There is a ton of literature on this.
You may be able to find code too, but most likely it will be in C/C++.


-Rick
Re: Simple 3D Visualisation [message #36450 is a reply to message #36447] Wed, 17 September 2003 13:55 Go to previous message
Mark Hadfield is currently offline  Mark Hadfield
Messages: 783
Registered: May 1995
Senior Member
Adam Rees wrote:
> David,
> You're quite right. I think I've just got used to IDLE being able to 99%
> of the things I ask of it. I have made some progress if anyone is
> interested. Its not pretty though. I've produced a connectivity array which
> contains all the possible combinations of points to produce a myriad of
> triangles (28000 ish polygons). Then searched through and removed all the
> duplicates taking the total down to 4000 ish. Using mesh_decimate and
> mesh_validate (I'm 100% sure what these do) I've then decreased the number
> to 1000 odd. Obviously there are still many I don't need but nonetheless
> this is low enough for my computer to handle the object easily and thus for
> me to do most things that I need.
> My final problem is that some exterior triangles are facing the wrong
> way. I think it may have something to do with the directions of the normals
> at the vertices but that will have to wait until tomorrow. If anyone has any
> ideas please let me know. I'm spending FAR to much time on this.

That's not surprising. You seem to be reinventing some very big (3D
geometrical) wheels.

You still haven't really explained on what basis you want to join these
vertices. Do you have any information you're not telling us about which
vertices should be connected?

Anyway, I'm no expert on this stuff, but you might want to have a look
at the QHULL procedure. And a Google search on terms like "convex hull"
and "Delaunay triangulation" might give you some ideas.

--
Mark Hadfield "Ka puwaha te tai nei, Hoea tatou"
m.hadfield@niwa.co.nz
National Institute for Water and Atmospheric Research (NIWA)
Re: Simple 3D Visualisation [message #36451 is a reply to message #36450] Tue, 16 September 2003 13:28 Go to previous message
Adam Rees is currently offline  Adam Rees
Messages: 2
Registered: September 2003
Junior Member
David,
You're quite right. I think I've just got used to IDLE being able to 99%
of the things I ask of it. I have made some progress if anyone is
interested. Its not pretty though. I've produced a connectivity array which
contains all the possible combinations of points to produce a myriad of
triangles (28000 ish polygons). Then searched through and removed all the
duplicates taking the total down to 4000 ish. Using mesh_decimate and
mesh_validate (I'm 100% sure what these do) I've then decreased the number
to 1000 odd. Obviously there are still many I don't need but nonetheless
this is low enough for my computer to handle the object easily and thus for
me to do most things that I need.
My final problem is that some exterior triangles are facing the wrong
way. I think it may have something to do with the directions of the normals
at the vertices but that will have to wait until tomorrow. If anyone has any
ideas please let me know. I'm spending FAR to much time on this.

All the best

Adam

"David Fanning" <david@dfanning.com> wrote in message
news:MPG.19d2394dd3d391e89896ed@news.frii.com...
> Adam Rees writes:
>
>> I'm trying to do something that I thought IDL would handle easily but
I'm
>> having real difficulties. I have a set of irregular 3D points (NB: no
values
>> at those points). I simply want to produce a 3D volume, most likely a
series
>> of polygons/triangles that this set of points defines. I've been using
the
>> idlgrpolygon command at present but am having trouble with the
connectivity
>> since the points are irregular, i.e. all the vertices are in the right
>> places but the faces are all over the place. Does anyone have any ideas
>> because I'm stumped?
>
> It's always interesting to me what people consider
> to be "easy" problems. But "here are a bunch of
> 3D points with no seeming relationship to one another,
> so I want you to connect them up into something I might
> recognize" seems pretty hard to me. :-)
>
> I mean if you have 100 points, there must be nearly
> !100 ways to do it wrong!
>
> Cheers,
>
> David
>
> --
> David W. Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Phone: 970-221-0438, E-mail: david@dfanning.com
> Coyote's Guide to IDL Programming: http://www.dfanning.com/
> Toll-Free IDL Book Orders: 1-888-461-0155
Re: Simple 3D Visualisation [message #36457 is a reply to message #36451] Wed, 17 September 2003 09:27 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Adam Rees writes:

> I'm trying to do something that I thought IDL would handle easily but I'm
> having real difficulties. I have a set of irregular 3D points (NB: no values
> at those points). I simply want to produce a 3D volume, most likely a series
> of polygons/triangles that this set of points defines. I've been using the
> idlgrpolygon command at present but am having trouble with the connectivity
> since the points are irregular, i.e. all the vertices are in the right
> places but the faces are all over the place. Does anyone have any ideas
> because I'm stumped?

It's always interesting to me what people consider
to be "easy" problems. But "here are a bunch of
3D points with no seeming relationship to one another,
so I want you to connect them up into something I might
recognize" seems pretty hard to me. :-)

I mean if you have 100 points, there must be nearly
!100 ways to do it wrong!

Cheers,

David

--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Overlaying a coordinate grid on a contour plot
Next Topic: Re: 3D Graphics input

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 09:22:34 PDT 2025

Total time taken to generate the page: 0.00584 seconds