Summarize:

There is no reason to be rude simply because you're ignoring someone. In fact, being rude will only escalate the situation. When you have to talk to the person, do so with formality. Say things like, "Please," "Excuse me," and "Thank you." Show the person basic manners while maintaining a somewhat stiff demeanor. This will show the person you're not being hostile but you don't want a lot of interactions with them. Ignoring someone should not be an aggressive act. Do not make faces at the person, roll your eyes when they talk, or blatantly pretend not to hear them when they address you. You are now being annoying in return, which is not a good way of dealing. Never taunt someone while you're ignoring them. You cannot completely tune someone out, especially if you work with that person. When necessary, acknowledge their presence in a manner that's polite but not overtly friendly. For example, offer a brief wave or nod when you pass them in the hallway. Reply to their question of, "How are you?" with "I'm fine. Thanks." Whenever you speak to this person, keep your sentences short and to the point. This will prevent any awkward or uncomfortable chatter. Sometimes, people may not take the hint. If someone continues to annoy you, even when you've tried to subtly indicate you don't want to talk to them, it's okay to make an excuse and walk away.  For example, a co-worker is being very critical about an aspect of your personal life. Even though you're giving non-comital responses, they keep at it. Say something like, "Okay, I appreciate the input, but I don't really need it and I have somewhere to be." Then, leave the situation.
Be formal with the person. Do not taunt the person. Acknowledge their presence when necessary. Walk away when necessary.