[ODE] XODE - should angles be in degrees or radians?

Shaul Kedem shaul_kedem at yahoo.com
Fri Mar 19 23:58:14 MST 2004


Ok,
 If I assume we go for both representations, to some
up, the options (up until now) are:

 1. Use one "angle" attributes for all of the file,
like so:
 <world angle="degrees"> or <world angle="radians">

 2. Use attributes wherever needed, like so:
 <angle degrees="90"> or <angle rads="...">
(this has the problem since you cannot define a
"choice" between two attributes, so they will be
mutually exclusive)

 3. Use an element wherever an angle is needed, like
so:
 <deg>90</deg> or <rad>10</red>

 4. Any others?

Best,
Shaul

--- William Denniss <lists at omegadelta.net> wrote:
> We should be able to read and write floats to ASCII
> text and back
> accurately.  The limiting factor is more the float
> precision of the
> actual programs used (for example if there was a
> difference in precision
> between ODE and an Editor then we may have some
> loss).
> 
> Maybe we really do need both representations.  As
> discussed, radians are
> superior for serializing an ODE scene as they are
> "native" to ODE, but
> editors (including just using a text editor) tend to
> use degrees for
> human readability and precision.
> 
> Considering the fact that converting between degrees
> and radians is so
> ridiculously simple - would dual support really be a
> burden?
> 
> Cheers,
> 
> Will.
> 
> 
> On Sat, 2004-03-20 at 04:02, Bob Dowland wrote:
> > > > But, not being able to store things like right
> angles precisely, 
> > > > would seem like a bit of a showstopper for a
> geom/phys file format. 
> > > 
> > > I believe this argument is a fallacy. The reason
> is that ODE, 
> > > internally, uses radians, so even if you can
> "store" a 90 degree angle 
> > > precisely, as soon as you "load" that into ODE,
> it's no longer exact.
> > > 
> > 
> > You're absolutely right! More to the point, when
> you save back out, that precise 90 degrees is toast
> (well lightly toasted anyway).
> > 
> >  - I was imagining a scenario in which a file
> containing a radian represented (90 degree) angle is
> opened and closed so often that it eventually
> corrupts itself. But, in fact, this could be far
> worse with a degree (ie non-"native")
> representation. 
> > 
> > Focusing on our 90 degree angle we could be
> seeing:
> > 
> > open file: 90 degrees -> (pi/2 + epsilon) rads
> > save file: (pi/2 + epsilon) rads -> (90 +
> moreepsilon) degrees
> > open file: (90 + moreepsilon) degrees -> (pi/2 +
> evenmoreepsilon) rads
> > 
> > and so on... 
> > 
> > 	So in fact you could potentially corrupt the
> degrees representation by just opening and
> close/saving the file - oops!
> > 
> > Theres still the bin<->dec conversion for floats
> but we get that with either format.
> > 
> > Bob.
> > 
> 
> -- 
> William Denniss - will@ http://tanksoftware.com/
> 
> _______________________________________________
> ODE mailing list
> ODE at q12.org
> http://q12.org/mailman/listinfo/ode


__________________________________
Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time.
http://taxes.yahoo.com/filing.html


More information about the ODE mailing list