From: jlw@gestalt.austin.tx.us (James Waldrop)
Subject: Re: CFD: mandala
Keywords: LPC
Organization: Los Alamos National Laboratory, NM
Date: Tue, 18 Aug 1992 04:46:11 GMT

amylaar@mcshh.Hanse.DE (Joern Rennecke) writes:
>From time to time, you have an algorithm with a structure that won't fit nicely
>in the classic paradigm of 'structured programming'. One of these structures
>resembles a mandala.

Oh, oh!  That reminds me of a another cute structure done by Alvar Aalto.
It doesn't really fit the classic 'church' paradigm, either, in fact,
it strongly resembles a lighthouse.  And he has another that looks
vaugely 'sea-shellish'.

>mandala(condition_1) {
>  ying:
>    statement_sequence_1;
>    if (condition_2) {
>	statement_sequence_2;
>	goto ying;
>    } else if (condition_3) {
>	statement_sequence_3;
>	goto yang;
>    }
>    statement_sequence_4;
>    break;
>  yang:
>    statement_sequence_5;
>    if (condition_4) {
>	statement_sequence_6;
>	goto ying;
>    } else if (condition_5) {
>	statement_sequence_7;
>	goto yang;
>    }
>    statement_sequence_8;
>    break;
>}

Ahhhh, yes, very pretty, but I think it shows a bit too much influence
from work of Boromino.  Not that Boromino was bad or anything, but he
is certainly passe'.

An alternate try might be something more like:

	twiddl()
	{
    bing();		dealy_whop();
			womble_foo++;
    twing_dat;
	}
    fii()
	{
	    !zell
	&&
	    !this_piece
     TWARD;
	     TWID;
		     check();
	      TWAK;
	}

As you can no doubt see, you get the same strong radial focus, yet
the tension produced by the opposite structures is more organic than
in your example.  Also the entire work as a whole is certainly
lighter, and can breathe much more easily.

>status ying;
>.
>.
>.
>ying = condition_1;
>for(;;) {
>    if (ying) {
>	statement_sequence_1;
>	if (condition_2) {
>	    statement_sequence_2;
>	    continue;
>	} else if (condition_3) {
>	    statement_sequence_3;
>	    ying = 0;
>	    continue;
>	}
>	statement_sequence_4;
>	break;
>      yang:
>	statement_sequence_5;
>	if (condition_4) {
>	    statement_sequence_6;
>	    ying = 1;
>	    continue;
>	} else if (condition_5) {
>	    statement_sequence_7;
>	    continue;
>    }
>    statement_sequence_8;
>    break;
>}

OH NO!  This is TERRIBLY out of balance, as if the writer has no
knowledge of even simple symmetry.  You are much too nice to call this
a cludge, rather it should be labelled 'TRAVESTY'.

>which is not only asymmetric, in emphasizing either ying or yang, but also
>introduces a lot of useless computations and an unnecessary variable in the
>surrounding block.

Hmm, I've sat here pondering your statement for many microseconds, and I
can't figure it out yet.  Perfect symmetry is dead.  The Greeks tried
it, and even did well at it for a while, but it's dead, d-e-a-d.  I'm
not sure why you're even trying to revive it.
Haven't you studied Klee or Aalto? 

>a switch instead of the outer if could cure the asymmetricness, but would
>introduce even more computational overhead.

A lot of people complain about overhead these days.  I don't think overhead
is so bad, though.  I mean, I look around the Victorian homes in my
neigborhood, and they have these rooms with INCREDIBLE overhead, and you
can't help but like it, even in its gaucheness.

>	amylaar
	sulam
-- 
James Waldrop
jlw@hebrew.cc.columbia.edu

I walk along the path muttering about signs and portents.
Newsgroups: rec.games.mud.lp