ternary_data function

Prepare data for showing contours in ternary diagrams.