Given an affine algebra [Formula: see text], where [Formula: see text] is a polynomial ring over a field [Formula: see text] and [Formula: see text] is an ideal in [Formula: see text], we study re-embeddings of the affine scheme [Formula: see text], i.e. presentations [Formula: see text] such that [Formula: see text] is a polynomial ring in fewer indeterminates. To find such re-embeddings, we use polynomials [Formula: see text] in the ideal [Formula: see text] which are coherently separating in the sense that they are of the form [Formula: see text] with an indeterminate [Formula: see text] which divides neither a term in the support of [Formula: see text] nor in the support of [Formula: see text] for [Formula: see text]. The possible numbers of such sets of polynomials are shown to be governed by the Gröbner fan of [Formula: see text]. The dimension of the cotangent space of [Formula: see text] at a [Formula: see text]-linear maximal ideal is a lower bound for the embedding dimension, and if we find coherently separating polynomials corresponding to this bound, we know that we have determined the embedding dimension of [Formula: see text] and found an optimal re-embedding.