The two most important concepts are balance and duration.
Include all sides of the room and focus your eyes long enough to make a point.
If you sweep the audience with your eyes you will be perceived as nervous and you won't have a connection. In many Western cultures direct eye contact is a sign of confidence. In one-to-one presentations look at the person 70% of the time.
When speaking to large groups, divide the room into sections or quadrants. Find a smiling face and focus your eye contact. Look at that person for a complete sentence or two. That takes about 5 seconds. Don't focus on a negative facial expression because that will shatter your confidence.
Now find a person in another section. Look at her for 5 seconds. Continue this process until you have hit all the sections of the audience.
In larger audiences, the people immediately sitting near your target will think you are also looking at them. We connect through the eyes and this is how you form a relationship with the group.