Principals of refraction of a light ray are used to identify the location of an interface between two materials having different refractive indices. The interface may be an interface between a plasma layer and a red blood cell layer of a centrifuged container, for example. An array of light detector elements are arranged to receive light that has been refracted through different layers in a centrifuged sample. Elements of the light detector array are arranged at known locations relative to an emitter of the light so detection of light by one or more particular detector elements is indicative of the angle of refraction of the light. Vertical position of the sample is tracked and correlated with corresponding angles of refraction to determine the vertical position of the sample when a change in the angle of diffraction is detected.