Difference between revisions of "Coordinate systems"

From VDrift
Jump to: navigation, search
m (9 revisions: Import from old wiki (on 15 May 2012))
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
==Coordinate system version 1 (outdated)==
+
The positions and dimensions used in the VDrift .car files are expressed as a triplet of floating-point numbers on a 3-dimensional Cartesian graph. See [http://en.wikipedia.org/wiki/Cartesian_coordinate_system#Cartesian_coordinates_in_three_dimensions Wikipedia: Cartesian coordinates in three dimensions] for more information.
Previous to code revision 2196, the .car files all used mixed coordinate systems.
 
  
* blender coordinate system
+
{{note|All directions mentioned on this page (left, up, forward, etc.) are relative to the driver of the car.}}
car x = right & left, negative being left
 
car y = forward & back, negative being back
 
car z = up & down, negative being down
 
  
* .car file: mass positioning (same as blender)
+
==Car coordinates==
car x = right & left, negative being left
+
Currently, the .car files use the following coordinate system for all parameters:
car y = forward & back, negative being back
+
* '''x axis''': negative is left, positive is right
car z = up & down, negative being down
+
* '''y axis''': negative is back, positive is forward
 +
* '''z axis''': negative is down, positive is up
  
* .car file: wheel positioning (tested on Front Right wheel)
+
This is known as a [http://en.wikipedia.org/wiki/Cartesian_coordinate_system#In_three_dimensions right-handed (positive)] coordinate system.
wheel x = forward and back, negative being back
 
wheel y = left and right, negative being right
 
wheel z = up and down, negative being down
 
  
  * .car file: view positioning (same as wheel)
+
This coordinate system matches the one used in [http://blender.org Blender]. To use this coordinate system, specify <code>version = 2</code> in the [[Car parameters|'''.car''' file]].
view x = forward & back, negative being back
 
view y = right & left, negative being right
 
view z = up and down, negative being down
 
  
==Coordinate system version 2==
+
===Deprecated system===
As of code revision 2196, the .car files can optionally use the following coordinate system for all parameters:
+
Previous to revision 2196 of the [[Getting the development version|development version]], the '''.car''' files all used mixed coordinate systems (<code>version = 1</code>).
car x = right & left, negative being left
 
car y = forward & back, negative being back
 
car z = up & down, negative being down
 
  
This coordinate system was picked because it matches the blender coordinates. To use this coordinate system, specify "version = 2" in the .car file.
+
====Mass Position====
 +
This is the same the Blender coordinate system (described above).
 +
 
 +
====Wheel and Driver View Positions====
 +
* '''x axis''': negative is back, positive is forward
 +
* '''y axis''': negative is right, positive is left
 +
* '''z axis''': negative is down, positive is up
 +
 
 +
[[Category:Cars]]
 +
[[Category:Tracks]]
 +
[[Category:Historical]]

Latest revision as of 09:21, 26 August 2012

The positions and dimensions used in the VDrift .car files are expressed as a triplet of floating-point numbers on a 3-dimensional Cartesian graph. See Wikipedia: Cartesian coordinates in three dimensions for more information.

Note: All directions mentioned on this page (left, up, forward, etc.) are relative to the driver of the car.

Car coordinates

Currently, the .car files use the following coordinate system for all parameters:

  • x axis: negative is left, positive is right
  • y axis: negative is back, positive is forward
  • z axis: negative is down, positive is up

This is known as a right-handed (positive) coordinate system.

This coordinate system matches the one used in Blender. To use this coordinate system, specify version = 2 in the .car file.

Deprecated system

Previous to revision 2196 of the development version, the .car files all used mixed coordinate systems (version = 1).

Mass Position

This is the same the Blender coordinate system (described above).

Wheel and Driver View Positions

  • x axis: negative is back, positive is forward
  • y axis: negative is right, positive is left
  • z axis: negative is down, positive is up