Computes the coordinates of the point in a new coordinate system.

Namespace:  ceometric.VectorGeometry
Assembly:  ceometric.VectorGeometry (in ceometric.VectorGeometry.dll) Version: (


public Point TransformCoordinates(
	CoordinateSystem actualCS,
	CoordinateSystem newCS
Visual Basic (Declaration)
Public Function TransformCoordinates ( _
	actualCS As CoordinateSystem, _
	newCS As CoordinateSystem _
) As Point
Visual C++
Point^ TransformCoordinates(
	CoordinateSystem^ actualCS, 
	CoordinateSystem^ newCS

Return Value

Returns the coordinates of the point in a new coordinate system.


Given a point pu with coordinates x, y, and z. If these are the coordinates in a coordinate system U, what would be the coordinates of pu in a coordinate system W?
// The actual coordinate system:
// (In this example, its just the global coordinate system with origin at (1,1,1))

Vector3d e1 = new Vector3d(1, 0, 1);
Vector3d e2 = new Vector3d(0, 1, 0);
Vector3d e3 = new Vector3d(0, 0, 1);
CoordinateSystem U = new CoordinateSystem(new Point(0, 0, 1), e1, e2, e3);

// The new coordinate system (the global coordinate system):
CoordinateSystem W = CoordinateSystem.Global();

// A point with coordinates in U:
Point pu = new Point(0,0,0);

// What are the coordinates of this point in W?
Point pw = pu.TransformCoordinates(U, W);
// pw = (0, 0, 1)

// Transforming from U to W and then from W to U must return the original coordinates again:
if (pu.TransformCoordinates(U, W).TransformCoordinates(W, U) != pu) 
    Console.WriteLine("Adjust the global epsilon variables!");

See Also