TABLE OF CONTENTS


::pwtk::latvec2Dto3D

SYNOPSIS

proc ::pwtk::latvec2Dto3D {m Z} {

PURPOSE

Transform 2D Bravais lattice vectors, i.e.,

     { {x1 y1} {x2 y2} }

into 3D vectors

     { {x1 y1 0.0} {x2 y2 0.0} {0.0 0.0 $Z} }

ARGUMENTS

RETURN VALUE

A (3x3) matrix in the "{x1 y1 0.0} {x2 y2 0.0} {0.0 0.0 Z}" form.

SOURCE

    lassign $m v1 v2
    return [list  [lreplace $v1 2 2 0.0]  [lreplace $v2 2 2 0.0]  [list 0.0 0.0 $Z]]
}