Bobtree

Members
  • Content count

    17
  • Joined

  • Last visited

Community Reputation

127 Neutral

About Bobtree

  • Rank
    Member
  1. Cross Product, Normalizing, and overflows

    You need to read this: "What Every Computer Scientist Should Know About Floating-Point Arithmetic" http://docs.sun.com/source/806-3568/ncg_goldberg.html
  2. ROAM infinite loop

    This is a known issue that results from implementations using non-monotonic priority computation (a very common tradeoff). Please read Mark Duchaineau's ROAM Homepage site http://www.cognigraph.com/ROAM_homepage/ for relevant information. My ideal fix is to use 2 additional "insertion-pending" queue caches, s.t. element splitting and merging does not immediately make the inverse possible during the same frame. The pending queues are merged with the actual work queues before starting a new frame, but not during the optimization/convergence stage. Thus repeated merging AND splitting of an element during a single frame is made impossible, and such loops cannot occur. Alas, I never perfected this version, as it some mysterious performance degredations (quite possibly specific to my code), so I can't completely recommend it. Mark has a different approach, where you track the up/down priority convergence direction, and only allow a single "loop", always ending in the same direction (with merges, iirc). This allows you to consistently hit the same triangle number target each frame, if that's your goal. This can also be fixed by marking elements with a "last operated frame" label, and not processing the same element twice (since it would already have the "current" label). -Lucas
  3. I have always used Leveller, but do not know what limitations the current demo version has. IMHO, it's well worth the money if you're going to spend any great deal of time doing heightfield modeling. http://www.daylongraphics.com/products/leveller/index.htm
  4. It appears you've reinvented a version of coroutines. http://www.c2.com/cgi/wiki?CoRoutine Your branches look like implicit structured couroutine objects that yield control round-robin style (they are asymmetric, because they don't call each other). As you demonstrate, they're useful for modeling problems with multiple implicit control structures, each of which wants to be the 'dominant' control loop, because they decouple state management from logic flow. Many such 'scripting' languages have coroutines, Python and Lua for example.