COAL is pouring down a chute into the basement of a skyscraper while 50 floors above diners in the revolving penthouse restaurant watch space shuttles returning from mining operations on distant planets.

Is there any connection between mine and mousse? Yes. Is it science fiction? Of course.

Nevertheless, Dr. Cyril A. Ponnamperuma, director of the Laboratory of Chemical Evolution at the University of Maryland, says it is not mere fantasy that food may someday be manufactured from coal.

Ponnamperuma is convinced that with a major research effort, humans can manufacture their food directly from the carbon, hydrogen, oxygen and nitrogen of which it is composed.

Call it "test-tube food," staples created independent of plants and animals.

The chemical synthesis of food is an idea others, including scientists at the National Aeronautics and Space Administration, have studied. NASA must come up with ways astronauts can live in space for long periods, without packing all the food with them from Earth. Transforming basic elements such as carbon, oxygen and hydrogen into proteins, carbohydrates and fats--and in space obtaining the elements from the carbon dioxide expelled by humans--may sound Star Trekkian. But NASA scientists and Ponnamperuma say it is possible--and perhaps in the next 20 or 30 years.

In his College Park laboratory, Ponnamperuma investigates the origins of life. "What we're really trying to do is to figure out what happened 4 1/2 billion years ago when the first amino acids, the first carbohydrates and the first fats were formed," he explains. He has simulated conditions in his laboratory that might have existed on primitive Earth and produced carbohydrates and amino acids, the building blocks of protein.

"We're going back to the very beginning, before plants and animals," says Ponnamperuma. "The first microorganisms that were around in that early ocean got their amino acids, their carbohydrates made by sunlight from the components of the early atmosphere. All we are suggesting right now, in a way, is to jump . . . back to that early stage."

A native of Sri Lanka, Ponnamperuma has seen hunger first hand. His statistics are sobering: by the year 2015, nearly 8 billion people will inhabit the Earth, double today's population. Considering hunger is so prevalent today, the amount of food produced on Earth will have to triple if malnutrition is to be eliminated, he says.

Ponnamperuma is fond of saying, "If we can make the material for our shirts, we should be able to make the stuff of our lunches."

"It does seem feasible," says Dr. John Billingham of NASA's Ames Research Center in Moffett Field, Calif., 30 miles south of San Francisco. "It's still very much a research type of idea, but all of us have little doubt in the years to come one could build such factories to turn out starch and sugar."

Several years ago, Billingham and other scientists conducted a design study of a chemical plant that would be built to produce carbohydrates. Such a food factory, says Billingham, would use carbon dioxide, water and megadoses of energy. In space, the carbon dioxide and water would come from people, the energy from the sun. On Earth, a food factory might be located next to a cement plant, Billingham suggests, because limestone gives off large quantities of carbon dioxide.

One of the major drawbacks of chemically synthesizing food is that it is energy-expensive. But, says Ponnamperuma, "if we can do enough research to find out that this can be done with less energy--for example, using solar energy--then we are in business."

What would this "fake food" look like, and would anybody want to eat it? Ponnamperuma thinks synthesized food would come in a powder form, not unlike the soy powder that already supplements many of today's processed foods. However, if modern food technology can turn soy powder and vegetable proteins into foods that look and taste like sausages or hamburgers, then the same can be done "from a synthetic powder that we make," says the renowned chemist.

Cooks of the future might even rely on computers, Ponnamperuma predicts, to help them turn synthesized food into an appetizing meal with the perfect aroma, taste and look.

"I think for a long time we'll be using plants and animals, but eventually, who knows," muses Ponnamperuma. "Agriculture might be something of the past. Agriculture is a very energy-consuming, time-consuming--I hate to say it--wasteful process."

Scientists at NASA, however, are working to take the waste out of agriculture. Their goal is to construct a total life-support system for astronauts on long sojourns that would use plants as sources of both food and oxygen. The carbon dioxide and wastes from the astronauts, in turn, would be recycled as food for the plants.

Dr. Robert V. MacElroy, a NASA biologist at the Ames Research Center, says increasing the efficiency of production of normal foods under a completely controlled environment is at the crux of the "Closed Ecological Life Support System" (CELSS). For example, research shows that plants in special chambers grow faster when the carbon dioxide concentration is increased 20 times above the level in the normal atmosphere and the oxygen is cut in half. Instead of soil, plants would be sprayed continuously with nutrient-dense liquids.

A CELSS system using rats might be operational in two or three years, says MacElroy, and by 1998, NASA hopes to pilot an experimental system supplying the food for two astronauts on a space station. Short-term experiments on future space shuttle missions are also on the drawing board to determine, for example, how plants will grow without gravity.

Research on intensive agriculture techniques in controlled environments can, of course, be applied to our own planet. There are places in the world where it is impossible to produce food in the normal manner, in deserts or mountainous regions, where it might be easy to build a small intensive agricultural facility, notes Billingham. MacElroy suggests it might even be economical today, for regions with a cold climate much of the year and where the food must be trucked in from long distances, to grow crops such as lettuce and tomatoes in controlled environments.

NASA is looking at other ways of feeding astronauts in space that could wind up on the dinner plates of the earthbound as well:

* Some types of algae can be eaten unprocessed, others would need to have the protein extracted. In any case, the astronauts would continuously raise algae culture.

* Sugars might be manufactured from the inedible parts of plants. The cellulose in the stalks and leaves of plants can be broken down by ruminant animals but not by humans. A system could be devised to break down the cellulose into sugars that humans can digest.

* New strains of plants might be designed with smaller stalks, roots and other inedible parts to make the plants more efficient (fewer nutrients would be taken up by the nonedible portions) and to save space. One example: dwarfed wheat, or wheat with a shortened stalk.