In this story, a man appears to a child who lives in a dystopian city, which I think is contained in a dome. He appears to the child once the pollution or radiation in the outside has dissipated enough for people to live. I think he is a hologram.

The child has to forage for cans of food to survive.  The man teaches the child a specific dance with a pattern on specific squares, and once the child does the dance, a way opens up to the outside.

It was written in 1982 or prior to that, because that is the year I read it, so it can't be the *City of Ember*.  I just read "This Time of Darkness" by H.M. Hoover, and that is not it either.  Does anyone remember such a story?