public void drawRadar(FrameBuffer buffer, Car car) {
      float xf=0;
      float zf=0;

      SimpleVector carPos=car.getTransformedCenter();
      SimpleVector temp=new SimpleVector();
      float rot=car.getDirection();
      float dx=(float) buffer.getOutputWidth()/10f;
      float dy=(float) buffer.getOutputHeight()/10f;
      float carPosX=(buffer.getOutputWidth()-dx-50);
      float carPosY=dy+50;

      for (int i=0; i<MAX_PLANTS; i++) {

         if (!plants[i].isDead()) {

            temp.x=positions[i].x-carPos.x;
            temp.z=positions[i].z-carPos.z;
            temp.rotateY(rot);

            xf=temp.x;
            zf=temp.z;

            if (xf>-600&&xf<600&&zf>-600&&zf<600) {
               int x=(int) (carPosX+((xf/600f)*(float) dx));
               int z=(int) (carPosY+((zf/600f)*-(float) dy));
               buffer.blit(radar, 0, 0, x, z, 4, 4, FrameBuffer.OPAQUE_BLITTING);
            }
         }
      }
      // Finally, a small red dot is blitted to show where the car is located
      buffer.blit(radar, 0, 0, (int) carPosX, (int) carPosY, 2, 2, FrameBuffer.OPAQUE_BLITTING);
   }