Skip to main content

Tetrahedron

Live Editor

function Canvas() {
      const geo = tetrahedron({ radius: 0.5 })
      const mat = rotate3dX(iDrag.y).mul(rotate3dY(iDrag.x))
      const gl = useGL({
              isWebGL: true,
              isDepth: true,
              count: geo.count,
              vertex: vec4(mat.mul(geo.vertex), 1),
              fragment: vec4(varying(geo.normal), 1),
      })
      return <canvas ref={gl.ref} />
}
Result
Loading...

Tetrahedron Props

radiusThe tetrahedron radius.
Default is 1.

Tetrahedral Symmetry Structure

The tetrahedron represents the simplest three-dimensional polyhedron with triangular faces. Each vertex connects to exactly three other vertices, forming four equilateral triangular faces. The tetrahedral angle between faces equals arccos(1/3)109.47°\arccos(-1/3) \approx 109.47°, creating fundamental geometric relationships in crystal structures.

The face normals point outward from each triangular surface, maintaining unit length through normalization. Face orientation follows right-hand rule with vertices ordered counterclockwise when viewed from outside.

vertices={(1,1,1),(1,1,1),(1,1,1),(1,1,1)}\text{vertices} = \{(1,1,1), (-1,-1,1), (-1,1,-1), (1,-1,-1)\} faces={[2,1,0],[0,3,2],[1,3,0],[2,3,1]}\text{faces} = \{[2,1,0], [0,3,2], [1,3,0], [2,3,1]\}

Edge Length Computation

The edge length of a tetrahedron with radius rr follows the relationship where all edges maintain equal length. The distance between any two vertices creates uniform edge lengths throughout the structure.

edge length=r83=r223\text{edge length} = r \sqrt{\frac{8}{3}} = r \cdot 2\sqrt{\frac{2}{3}}