• Content count

  • Joined

  • Last visited

Community Reputation

127 Neutral

About Bobtree

  • Rank
  1. Cross Product, Normalizing, and overflows

    You need to read this: "What Every Computer Scientist Should Know About Floating-Point Arithmetic"
  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 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.
  4. It appears you've reinvented a version of coroutines. 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.