Don't know what you want exactly, by your description, but if you
want a 2D delaunay triangulation implementation in RB, I have one:
<http://www.tinrocket.com/code/realbasic/00140/>
John
On Oct 4, 2005, at 12:30 PM, Joseph Nastasi wrote:
On Oct 4, 2005, at 10:33 AM, Joseph J. Strout wrote:
At 7:36 AM -0400 10/4/05, Joseph Nastasi wrote:
If I build a trimesh of random size, is there an algorithm that
will help me define the triangle points for
Trimesh.Triangles.SetABC? I've been trying to find a method that
is universal as I can never know what the size will be.
Basically, I'm building a simple image to height map tool.
Yes, there are such algorithms -- the question is, how complex do
you want it? A simple approach is to just divide your surface
into a regular array, where if you look down on your terrain, all
the vertices fall on a square grid. This is what I did in my old
waving-flag demo in RB Developer (of course I did that via
declares; nowadays you could do it all with the new Trimesh
class). That's a good approach when the position of the vertices
may be changing dynamically, so you really have no reason to use
anything other than a regular grid.
This is what I wound up doing. I have not tested in real time yet.
To solve that problem, you could use something such as Delaunay
triangulation. Here's a site that presents a quick overview and
links to this and other algorithms for mesh generation: <http://
www.ics.uci.edu/~eppstein/gina/meshgen.html>.
I'll check this out, but for my needs, the local landscape doesn't
stick around long when you're accelerating at 3-6 G's....
:-)
Thanks, Joe!
--
Joseph Nastasi
Pyramid Design - a software development firm
http://www.pyramiddesign.us
Voice 609 601-0814 Fax 609 601-0815
Products:
A-OK! Spacecraft Simulation System - http://aok.pyramiddesign.us
A-OK! The Wings of Mercury
FTP Suite for REALbasic - http://ftpsuite.pyramiddesign.us
Proud Sponsors of REALbasic Olympics 2005
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
|