Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Trigonometry

Author
Message
Mariner
21
Years of Service
User Offline
Joined: 28th Feb 2003
Location: United States
Posted: 1st Mar 2003 01:55
I was taught in trig that rotating a vector counterclockwise increased the value of the angle. I was also taught that the origin (0 degrees) was on the positive X axis. All of the software languages I've ever used followed these math rules. I'm in my sixties and its difficult to adapt to DB which has the origin on the positive Y axis and angles increase with clockwise rotation.
The difference reduces the utility of code originall written in other basics.

Just an observation
QuothTheRaven
22
Years of Service
User Offline
Joined: 2nd Oct 2002
Location: United States
Posted: 1st Mar 2003 06:43
This is for a very simple reason.

DB considers your computer screen to be a plane, like the plane of the graph. Y is going up your screen, X is going right. All good and done. To make it 3D, Z extends outwards from your screen, which does create a problem for people who are used to Y being up. But in this case, Z is your forward movement, Y is your height, X is your sidestep. It really is quite logical, if not a bit disorienting

Darken the skies, we are god
Richard Davey
Retired Moderator
22
Years of Service
User Offline
Joined: 30th Apr 2002
Location: On the Jupiter Probe
Posted: 1st Mar 2003 14:31
Mariner - what you're describing is known as "camera space". Many graphics books (and applications) will use the "right handed coordinate system" in which -z points into the screen with +z coming out towards the viewier. Other software/books will use a "left handed coordinate system" in which +z points into the screen and -z comes out. I'm afraid that's just the way DB works, it might not be consistent with what you have experienced in the past, but it's by no means on its own in this regard.

Cheers,

Rich

"Gentlemen, we are about to short-circuit the Universe!"
DB Team / Atari ST / DarkForge / Retro Gaming
Mariner
21
Years of Service
User Offline
Joined: 28th Feb 2003
Location: United States
Posted: 1st Mar 2003 22:08
It's not a problem after learning how DB works. I got some strange results when I started experimenting at first until I figured out what I was doing wrong. I am really going to enjoy using degrees and not having to pi()/180*. That was a great idea.

Login to post a reply

Server time is: 2024-11-24 04:36:09
Your offset time is: 2024-11-24 04:36:09