From: jerrys@umiacs.umd.edu (Jerry Sobieski)
Newsgroups: rec.skydiving
Subject: Re: Looking for pictures of formations
Date: 10 Sep 92 19:41:14 GMT
Organization: UMIACS, University of Maryland, College Park, MD 20742

In article <1992Sep10.054649.27970@zia.aoc.nrao.edu> dbriggs@zia.aoc.nrao.edu (Daniel Briggs) writes:
>In article <BuC7JL.BsG@virtech.uucp>
>  mark@vti.com writes:
>>Hiroto Shibuya (shibuya@mailhost.bl.cad.slb.com) wrote:
>>: I want to go even further.  I want to have electric representation of
>>: sequential RW....
>>
>>Wow!  That would be really neat.

I have worked on this before and have developed what *I* believe is
a reasonably simple relative work language (and its top priority
is student safety:-)  I call it "RWL".
Here is a taste.  If anyone wants to try to decipher what this
code fragment describes, I leave it as an exercise for the reader.

---begine code---

define dive(#1,#2,#3,#4){

    define diamond( point, rightwing, leftwing, tail) {
	formation:
		rightwing.left_hand=>point.right_leg,
		leftwing.right_hand=>point.left_leg,
		tail.left_hand=>leftwing.right_leg,
		tail.right_hand=>rightwing.left_leg;
	}
    define stairstep_lh(point,tail){
	formation:
		tail.left_hand=>point.right_leg;
	} 
	

    formation: 
		diamond(#1,#2,#3,#4), 
		S1=stairstep_lh(#1,#2), 
		S2=stairstep_lh(#3,#4);

    transition: 
		hold(S1),hold(S2);
		rotate(S1,180), rotate(S2,-360);

    formation: 
		S1.point.right_hand=> S2.tail.right_hand,
		S2.point.right_hand=> S1.tail.right_hand;

}

dive(Jerry,Eric,Art,Scratch);

---end code---

In the above example, the => operator indicates a grip
from the active participant to the passive participant;
The = operator creates a labeled instantiation of the associated 
construct.  Keywords are define, transition, formation,
right_leg, left_leg, etc.  The rotate() and hold() are intrinsic
functions.

If anyone has suggestions for improving the syntax and/or
symantics of such a language, please email me and we can 
discuss it and standardize it to somehow.

I have a parser for this language, but anything further becomes
*real hard*.  Animation is a bitch.  Generating time increments
that are realistic for each transition is tricky.  It boils down
to figuring the path which boils down to minimizing energy functions, 
formation orientation from one point to the next, rotation of 
individuals and pieces, etc.  

Trying to figure 
optimal paths for each player in 3 dimensions (x,y,t) with several
degrees of freedom (translation, rotation) such that an energy
function is minimized and pieces do not overlap, is difficult at best
for small formations (2,3,4 ways) and gets really difficult as
you get into 8,10,16 and 20 ways.  And then you may wish individuals
to end up in the same slot after each sequence of points - which
may not be the same as minimizing the point to point energy function.
Other considerations are exit order and placement, individual skill
levels, individual size and weight, etc.  Minor details such as 
flexible players are necessary to make 
many grips reach correctly which adds another degree of freedom to the
optimization algorithm.

I think a "good" sequence can be found, but optimization for the 
"best" sequence is not likely solvable.  And just looking for a good
solution is going to be a CPU hog.

A graphical editor would indeed be great.  I think an X based editor 
which could read and write rwl would be neat and is doable.  Its the path
planning that is the real challenge here.

Another neat and relatively easy project would be an rwl2ps (rwl to 
postscript) interpreter.

Personally, I think a virtual reality skydive is easier:_)

Jerry

-- 
Domain: jerrys@umiacs.umd.edu		    Jerry Sobieski
  UUCP:	uunet!mimsy!jerrys		University of Maryland
 Phone:	(301)405-6735		Institute for Advanced Computer Studies
 					College Park, Md 20742
Newsgroups: rec.skydiving