On a sunny Friday afternoon in late October a pickup truck pulled up beside a bus stop in downtown Johannesburg. Several black youths jumped out and joined a small band gathered there. They grabbed bags of rocks and bricks from the back of the truck and headed for nearby shops.

It was over in a matter of minutes. About 20 white-owned stores were hit, windows smashed, goods in a few cases looted. By the time police arrived, the youths had melted away into the crowds on the sidewalks.

In the 16 months of riots, burnings and killings that have descended upon South Africa, the incident was little more than a footnote, one of a handful this past year in which black violence briefly spilled over into white areas. But in its premeditated organization and swift execution, it seemed like something more -- perhaps a prelude, a warning of things to come and of a day when blacks might take to the streets of white South Africa armed with guns and explosives, not just rocks.

Urban terrorism, as reflected in that incident and in last week's bomb blast that killed seven whites at a shopping center south of Durban, is one of the likely directions that analysts believe the struggle for South Africa could take if it is not resolved peacefully within the next few years.

There are many scenarios; indeed, predictions about the future have become almost a cottage industry here, reflecting the deep anxiety of whites and the great expectations of blacks.

There is no agreement on a timetable. The young "comrades" on the streets of black townships believe their liberation is only a year or two away. Their elders speak of five years, or 10. There is virtually no one in the black community who expects to be ruled by whites in the year 2000.

Among whites, the future is more hazy, although there is general agreement that South Africa will not remain the same. Many believe the unrest may be a chronic phenomenon and that the economic slide that has begun, and the flight of foreign firms and investment capital, is irreversible. Many South African firms have begun making plans to cope with further economic sanctions, which they believe are inevitable should liberal governments come to power in the United States, Britain and West Germany.

But the majority of the country's 5 million whites do not seem ready to accept the idea that black rule is inevitable. Many believe they can hold out indefinitely, albeit with a reduced standard of living and a higher, but tolerable, level of violence.

The attitude among many whites toward South Africa's approximately 22 million blacks, says political columnist Ken Owen, is that "we're giving up the notion we can rule them, but they won't rule us." Much of that attitude stems from the privileged economic and social position whites enjoy in South Africa and their fear of losing their status and their property under black rule. But for the Afrikaners, who make up 60 percent of the whites here and who control the government, there is another, deeper fear -- that of forfeiting their destiny as a nation, of becoming just another minority group in a country that is no longer theirs.

Afrikaners believed they had a divine right to nationhood and that they would always be vulnerable to hostile forces around them until they had a homeland of their own. The apartheid system of racial domination was designed to preserve and justify that homeland. To dismantle it now is to surrender a dream and to risk survival as a people and a culture. Many Afrikaners would rather partition the country and seal themselves off in a small enclave than face such a prospect.

"Afrikaners are not ready to entertain the notion of giving up power," said political scientist Hermann Giliomee. "The game is not about apartheid, it is about power. If you lose power, everything is up for grabs. In the end, whites will keep on shooting to protect their way of life, or they will pay others to do it."

Assuming white intransigence will prevail, planners for one major multinational firm have drawn up a grim but perhaps plausible scenario:

The noose of international sanctions slowly tightens around a defiant government, the economy continues to deteriorate and the resulting growth of black unemployment feeds township unrest. Black insurgents step up attacks on whites and an increasing number with marketable skills or liberal beliefs flee overseas. Eventually, the government falls, but it is succeeded not by black-majority rule but by a regime composed of extreme right-wing elements of the ruling National Party with strong support from the military and police.

Unfettered by the need to placate western critics, the new government proceeds to imprison, even execute, the country's internal "enemies." It authorizes new and larger military incursions into neighboring states to eliminate South African insurgents based there. It also strikes out against the West by repudiating the country's debt, seizing foreign assets and stopping foreign currency flows. South Africa hobbles into the 21st century under economic and political siege -- but still under white rule. Searching for Alternatives

