tetra2xyz – convert four-component dependent data into Cartesian 3-space
tetra2xyz is a tiny program to convert four-component non-independent data into Cartesian 3-space co-ordinates.
If you have data that represent proportions that four components of a system that contribute to a total, then you may find tetra2xyz a useful tool. For example when dealing with metamorphic rocks containing four components, how can we graphically represent mixtures of those four components ? Traditionally, this problem has been overcome by projection with only shows a particular subset of the whole system onto a three component ternary diagram. However, using this program is is possible to represent systems of four components, such as CaO-MgO-SiO2-H20 as points within a tetrahedral space.
In fact the program was developed to transform four component data representing wasp populations for a biologist friend- so its uses are widespread. The information used to make the program was gleaned from a series of on-line articles gathered together under the title of The Quadray Papers, which deal with four-dimensional simpicial co-ordinate systems, such as those of the tetrahedron.
The program reads in a four-column text file (with columns separated by white space) where each column contains the proportion of each component, which must sum to unity. The output of the program is a new text file containing three xyz co-ordinates, which will enable plotting of the data in a normal 3-D graphing application.
perl tetra2xyz.pl abcd.dat > xyz.dat
There isn’t any! tetra2xyz is public domain software, and as such you may give it away and modify it to your requirements without seeking permission. As such it is supplied without warranty and no guarantee of fitness-for-purpose.