Light curve and line profile model for stars in single and binary systems