A small but growing number of white moderates, believing they are faced with such a nightmare, are desperately searching for alternatives. They have bowed to the inevitability of black rule, even under the outlawed African National Congress, the main black resistance movement, but many see no path short of a bloodbath to get there. Their conversations often are laced with apocalyptic visions.

The Rev. Nico Smith, a Dutch Reformed minister, spoke of "a catharsis that will purify the entire country." Hennie Bester, one of the Afrikaner students at Stellenbosch University who, like Smith, was prevented by the government from traveling to Zambia to meet with the ANC, said he longs for "something dramatic" within the next year or two, something that would shock and alter white thinking.

"Otherwise," Bester warned, "we are looking at a protracted age of darkness, a civil war in which the whites, the Afrikaner and the English, will lose whatever they have."

One reason the future is so uncertain is that both the government and the ANC are nearing a generational change of leadership. South African President Pieter W. Botha is 69; ANC President Oliver Tambo, 68; and Nelson Mandela, the congress' imprisoned leader, 67.

While Botha stays in office, the government is likely to continue its two-pronged strategy of cracking down harshly on unrest and on political dissidents while pursuing its program of measured change. The state of emergency, which Botha first declared July 21, may be dropped, but many analysts expect some of its more stringent provisions to be retained, including the nationwide immunity for police and military actions taken to quell unrest and the ban on unauthorized press coverage.

When Parliament reconvenes at the end of January, Botha is likely to offer a legislative package that could include the restoration of black citizenship, changes in the country's restrictions on black movement, a legalized end to forced removals and new black property rights, all of which he unveiled in a series of double-edged, semantically dense speeches this year.

He is also expected to give some indication of his plans for a new constitution that would finally give blacks a political role in the national government, although probably as part of a racially based confederation that virtually no black leaders outside the nominally independent "homelands" would find acceptable. Botha: Angry Politician

Botha is a visceral politician, tough, angry and at times unpredictable. Some analysts believe he may call a snap election next year -- he doesn't have to hold one until 1989 -- in an attempt to hold a solid parliamentary majority for his National Party before its support is eroded further by a worsening economy and black violence. He may even call a white referendum to ask white support for whatever new constitutional plan Pretoria devises.

Once an election is out of the way, Botha could then retire gracefully, without appearing to have been hounded from office by the critics he so clearly despises.

He is unlikely to make the kind of dramatic concessions that most black leaders believe are necessary to defuse the crisis. Those would include releasing Mandela and other longtime ANC political prisoners, legalizing the organization and invi-ting its exiled leaders to return home for talks.

Botha has said he will not make such a move until the ANC leadership denounces violence, disowns its ties to South Africa's small Communist Party and submits to "constitutional means." Others believe he cannot afford a dramatic gesture because the government would risk losing control and the political initiative to the ANC -- and control is crucial to the cautious, incremental process Pretoria is wedded to.

More likely is that the government will continue down its present path and hope that at some point, after the radicals have been subdued by the police, black moderates will shed some of their natural distrust and come to Pretoria's bargaining table.

Gerrit Viljoen, the Cabinet minister in charge of black affairs and education and one of those tapped as a likely contender for power when Botha retires, conceded in an interview that even the govern-ment's white constituents were "impatient."

"They want dramatic steps," said Viljoen. "They want to know what's going to happen. There is definitely an impatience and a readiness on the part of the majority of the electorate to get on with reform."

Viljoen said he believes that "in the really short-term future," blacks will occupy "positions of power." Nonetheless, he added, the government is still committed to preserving "group rights and group security," which he defined as "differentiated residential areas, education and some form of group representation in political structures." That means the preservation of race classification statutes, which define "groups" and specify their members, and of the Group Areas Act, which enforces segregation in housing and schools. It also means rejection of the principle of one person, one vote.

Viljoen insists that all these matters can be discussed with blacks and perhaps altered at the bargaining table. Everything is negotiable, he says, except for a commitment to nonviolence. But Botha himself has sent out different signals, telling the Nationalist faithful at party congresses this year that Group Areas and segregated schools were inviolable. Boycotts Likely to Go On

