<!-- This example ilustrates the locus_defined_by_line_through_point and line_through_point constraints
The locus and the circle look like a mouth that opens and closes as P is moved
-->


<construction>
	<elements>
		<point id="P">
			<homogeneous_coordinates>
				<double>-8</double>
				<double>0</double>
				<double>1</double>
			</homogeneous_coordinates>
		</point>
		<point id="C">
			<homogeneous_coordinates>
				<double>0</double>
				<double>0</double>
				<double>1</double>
			</homogeneous_coordinates>
		</point>
		<point id="A">
			<homogeneous_coordinates>
				<double>0</double>
				<double>4</double>
				<double>1</double>
			</homogeneous_coordinates>
		</point>
		<point id="X1">
			<homogeneous_coordinates>
				<double>-4</double>
				<double>0</double>
				<double>1</double>
			</homogeneous_coordinates>
		</point>
		<point id="X2">
			<homogeneous_coordinates>
				<double>4</double>
				<double>0</double>
				<double>1</double>
			</homogeneous_coordinates>
		</point>
		<point id="M">
			<homogeneous_coordinates>
				<double>0</double>
				<double>0</double>
				<double>1</double>
			</homogeneous_coordinates>
		</point>
		<circle id="c">
			<matrix>
				<double>1</double>
				<double>0</double>
				<double>0</double>
				<double>0</double>
				<double>1</double>
				<double>0</double>
				<double>0</double>
				<double>0</double>
				<double>-16</double>
			</matrix>
		</circle>
		<line id="l">
			<homogeneous_coordinates>
				<double>0</double>
				<double>1</double>
				<double>0</double>
			</homogeneous_coordinates>
		</line>
		<locus id="L">
		</locus>
	</elements>
	<constraints>
		<line_through_point>
			<line out="true">l</line>
			<point>P</point>
		</line_through_point>
		<circle_by_center_and_point>
			<circle out="true">c</circle>
			<point>C</point>
			<point>A</point>
		</circle_by_center_and_point>
		<intersection_points_of_circle_and_line>
			<point out="true">X1</point>
			<point out="true">X2</point>
			<circle>c</circle>
			<line>l</line>
		</intersection_points_of_circle_and_line>
		<midpoint_of_two_points>
			<point out="true">M</point>
			<point>X1</point>
			<point>X2</point>
		</midpoint_of_two_points>
		<locus_defined_by_line_through_point>
			<locus out="true">L</locus>
			<point>M</point>
			<line>l</line>
			<point>P</point>
		</locus_defined_by_line_through_point>
	</constraints>
</construction>

