Help - Search - Members - Calendar
Full Version: OT: Math Question ...
914World.com > The 914 Forums > 914World Garage
SirAndy
stupid question (what else is new) ...

while working on my 3D-Editor/Game Engine i came to realize that the default Rotation Matrix for OpenGL uses a counterclockwise winding for Rotations around the Y-Axis (Yaw), meaning if you look at a Object in the XZ Plane a Positive Angle will Rotate the Object Left, a Negative Angle will Rotate it Right.

This is Counter-Intuitive and i am wondering if there is a rule for this behavior in a Cartesian coordinate system or is this merely a "personal preference" for OpenGL ???

My editor currently uses the clockwise approach, where a positive angle rotates the object to the right instead, which seem much more intuitive.

searching the web, i have found both approaches, but i would like to know if there's a "corret" way to do it ...

IPB Image Andy
dinomium
polar coordiantes are mesured anti clockwise...
SirAndy
QUOTE (dinomium @ Dec 30 2004, 09:32 PM)
polar coordiantes are mesured anti clockwise...

alright, so this would be the correct matrix then:

cos(angle)0sin(angle)
010
-sin(angle)0cos(angle)



hmmmm, maybe i will just make it an option for the enduser ...
IPB Image Andy
dinomium
two quotes for you:
Chevy Chase as President Ford "It was my understanding there would be no math..."
or
Malibu Barbie "Math is Hard!"

IPB Image either way that is just more trig than I care to remember... and not this close to new years!!
swood
Shoot. I thought this was going to be one of those impossible to solve problems about two trains leaving at the same time travelling towards each other at different speeds. IPB Image
Gint
Looks like A.f.d bait to me... IPB Image
Trekkor
I was hoping this was some sort of game with a fake prize. IPB Image

KT
Steve Thacker
That's some deep doo-doo Andy..... you flipping developers kill me. IPB Image

Sounds like the rare matting call to attract Alfreds.

Almost like Jennette MacDonald and Nelson Eddy I'm calling yooooo hoooo IPB Image


Sorry Andy I couldn't resist IPB Image
Red-Beard
QUOTE (swood @ Dec 30 2004, 11:14 PM)
Shoot.  I thought this was going to be one of those impossible to solve problems about two trains leaving at the same time travelling towards each other at different speeds.  :blink:

_YOU_ are the engineer on a train traveling from New York City to Chicago...

Yeah, Standard Polar coordinates are counter clockwise. And they were derived from Standard Carteasean coordinates.
ChrisFoley
Think of it this way: in an xy plot of a ray beginning at the origin, as the slope increases from zero to ninety degrees (and beyond) - the ray rotates in a counterclockwise direction.
Everything else follows from this example.
rick 918-S
What some people solve with math others would solve with a hammer. Hit the coil until you loosen the wires. Then wind them the other way. This should achieve what your after without changing the math. IPB Image
Curvie Roadlover
Maybe there's someone out there that could post some scanned articles from old Road and Track issues to explain this IPB Image IPB Image
michel richard
QUOTE (rick 918-S @ Dec 31 2004, 06:24 AM)
What some people solve with math others would solve with a hammer. Hit the coil until you loosen the wires. Then wind them the other way. This should achieve what your after without changing the math. IPB Image


Th best quote in a long, IMHO.
john rogers
I teach a couple of graphics classes using OpenGL and somethings are not really sensible to us normal people?! Try this website as there are many really good tutorials and explanations: http://nehe.gamedev.net/
KaptKaos
"It's a farging trick question!" - Roman Maronie
Bruce Allert
/ v <=> b:© + h(M)

/ angle
v dangle
<=> proportional to
b: beauty of
c cutie
h heat
m meat


IPB Image .........einstein IPB Image

.........b
Sammy
My cat's breath smells like cat food.
sgomes
As Homer said:

Y're all nuts. I'm goin' to Moe's.
SirAndy
QUOTE (Red-Beard @ Dec 31 2004, 05:12 AM)
Standard Polar coordinates are counter clockwise. And they were derived from Standard Carteasean coordinates.

that's what i wanted to know. the math is easy, just didn't know if there was a "right" way to do it.

counter-clockwise it is then ...

easy enough,
IPB Image Andy

PS:
QUOTE
http://nehe.gamedev.net/
alreayd bookmarked for quite some time now ...

PPS:
QUOTE
My linear algebra is rustier than the "hell hole"
that's why i didn't ask you in first place, plus, you just can't seem to give an simple answer to a simple question ...
rick 918-S
QUOTE (SirAndy @ Dec 31 2004, 11:54 AM)


PPS:
QUOTE
My linear algebra is rustier than the "hell hole"
that's why i didn't ask you in first place, plus, you just can't seem to give an simple answer to a simple question ...

IPB Image I still think it's easier to rewind the coil. IPB Image
URY914
I had a diesel engine that would run backward.
I didn't even have a coil.

Pie=MCsquared

And if the pie is hair pie, it is cubed. IPB Image

Paul
Katmanken
Sor Ahndie...

Is this code going to be used in the northern or the southern hemisphere?

Ya know you have to be counter clockwise in the northern hemisphere and clockwise in the southern hemisphere.

Magnetic fields reverse in the southern hemisphere, water spins in the opposite direction as it drains, monitors become unaligned, and a lot of the rules change down there.......

Bet you didn't know that...... IPB Image

Ken
SirAndy
QUOTE (kwales @ Dec 31 2004, 04:33 PM)
Is this code going to be used in the northern or the southern hemisphere?

it's going to be "universal".
which means, you'll have to float in space to be able to use it ...

IPB Image Andy
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2024 Invision Power Services, Inc.