Lie algebras associated with triangular configurations