Initialized direction flags by setting initial intersection values