The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Physics::Lorentz::Transformation - Representation of Poincare Transformations

SYNOPSIS

  use Physics::Lorentz;
  my $rotation = Physics::Lorentz::Transformation->rotation_euler(
    $alpha, $beta, $gamma
  );
  my $vector = Physics::Lorentz::Vector->new([$t, $x, $y, $z]);
  my $rotated = $rotation->apply($vector);
  # or: $rotated = $rotation * $vector;
  
  ...

DESCRIPTION

This class represents a Poincare transformation. That is a proper or improper Lorentz transformation plus a shift by some 4-vector. (x' = lamda*x + a)

Yes, the class name might be misleading, but honestly, when most non-physicists talk about Lorentz transformations, they mean Poincare transformations anyway. (Pun intended.)

To sum this up, the set of Poincare transformations contains, among others

  • Boosts

  • Rotations

  • Space Inversions / Parity

  • Time Inversion

  • Shifts by a constant vector

  • Combinations thereof

EXPORT

None.

OVERLOADED INTERFACE

Stringification is overloaded with the stringify method.

Multiplication (*) is overloaded with the merge method for other transformations: $t3 = $t1 * $t2 corresponds to the following application on a vector: t1 * ( t2 * vec ). (I.e. t2 first, then t1) Of course, Poincare transformations do not commute!

The assignment form of multiplication is supported for merging transformations but its use is discouraged unless you're into obfuscation.

Multiplication is also overloaded for application to vectors, but only if the vector is on the right of the transformation: $t * $v is okay, but $v * $t is not.

CONSTRUCTORS

new

Creates a new Physics::Lorentz::Transformation object. Defaults to the unity transformation.

If one argument is present, this argument may either be a 4x4 PDL which will be used internally as the PDL representation of the or an equivalent Perl datastructure (4x4 matrix).

If two arguments are present, the second argument will be used as or converted to a Physics::Lorentz::Vector. It defaults to [0, 0, 0, 0]

This result will be of the form x' = lamda * x + a where lamda is the matrix and a is the vector. (And x is the 4-vector that's acted upon.)

rotation_euler

Alternative constructor to construct a specific type of Lorentz transformation: A 3D rotation with the Euler angles alpha, beta, gamma.

Three arguments: alpha, beta, gamma.

(First rotate about fixed z-axis by alpha, the about fixed y-axis about beta, then about fixed z-axis by gamma.)

rotation_x

Alternative constructor to construct a specific type of Lorentz transformation: A 3D rotation about the x or 1-axis. First argument is the rotation angle.

rotation_y

Alternative constructor to construct a specific type of Lorentz transformation: A 3D rotation about the y or 2-axis. First argument is the rotation angle.

rotation_z

Alternative constructor to construct a specific type of Lorentz transformation: A 3D rotation about the z or 3-axis. First argument is the rotation angle.

boost

Alternative constructor to construct a specific type of Lorentz transformation: A boost of rapidity eta (eta = atanh(v/c)) and direction x.

Accepts three arguments: The components of the boost's velocity vector divided by the speed of light: (v1/c, v2/c, v3/c).

boost_x

Alternative constructor to construct a specific type of Lorentz transformation: A boost of rapidity eta (eta = atanh(v/c)) parallel to the x axis.

Accepts one argument: The boost's velocity divided by the speed of light v/c.

boost_y

Alternative constructor to construct a specific type of Lorentz transformation: A boost of rapidity eta (eta = atanh(v/c)) parallel to the y axis.

Accepts one argument: The boost's velocity divided by the speed of light v/c.

boost_z

Alternative constructor to construct a specific type of Lorentz transformation: A boost of rapidity eta (eta = atanh(v/c)) parallel to the z axis.

Accepts one argument: The boost's velocity divided by the speed of light v/c.

parity

Returns the parity operation, that is, space inversion.

time_reversal

Returns the time reversal operation.

OTHER METHODS

merge

Merge two transformations into one. Mathematically speaking, if a is the current transformation, b is another, and v is a Lorentz vector, $a->merge($b) is the transformation v' = a x (b x v). In words, if applied to a vector, the merged transformation is the subsequent application of tranformation b and then a.

apply

Apply transformation to a Lorentz vector or something that can be converted into a Physics::Lorentz::Vector. Returns a vector.

clone

Returns a copy of the object.

stringify

Returns a string representation of the object. Currently, this is the string representation of the internal PDL vector/matrix.

ACCESSORS

get_matrix

Returns the 4x4 PDL that represents the Lorentz transformation.

This is the actual object that is used inside the Transformation object, so be aware that modifying it results in action at a distance!

get_vector

Returns the Physics::Lorentz::Vector object that is used inside the Transformation object. As with the matrix, this is the actual object. Same caveats.

Note that this isn't a PDL but a Physics::Lorentz::Vector object.

SEE ALSO

PDL, Physics::Lorentz, Physics::Lorentz::Vector,

AUTHOR

Steffen Müller, <smueller@cpan.org>

COPYRIGHT AND LICENSE

Copyright (C) 2006 by Steffen Müller

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.6 or, at your option, any later version of Perl 5 you may have available.

1 POD Error

The following errors were encountered while parsing the POD:

Around line 639:

Non-ASCII character seen before =encoding in 'Müller,'. Assuming UTF-8