@Override public void draw(Canvas canvas){
  PointF detectLeftPosition=mLeftPosition;
  PointF detectRightPosition=mRightPosition;
  if ((detectLeftPosition == null) || (detectRightPosition == null)) {
    return;
  }
  PointF leftPosition=new PointF(translateX(detectLeftPosition.x),translateY(detectLeftPosition.y));
  PointF rightPosition=new PointF(translateX(detectRightPosition.x),translateY(detectRightPosition.y));
  float distance=(float)Math.sqrt(Math.pow(rightPosition.x - leftPosition.x,2) + Math.pow(rightPosition.y - leftPosition.y,2));
  float eyeRadius=EYE_RADIUS_PROPORTION * distance;
  float irisRadius=IRIS_RADIUS_PROPORTION * distance;
  PointF leftIrisPosition=mLeftPhysics.nextIrisPosition(leftPosition,eyeRadius,irisRadius);
  drawEye(canvas,leftPosition,eyeRadius,leftIrisPosition,irisRadius,mLeftOpen);
  PointF rightIrisPosition=mRightPhysics.nextIrisPosition(rightPosition,eyeRadius,irisRadius);
  drawEye(canvas,rightPosition,eyeRadius,rightIrisPosition,irisRadius,mRightOpen);
}

@ Override public void draw ( Canvas canvas ) { PointF detectLeftPosition = mLeftPosition ; PointF detectRightPosition = mRightPosition ; if ( ( detectLeftPosition == null ) || ( detectRightPosition == null ) ) { return ; } PointF leftPosition = new PointF ( translateX ( detectLeftPosition . x ) , translateY ( detectLeftPosition . y ) ) ; PointF rightPosition = new PointF ( translateX ( detectRightPosition . x ) , translateY ( detectRightPosition . y ) ) ; float distance = ( float ) Math . sqrt ( Math . pow ( rightPosition . x - leftPosition . x , 2 ) + Math . pow ( rightPosition . y - leftPosition . y , 2 ) ) ; float eyeRadius = EYE_RADIUS_PROPORTION * distance ; float irisRadius = IRIS_RADIUS_PROPORTION * distance ; PointF leftIrisPosition = mLeftPhysics . nextIrisPosition ( leftPosition , eyeRadius , irisRadius ) ; drawEye ( canvas , leftPosition , eyeRadius , leftIrisPosition , irisRadius , mLeftOpen ) ; PointF rightIrisPosition = mRightPhysics . nextIrisPosition ( rightPosition , eyeRadius , irisRadius ) ; drawEye ( canvas , rightPosition , eyeRadius , rightIrisPosition , irisRadius , mRightOpen ) ; }
draws the current eye state to the supplied canvas . this will draw the eyes at the last reported position from the tracker , and the iris positions according to the physics simulations for each iris given motion and other forces .
