<!-- This example ilustrates extraction of segment endpoints and posterior use
	
	ANALOGOUS WIRIS CODE:

	P = point(1,1)
	Q = point(3,1)
	R = point(2,3)
	s = segment(P,Q)
	P2 = s.1
	Q2 = s.2
	l = line(P2,R)
	m = line(Q2,R)
-->


<construction xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xml/intergeo.xsd">
	<elements>
		<point id="P">
			<homogeneous_coordinates>
				<double>1</double>
				<double>1</double>
				<double>1</double>
			</homogeneous_coordinates>
		</point>
		<point id="Q">
			<homogeneous_coordinates>
				<double>3</double>
				<double>1</double>
				<double>1</double>
			</homogeneous_coordinates>
		</point>
		<point id="R">
			<homogeneous_coordinates>
				<double>3</double>
				<double>1</double>
				<double>1</double>
			</homogeneous_coordinates>
		</point>
		<point id="P2">
			<homogeneous_coordinates>
				<double>1</double>
				<double>1</double>
				<double>1</double>
			</homogeneous_coordinates>
		</point>
		<point id="Q2">
			<homogeneous_coordinates>
				<double>3</double>
				<double>1</double>
				<double>1</double>
			</homogeneous_coordinates>
		</point>
		<line_segment id="s">
			<homogeneous_coordinates>
				<double>1</double>
				<double>1</double>
				<double>1</double>
			</homogeneous_coordinates>
			<homogeneous_coordinates>
				<double>3</double>
				<double>1</double>
				<double>1</double>
			</homogeneous_coordinates>
		</line_segment>
		<line id="l">
			<homogeneous_coordinates>
				<double>2</double>
				<double>-1</double>
				<double>-1</double>
			</homogeneous_coordinates>
		</line>
		<line id="m">
			<homogeneous_coordinates>
				<double>2</double>
				<double>1</double>
				<double>-7</double>
			</homogeneous_coordinates>
		</line>
	</elements>
	<constraints>
		<line_segment_by_points>
			<line_segment out="true">s</line_segment>
			<point>P</point>
			<point>Q</point>
		</line_segment_by_points>
		<endpoints_of_line_segment>
			<point out="true">P2</point>
			<point out="true">Q2</point>
			<line_segment>s</line_segment>
		</endpoints_of_line_segment>
		<line_through_two_points>
			<line out="true">l</line>
			<point>P2</point>
			<point>R</point>
		</line_through_two_points>
		<line_through_two_points>
			<line out="true">m</line>
			<point>Q2</point>
			<point>R</point>
		</line_through_two_points>
	</constraints>
</construction>
