Re: Left-handed vs. right-handed
"Graham Hazel" <[email protected]>
| Newsgroups | gmane.games.devel.algorithms |
|---|---|
| Message-ID | <A78F73023D9DAC4B967091570A1540CF0111F014@THHS2EXBE1X.hostedservice2.net> |
I haven't explained myself very well, so let me try to be more specific. In my way of thinking I have to change neither my code nor my data. What I do have to change is the _representation_ of my data. My world has a bunch of vectors and transformations in it. Mathematically speaking, these do not start life with an intrinsic coordinate representation---it's only once you've picked a coordinate frame that you can evaluate basis functions and write down some numbers. It's worth remembering that you've made a choice and done some work here. (The fact that they're called Cartesian coordinates should help you remember that once upon a time this was not a trivial idea.) Unfortunately, computers are good at numbers and bad at abstraction, which means that to do anything useful at all you have to pick a basis before you start. This is a Bad Thing. Typically, picking a basis is the last thing you want to do---ask anyone who's had to write down a bunch of proofs in linear algebra. Now, my contention is that at run-time you want to avoid having to deal with reflections: SO(3) is much nicer than O(3). Given that requirement, the assumptions implicit in whatever driver/API is underneath may make your choice of basis for you. This is fine---just transform the representation of your data and away you go. Everything will still work---clockwise is still clockwise since it's well-defined in your world, independently of the coordinate representation. The key is to make all your own code basis-agnostic. This is easy if you have no preference! Graham -----Original Message----- From: Alen Ladavac [mailto:[email protected]] Sent: 06 May 2009 12:32 To: Graham Hazel Cc: Game Development Algorithms Subject: Re: [Algorithms] Left-handed vs. right-handed Graham wrote at 5/6/2009: > Since it's clearly "correct" to be agnostic, I prefer to work with > the chirality that the graphics driver expects. Which one of the driver multitude of possible drivers and APIs? Even if you are single-platform-single-API and if you adapt everything to "The One API" you use now, few years from now you may have to adapt the same codebase to a different platform/API. I'd bet you are safer sticking to the winding (or chirality, call it all you want) that _you_ prefer, and be prepared to convert signs and windings on every interfacing point with any external API. It's not _that_ much of a hassle, as long as you are clear on what you use internally. JM2C, Alen ------------------------------------------------------------------------------ The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your production scanning environment may not be a perfect world - but thanks to Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700 Series Scanner you'll get full speed at 300 dpi even with all image processing features enabled. http://p.sf.net/sfu/kodak-com _______________________________________________ GDAlgorithms-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list Archives: http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list