<dance name="Trip to Bavaria">

 
	<!-- should these position definitions contain the 'facing' attribute? -->
	<define_position name="man1Position"   place="100, -100" facing="90"/>
	<define_position name="man2Position"   place="200, -100" facing="90"/>
	<define_position name="man3Position"   place="300, -100" facing="90"/>
	<define_position name="man4Position"   place="400, -100" facing="90"/>
	<define_position name="woman1Position" place="100, 100"  facing="270"/>
	<define_position name="woman2Position" place="200, 100"  facing="270"/>
	<define_position name="woman3Position" place="300, 100"  facing="270"/>
	<define_position name="woman4Position" place="400, 100"  facing="270"/>

	<define_direction name="up" direction="180"/>
	<define_direction name="down" direction="0"/>
	<define_direction name="women's side" direction="90"/>
	<define_direction name="men's side" direction="270"/>

	<define_participants name="couple1" participants="man1,woman1"/>

	<define_person name="man1"   place="100, -100" facing="90" gender="male"/>
	<define_person name="man2"   place="200, -100" facing="90" gender="male"/>
	<define_person name="man3"   place="300, -100" facing="90" gender="male"/>
	<define_person name="man4"   place="400, -100" facing="90" gender="male"/>
	<define_person name="woman1" place="100, 100"  facing="270" gender="female"/>
	<define_person name="woman2" place="200, 100"  facing="270" gender="female"/>
	<define_person name="woman3" place="300, 100"  facing="270" gender="female"/>
	<define_person name="woman4" place="400, 100"  facing="270" gender="female"/>


	<transition participants="man2,man3,woman3,woman2" after="0.5"/>

	<figure name="first four bars" participants="man1,woman1,man2,woman2,man3,woman3,man4,woman4"/>

	<transition participants="man1,man2,man3,man4,woman1,woman2,woman3,woman4" before="0.5" after="0.5"/>

	<figure name="first four bars" participants="woman3,man3,woman1,man1,woman4,man4,woman2,man2"/>

	<transition participants="man1,man2,man3,man4,woman1,woman2,woman3,woman4" before="0.5" after="0.5"/>

	<figure name="first four bars" participants="man4,woman4,man3,woman3,man2,woman2,man1,woman1"/>

	<transition participants="man1,man2,man3,man4,woman1,woman2,woman3,woman4" before="0.5" after="0.5"/>

	<figure name="first four bars" participants="woman2,man2,woman4,man4,woman1,man1,woman3,man3"/>

	<transition participants="man2,man3,woman3,woman2" before="0.5" after="0.5"/>
	<transition participants="man1,man4,woman4,woman1" before="0.5" after="0.5"/>

	<finishing person="man1" place="man1Position" facing="down"/>
	<finishing person="woman1" place="woman1Position" facing="down"/>

	<finishing person="man2" place="man2Position" facing="up"/>
	<finishing person="woman2" place="woman2Position" facing="up"/>

	<finishing person="man3" place="man3Position" facing="women's side"/>
	<finishing person="woman3" place="woman3Position" facing="men's side"/>

	<finishing person="man4" place="man4Position" facing="women's side"/>
	<finishing person="woman4" place="woman4Position" facing="men's side"/>

	<wait participants="man1,woman1,man2,woman2" bar="19"/>

	<collision_avoidance yield="man1" rightofway="woman1">
		<move person="man1" place="woman2Position" direction="down" bar="21"/>
		<move person="woman1" place="man2Position" direction="down" bar="21"/>
	</collision_avoidance>

	<move person="man2" place="man1Position" direction="women's side" bar="21"/>
	<move person="woman2" place="woman1Position" direction="men's side" bar="21"/>

	<wait participants="man1,woman1,man3,woman3" bar="23"/>

	<collision_avoidance yield="man1" rightofway="woman1">
		<move person="man1" place="man3Position" direction="down" bar="25"/>
		<move person="woman1" place="woman3Position" direction="down" bar="25"/>
	</collision_avoidance>

	<move person="man3" place="man2Position" direction="women's side" bar="25"/>
	<move person="woman3" place="woman2Position" direction="men's side" bar="25"/>

	<wait participants="man1,woman1,man4,woman4" bar="27"/>
	
	<collision_avoidance yield="man1" rightofway="woman1">
		<move person="man1" place="woman4Position" direction="men's side" bar="29"/>
		<move person="woman1" place="man4Position" direction="women's side" bar="29"/>
	</collision_avoidance>

	<move person="man4" place="man3Position" direction="women's side" bar="29"/>
	<move person="woman4" place="woman3Position" direction="men's side" bar="29"/>

	<!-- couples 2, 3, and 4 advance and retire -->

	<hand_hold bars="4">
		<hand person="man2" which="right"/>
		<hand person="man3" which="left"/>
	</hand_hold>	
	<hand_hold bars="4">
		<hand person="man3" which="right"/>
		<hand person="man4" which="left"/>
	</hand_hold>	
	<hand_hold bars="4">
		<hand person="woman2" which="left"/>
		<hand person="woman3" which="right"/>
	</hand_hold>	
	<hand_hold bars="4">
		<hand person="woman3" which="left"/>
		<hand person="woman4" which="right"/>
	</hand_hold>	

	<shift person="man2" place="100, -20" bar="31"/>
	<shift person="man3" place="200, -20" bar="31"/>
	<shift person="man4" place="300, -20" bar="31"/>
	<shift person="woman2" place="100, 20" bar="31"/>
	<shift person="woman3" place="200, 20" bar="31"/>
	<shift person="woman4" place="300, 20" bar="31"/>

	<shift person="man2" place="100, -100" bar="33"/>
	<shift person="man3" place="200, -100" bar="33"/>
	<shift person="man4" place="300, -100" bar="33"/>
	<shift person="woman2" place="100, 100" bar="33"/>
	<shift person="woman3" place="200, 100" bar="33"/>
	<shift person="woman4" place="300, 100" bar="33"/>

	<figure name="turn both hands 1.5 times" participants="man1,woman1" directionOfTurn="left"/> 				



	
	<define_figure name="first four bars" bars="4" placement="fixed">

		<!-- The partipants are called man1, woman1 etc.  
			These names match the names of the dancers
			for the first four bars.
		However, this figure is repeated four times to complete
		the first 16 bars of the dance.  For the second four bars
		the person starting is man1's position is in fact woman3 etc.
		Woman three dances the exact same movements in the same positions
		for the second four bars that man1 danced in the first four bars.
		-->

		<!-- second and third couples start the figure with four hands
		around and thus would be positioned for a circle.
		We must define the position of all people so that the figure
		positions can be determined.

		However, the facing direction does not have to be specified
		because that is not needed by the initial movements in this figure.
		-->
				
		<define_person name="man1"   place="man1Position" facing="women's side"/>
		<define_person name="woman1" place="woman1Position"  facing="men's side"/>
		<define_person name="man2"/>
		<define_person name="woman2"/>
		<define_person name="man3"/>
		<define_person name="woman3"/>
		<define_person name="man4"   place="man4Position" facing="women's side"/>
		<define_person name="woman4" place="woman4Position"  facing="men's side"/>

	<figure name="cross" participants="man1,woman1" placement="person1Fix=(100,-100),person2Fix=(100,100),hands=right"/>
	<figure name="cross" participants="man4,woman4" placement="person1Fix=(400,-100),person2Fix=(400,100),hands=right"/>
	<figure name="hands across halfway" 				participants="man2,man3,woman3,woman2" 							placement="center=(250,0),firstPersonFacing=135,hands=right"/>

	<transition participants="man1,man2,man3,man4,woman1,woman2,woman3,woman4" before="0.5" after="0.5"/>

	<finishing person="man2" place="woman3Position" facing="down"/>
	<finishing person="woman2" place="man3Position" facing="down"/>
	<finishing person="man3" place="woman2Position" facing="up"/>
	<finishing person="woman3" place="man2Position" facing="up"/>

	<figure name="cross" participants="man1,man3" 					placement="person1Fix=(100,100),person2Fix=(200,100),hands=left"/>
	<figure name="cross" participants="woman1,woman3" 					placement="person1Fix=(100,-100),person2Fix=(200,-100),hands=left"/>
	<figure name="cross" participants="man2,man4" 					placement="person1Fix=(300,100),person2Fix=(400,100),hands=left"/>
	<figure name="cross" participants="woman2,woman4" 					placement="person1Fix=(300,-100),person2Fix=(400,-100),hands=left"/>


	</define_figure>


	<define_figure name="cross" bars="2">
		<define_person name="person1" place="100, -100" facing="90"/>
		<define_person name="person2" place="100, 100" facing="270"/>		

		<define_fix name="person1Fix" type="point" value="100, -100" default="person1"/>
		<define_fix name="person2Fix" type="point" value="100, 100" default="person2"/>
		<define_fix name="hands" type="chirality" value="right"/>

		<hand_hold bars="2">
			<hand person="person1" which="right"/>
			<hand person="person2" which="right"/>
		</hand_hold>	
		
		<move person="person1" place="80, 0" direction="90"/>
		<move person="person2" place="120, 0" direction="270"/>

		<move person="person1" place="100, 100" direction="90" bar="3"/>
		<move person="person2" place="100, -100" direction="270" bar="3"/>
	</define_figure>

	<define_figure name="hands across halfway" bars="2">
		<define_person name="person1"/>
		<define_person name="person2"/>		
		<define_person name="person3"/>
		<define_person name="person4"/>		

		<define_fix name="center" type="point" value="0, 0"/>
		<define_fix name="firstPersonFacing" type="orientation" value="0"/>
		<define_fix name="hands" type="chirality" value="right"/>

		<form_unit name="star" participants="person1,person2,person3,person4" type="four hand star" place="0, 0" facing="0" bar="1"/>
		<rotate person="star" facing="180" turn="-180" bar="3"/>
		<disband_unit name="star" bar="3"/>
		
		<define_unit_type name="four hand star">
			<define_person name="person1" place="0, 50" facing="0"/>	
			<define_person name="person2" place="-50, 0" facing="90"/>	
			<define_person name="person3" place="0, -50" facing="180"/>	
			<define_person name="person4" place="50, 0" facing="270"/>	

			<hand_hold place="0, 0">
				<hand person="person1" which="right"/>
				<hand person="person2" which="right"/>
				<hand person="person3" which="right"/>
				<hand person="person4" which="right"/>
			</hand_hold>	
		</define_unit_type>

	</define_figure>

	<define_figure name="turn both hands 1.5 times" bars="4">
		<define_person name="person1" place="100, -100" facing="90"/>
		<define_person name="person2" place="100, 100" facing="270"/>		

		<define_fix name="person1Fix" type="point" value="100, -100" default="person1"/>
		<define_fix name="person2Fix" type="point" value="100, 100" default="person2"/>
		<define_fix name="directionOfTurn" type="chirality" value="left"/>

		<transition participants="person1,person2" after="1"/>

		<form_unit name="couple" participants="person1,person2" type="two hand hold" place="0, 0" facing="45" bar="1"/>
		<rotate person="couple" facing="-45" turn="-450" bar="5"/>
		<disband_unit name="couple" bar="5"/>
		<transition participants="person1,person2" before="1"/>
		<finishing person="person1" place="100, 100" facing="270"/>
		<finishing person="person2" place="100, -100" facing="90"/>
		
		<define_unit_type name="two hand hold">
			<define_person name="man" place="-20, 0" facing="0"/>		
			<define_person name="woman" place="20, 0" facing="180"/>

			<hand_hold place="0, 20">
				<hand person="man" which="left"/>
				<hand person="woman" which="right"/>
			</hand_hold>	

			<hand_hold place="0, -20">
				<hand person="man" which="right"/>
				<hand person="woman" which="left"/>
			</hand_hold>	
		</define_unit_type>

	</define_figure>
</dance>