None of this is acceptable to the vast majority of urban blacks, especially to the hard, young "comrades" who serve as the shock troops in the low-level insurrection that continues to boil in black and mixed-race townships. They have plans to make 1986 a "no-go" year for township schools in honor of the 10th anniversary of the Soweto riots. It is also likely that blacks will continue to use and refine economic weapons such as the boycotts against white businesses that proved devastatingly effective in the eastern Cape Province and parts of Cape Town this past year.

The "comrades" and the black community organizations that fall under the umbrella of the United Democratic Front may have an activist ally in the newly formed Congress of South African Trade Unions, whose leadership has pledged a new era of labor activism. If so, it could mean an increase in strikes, even a coordination between work absences and store boycotts that could further weaken South Africa's economy by withholding the two most important contributions blacks make -- their labor and their buying power.

The ANC, convinced Pretoria is a long way from the bargaining table, appears determined to step up its insurgency. After vowing to conduct a "people's war" at a consultative conference last June, the movement is beginning to hit at "soft" targets. Last week's shopping center bomb, planted in a wastebasket outside an ice cream parlor, was one of the first to have been aimed exclusively at white civilians. While the ANC has yet to either claim or deny responsibility for the blast, the incident suggests a new mood of angry militancy following a South African assassination raid on refugees in Lesotho. That raid, in turn, followed a land mine explosion in the northern Transvaal that killed six whites.

Analysts believe the ANC is still far from developing the disciplined clandestine networks that could launch a sustained guerrilla war or endure a long-term tit-for-tat campaign with the South Africans. Rural warfare is unlikely because of South Africa's vast barren spaces and the long distances between its borders and population centers. But the ANC is clearly moving in the direction of urban terror, with congress radio broadcasts from Ethiopia and Tanzania calling for blacks to organize and expand a network of small military cells. The recurring theme is that blacks must begin to bring the struggle into white areas, to pierce the protective veil around the white community.

"The whole country must go up in flames," said an August ANC broadcast from Addis Ababa. "Let there be no peace in all areas."

The rhetoric suggests a future in which Afrikaner and black nationalists are locked in a death grip that destroys them both and takes down several of South Africa's black neighboring states as well. But where most see intransigence and attrition, a few analysts see a glimmer of hope in the psychology of the Afrikaner.

Afrikaners are above all survivors, who withstood years of hardship on the high, hostile plateaus of southern Africa. Once they see that the choice is between survival under black rule or destruction, this argument goes, they will settle.

"There may be occasional episodes of organized violence against whites, but I don't see the ANC sustaining a major expansion of guerrilla activity," said political scientist Tom Lodge, an academic authority on black resistance movements. "In the end, the regime will collapse from within, when the groups whose support it enjoys withdraw." The Rhodesian Example

When considering the future, many South Africans look north to Zimbabwe, the former Rhodesia, which went through a seven-year struggle in which nearly 30,000 people died before blacks took power.

Like most historical analogies, it is imprecise and in some ways misleading. Landlocked Rhodesia's white population was far smaller than South Africa's, as was its economy. But in some ways it was less vulnerable to economic sanctions than South Africa, where 40 percent of the gross national product is tied in some way to foreign trade.

The international trade embargo on Rhodesia, which South Africa helped break, encouraged an economic boomlet for nearly a decade -- until gradually, combined with the assaults of black guerrillas, it began to wear the country down.

Nonetheless, the similarities between these two white bastions still echo. One of white Rhodesian prime minister Ian Smith's top security aides, who still lives in Zimbabwe and insists upon anonymity, has some pertinent advice to offer white South Africa.

He recalled that at one stage Rhodesian troops were killing 1,000 black guerrillas a month and were assuming they would quickly win the war. But at the same time, he said, black recruits were signing up with the guerrillas at the rate of 2,000 per month. "The measure of your success is not the number you kill but by the number of recruits your enemy is getting," said the aide. "For every guerrilla we killed we made at least two new enemies."

