A century and a half ago, Maine ships traded around the world and brought wealth and bustling activity to port towns lie Wiscasset, Kennebunk and Bath - names as familiar to Americans then as Boston and New Orleans. Bath, on the Kennebec River, ranked fifth among American ports in 1850.

Not much of that prosperity survived the 19the century, and Maine today is the most sparsely populated state east of the Mississippi. Still, a considerable legacy remains in the presence of the handsome Federal and Greek Revival houses of the old seaports and river towns.

Images of these houses-in photographs, drawings, paintings, models and architectural ornaments-are at the heart of "Maine Forms of American Architecture," the current exhibit at The Octagon, American Institute of Architects Foundation, 1799 New York Ave. N.W. (Tuesday-Saturday 10-4/Sunday 1-4, through March 10). The materials were culled from a much larger collection assembled and exhibited by the Colby Museum of Art, Waterville, Maine, as a Bicentennial project. A companion text by the same title (Downeast Magazine, $19) was edited by Deborah Thompson.

The Octagon exhibit starts with prehistoric Indian settlements and moves on through early log buildings and Colonial architecture (1725 to 1790) to Federal style (1790 to 1825), Greek Revival (1835 to 1850), Gothic Revival and Italianate (1840 to 1830) and, finally, turn-of -the century architecture and what passes for modern.

Obviously much effort has gone into isolating what is distinctive about Maine architecture. Then, how can it be that there is not one photograph or painting in the Octagon exhibit of a strong, simple, dignified house with outbuildings attached? To some this will seem a negligible ommission. But to others like me-whose mind's eye tends to drift over Maine landscapes, at those times when, according to Lawrence Durrell, we are all fated to return to one compelling landscape-this slip may seem outrageous.

For what is truly singular about Maine architecture (the vernacular architecture, if you will) is its extraordinary blend of proportion and utility, of frugality and beauty. Few of the 18th-and 19th-century builders had formal training in design.Most, unlike their counterparts today, simply had an unerring sense of line and balance.

Their most ubiquitous creation was the carefully proportioned, spare, white house, with a bit of ornamentation at the front entrace, perhaps, and a series of attached sheds culminating in a large, heavy-timbered barn. The Yankee sense of utility and frugality dictated that there had to be easy access to livestock during hard winters. But the attached barn was by no means limited to farmhouses: until well after the turn of the century townspeople frequently had to accommodate a team of horses.

That one distressing ommission aside, there is much to be said in favor of what is included in the exhibit. The presentation is clear and unassuming and there are incidental glimpses of real feeling for the people and their origins, as in a century-old pencil sketch of a gnarled old apple tree "brot over in 1629 from England," and in a Shaker elder's joyful watercolor rendition of his Maine village viewed isometrically.

There are two photographs of the wonderful gambrel-roofed Colonial house built in 1755 in Stroudwater for George Tate. Mr. Tate was the King's Mast Agent, responsible for shipping to England the tall white pines that the King favored for the Royal Navy's sailing ships and had forbidden settlers to cut for their own use.

"Kavanagh," another of my favorite, stands on a knoll high above the mill runs on the Damariscotta River and is the setting for Robert Lowell's long peom "The Mills of the Kavanaghs." Architect Nicholas Codd of Boston built the two-story Federal structure in 1803 for James Kavanagh, an Irish immigrant who had prospered in shipping and "Who gave the Mills its lumberyard and weir In eighteen hundred, when our farmers saw John Adams bring their Romish church a bell, cast - so the records claim - by Paul Revere."

The "Romish" church with the Paul Revere bell is St. Patrick's of Damariscotta Mills, designed by Codd and built only five years after "Kavanagh." Although not represented in the exhibition, this oldest Catholic church in New England is of substantial architectural and historical interest. The harp, the heraldic symbol fo Ireland, appears on friezes over the sanctuary doorways to symbolize the origins of most of the congregation. The walls constructed by these farmers and fisherman from their locally baked brick are more than two feet thick.

The earliest places of worship in Maine were, of course, the meeting-houses, a building type that orginated in 17th century New England. Because Calvinism rejected the concept of holy places , there was no bar to using the buildings for town meetings and other public functions. Several Maine meetinghouses are still in use during the warm months.

Most important buildings erected in Maine after 1830 were architect-designed. In some cases the architects were already famous. Charles Bulfinch, the prominent architect of the Federal period, designed the State House: Fredick Law Olmsted, who created Central Park, laid out the campus of the University of Maine. However, a local architect, John Calvin Stevens, accounted almost singlehandedly for the shingled summer colonies that spread up and down the coast after the 1880s and began to bring the state fame as a summer paradise.