When analyzing chemical mixtures, soil compositions, or specialized gas blends, mathematicians and engineers often encounter a distinct visualization challenge: how do you plot three independent variables on a flat two-dimensional surface without relying on complex 3D modeling?

In technical diving, life-support design, and gas blending, this problem is solved using ternary plots—commonly referred to as Trimix Triangles. These specialized graphs allow scientists and life-support engineers to map mixtures of oxygen (O2​), nitrogen (N2​), and helium (He).

By mastering the mathematical principles underlying Trimixtriangles, you can project three-dimensional mixture constraints onto a two-dimensional coordinate system with perfect geometric precision.

A ternary Trimix plot mapping hyperoxic, normoxic, and hypoxic zones, AI generated

A ternary Trimix plot mapping hyperoxic, normoxic, and hypoxic zones. Source: ResearchGate

1. The Fundamental Constraint Equation

At the heart of ternary graphing lies a simple algebraic rule: the sum of all components in a closed system must equal 100% (or a fraction of 1.0).

For any breathing gas blend containing oxygen, nitrogen, and helium, the composition is defined by:

FO2​+FN2​+FHe=1.00

Where:

  • FO2​ = Fraction of Oxygen
  • FN2​ = Fraction of Nitrogen
  • FHe = Fraction of Helium

Because these three variables are strictly bound to sum to unity, the system possesses only two degrees of freedom. If you know the exact proportions of any two gases, the third is automatically determined:

FN2​=1.00−(FO2​+FHe)

This algebraic relationship is what makes plotting a three-variable system inside a 2D equilateral triangle mathematically possible.

2. Geometric Foundations: Vivian’s Theorem

The spatial framework of a Trimix Triangle relies on a classic geometric principle known as Vivian’s Theorem.

Vivian’s Theorem: The sum of the perpendicular distances from any interior point of an equilateral triangle to its three sides is constant and equal to the altitude (h) of the triangle.

                   Vertex C (100% He)
                        /\
                       /  \
                      /    \
                     /  P   \   <-- Point P: sum of perpendiculars = Altitude
                    /        \
                   /__________\
   Vertex A (100% O2)        Vertex B (100% N2)

If we set the height of an equilateral triangle to h=100 units (representing 100% total gas concentration), any arbitrary point P inside the triangle satisfies:

dA​+dB​+dC​=h=100%

Where dA​, dB​, and dC​ are the perpendicular distances from point P to the sides opposite to vertices A, B, and C. Each distance represents the percentage concentration of the gas associated with that vertex.

3. Converting Ternary Coordinates to Cartesian (X, Y)

While human readers interpret ternary plots by following 60∘ grid lines, computers and graphing software (such as Python, MATLAB, or R) must render these points using standard Cartesian coordinates (x,y).

To convert a gas composition (FO2​,FN2​,FHe) into Cartesian coordinates, we define an equilateral triangle with a base width of 1 and a height of 23​​≈0.866.

Assigning Vertex Coordinates

Let the vertices of the triangle in Cartesian space be:

  • Oxygen Vertex (VO2​): (0,0) — Bottom-Left
  • Nitrogen Vertex (VN2​): (1,0) — Bottom-Right
  • Helium Vertex (VHe​): (0.5,23​​) — Top Apex

Transformation Formulas

To calculate the Cartesian position (x,y) of any gas blend:

x=FN2​+21​FHe

y=23​​FHe

Example Transformation: Trimix 18/45

Consider a standard deep-diving blend of Tx 18/45 (18% Oxygen, 45% Helium, and 37% Nitrogen):

  • FO2​=0.18
  • FN2​=0.37
  • FHe=0.45

Applying the conversion formulas:

x=0.37+21​(0.45)=0.37+0.225=0.595

y=23​​(0.45)≈0.866×0.45=0.3897

The point maps precisely to Cartesian coordinates (0.595,0.390), positioning it in the upper-central interior of the coordinate plane.

4. Mathematical Modeling of Physiological Limits

The primary power of a Trimix Triangle in gas planning is its ability to map linear equations representing human physiological limits across the coordinate space.

100% Helium
   /\
  /  \
 /    \    <-- Hypoxic Boundary Line (FO2 = 0.18)
/______\
\      /   <-- MOD Line (Maximum ppO2 at target depth)
 \    /
  \  /
   \/
100% Oxygen

Maximum Operating Depth (MOD) Lines

To avoid oxygen toxicity, partial pressure of oxygen (ppO2​) must not exceed 1.4 bar at maximum depth (Pambient​).

Max FO2​=Pambient​1.4 bar​

On a ternary plot, FO2​=constant forms a straight line parallel to the Nitrogen-Helium axis. All points on one side of this boundary represent safe operational breathing mixes for that depth.

Equivalent Narcotic Depth (END) Lines

Nitrogen produces narcosis under pressure, whereas helium does not. To calculate the Equivalent Narcotic Depth (END) in atmospheres:

Pnarcotic​=Pambient​×(1−FHe)

To restrict the narcotic exposure to a maximum limit (e.g., an equivalent air depth of 30 meters / 4.0 bar):

1−FHe≤Pambient​4.0 bar​

FHe≥1−Pambient​4.0 bar​

Because this sets a lower bound on helium fraction (FHe), it creates a horizontal boundary line across the triangle. Any blend above this line keeps narcosis below the specified limit.

5. Matrix Vector Operations in Gas Blending

When mixing gases sequentially—such as adding pure helium, topping off with oxygen, and pressurizing with atmospheric air—gas blenders move along vector paths inside the triangle.

Vfinal​=Ptotal​Pinitial​Vinitial​+ΔP1​Vgas1​+ΔP2​Vgas2​​

Where:

  • V represents the vector composition (FO2​,FN2​,FHe).
  • P represents partial cylinder pressures.

When pure helium (VHe​=[0,0,1]) is added to a cylinder, the state vector moves in a direct straight line toward the top apex. When topped off with air (Vair​=[0.21,0.79,0]), the trajectory vectors down toward the air coordinate on the baseline.

Conclusion: Bridging Geometry and Life Support

The Trimix Triangle is a practical application of coordinate geometry and vector algebra. By leveraging Vivian’s Theorem and affine transformations, complex multi-variable system equations are reduced to clear two-dimensional plots.

Understanding the underlying mathematics allows technical divers, software developers, and hyperbaric engineers to build precise digital visualizations, program automated blending systems, and ensure diver safety at depth.