The aide had another piece of advice for South Africans: "You're better off settling it while you're ahead. We could have gotten a much better deal in 1971 than we got in 1979. Once things start going downhill you're in no position to negotiate anything except as a loser." Analogy in Algeria

But South Africans pondering the future might also look much further to the north to Algeria, where Africa's most bitter and brutal independence war was fought.

Again the parallels are imprecise. Algeria was a French colony, while South Africa is an independent nation, and there is no mother country to pull the plug on the Afrikaners the way the government of Gen. Charles de Gaulle finally put an end to French rule there. Before he did, as many as 1 million people died in eight years -- 1,000 times the number killed so far in South Africa.

But in other, less tangible ways, the Algerian nightmare has many frightening lessons to teach -- and both sides in the South African struggle have gone there to learn. Before independence, South African police and soldiers were sent to Algeria for training in combating urban guerrillas and in the brutal interrogation techniques that the French refined. In recent years, ANC insurgents have received guerrilla training in camps outside Algiers.

Heavy-handed repression, including the widespread use of police torture, was as common in Algeria as it is in South Africa. So, too, was the brutal response of the rebels to those branded as collaborators. Perhaps one-third of all the deaths in the war were Algerians killed by fellow Algerians -- a statistic that grimly parallels South Africa, where the same rough proportion of deaths in political violence has been the result of blacks killing other blacks.

The nature of the struggle also has eerie echoes. By any measure, France won the shooting war, gradually eliminating the guerrillas from urban centers and isolating them in small rural pockets. But it could never win the war for the loyalty of Algerians and, as in modern South Africa, every police or military operation that took civilian lives became a tool of radicalization and recruitment for the rebels.

The struggle finally triggered a crisis in French society similar to the one black activists hope to trigger in white society here. Lesson Learned Late

The French found out too late what some whites in South Africa are just learning -- that the elimination or imprisonment of opposition leaders may not crush a freedom movement so much as remake it into a faceless and even more uncontrollable force.

When white businessmen in the eastern Cape region sought to negotiate an end to this year's crippling economic boycotts, they found to their dismay that the black leaders they needed to approach were being held incommunicado. Until they were released there was no one to talk to.

In his book, "A Savage War of Peace," British historian Allistair Horne described a process of cruel inevitability that began to grind away at Algeria, destroying any middle ground between the warring sides.

"Once it took hold, there seemed no halting the pitiless spread of violence," wrote Horne. "It seemed as if events had escaped all human control; often, in Algeria, the essential tragedy was heightened by the feeling that -- with a little more magnanimity, a little more trust, moderation and compassion -- the worst might have been avoided."

Although the killing is still at a low level, the same process of human erosion appears to be taking hold in South Africa. Its shadow was evident earlier this month at two funerals in widely different settings.

The first was the mass rally of 50,000 gathered to bury 12 blacks killed by police in Mamelodi, a township on the outskirts of Pretoria, South Africa's capital. There were emotional displays of anger, ANC banners and slogans and vows of revenge.

But the most poignant moment came when a young father carried the small white coffin of his 2-month-old baby. She had suffocated to death from the fumes of tear gas fired by the police.

Two weeks later, two almost identical white coffins were buried in Tzaneen, a small Afrikaner farming town in the northern Transvaal. Inside were the bodies of an 8-year-old girl and her 2-year-old brother, who were among six whites killed when an ANC land mine blew up their pickup truck. Their mother was buried nearby. The ceremony was more subdued than at Mamelodi, but the anger and the longing for revenge ran just as deep.

It is likely that few participants at either ceremony could sense the invisible lines that ran from one funeral to the other, could see that the children buried at each had been the victims of the same war or that in death black and white were now, finally, equal. Nor would many at these funerals see that the war that claimed these small martyrs could be ended tomorrow if the will and the political nerve to do so could be found.

Until that happens, only one thing is certain: There will be many more funerals, more small white boxes, more victims of the struggle for South Africa.