<!-- This example ilustrates the locus_defined_by_point_on_line_segment constraint
F is a focus, L is the locus of shadow points of line_segment AB
This example would look a little bit prettier with rays instead of lines
-->


<construction>
	<elements>
		<point id="F">
			<homogeneous_coordinates>
				<double>-5</double>
				<double>0</double>
				<double>1</double>
			</homogeneous_coordinates>
		</point>
		<point id="A">
			<homogeneous_coordinates>
				<double>0</double>
				<double>1</double>
				<double>1</double>
			</homogeneous_coordinates>
		</point>
		<point id="P">
			<homogeneous_coordinates>
				<double>0</double>
				<double>0</double>
				<double>1</double>
			</homogeneous_coordinates>
		</point>
		<point id="B">
			<homogeneous_coordinates>
				<double>0</double>
				<double>-1</double>
				<double>1</double>
			</homogeneous_coordinates>
		</point>
		<point id="A2">
			<homogeneous_coordinates>
				<double>5</double>
				<double>2</double>
				<double>1</double>
			</homogeneous_coordinates>
		</point>
		<point id="X">
			<homogeneous_coordinates>
				<double>5</double>
				<double>0</double>
				<double>1</double>
			</homogeneous_coordinates>
		</point>
		<point id="B2">
			<homogeneous_coordinates>
				<double>5</double>
				<double>-2</double>
				<double>1</double>
			</homogeneous_coordinates>
		</point>
		<line_segment id="s">
			<homogeneous_coordinates>
				<double>0</double>
				<double>1</double>
				<double>1</double>
			</homogeneous_coordinates>
			<homogeneous_coordinates>
				<double>0</double>
				<double>-1</double>
				<double>1</double>
			</homogeneous_coordinates>
		</line_segment>
		<line id="lA">
			<homogeneous_coordinates>
				<double>1</double>
				<double>-5</double>
				<double>5</double>
			</homogeneous_coordinates>
		</line>
		<line id="lB">
			<homogeneous_coordinates>
				<double>1</double>
				<double>5</double>
				<double>5</double>
			</homogeneous_coordinates>
		</line>
		<line id="l">
			<homogeneous_coordinates>
				<double>0</double>
				<double>1</double>
				<double>0</double>
			</homogeneous_coordinates>
		</line>
		<line id="g">
			<homogeneous_coordinates>
				<double>1</double>
				<double>0</double>
				<double>-5</double>
			</homogeneous_coordinates>
		</line>
		<point id="U">
			<homogeneous_coordinates>
				<double>5</double>
				<double>6</double>
				<double>1</double>
			</homogeneous_coordinates>
		</point>
		<point id="D">
			<homogeneous_coordinates>
				<double>5</double>
				<double>-6</double>
				<double>1</double>
			</homogeneous_coordinates>
		</point>

		<locus id="L">
		</locus>
	</elements>
	<constraints>

		<line_segment_by_points>
			<line_segment out="true">s</line_segment>
			<point>A</point>
			<point>B</point>
		</line_segment_by_points>
		<point_on_line_segment>
			<point out="true">P</point>
			<line_segment>s</line_segment>
		</point_on_line_segment>
		<line_through_two_points>
			<line out="true">g</line>
			<point>U</point>
			<point>D</point>
		</line_through_two_points>
		<line_through_two_points>
			<line out="true">lA</line>
			<point>F</point>
			<point>A</point>
		</line_through_two_points>
		<line_through_two_points>
			<line out="true">lB</line>
			<point>F</point>
			<point>B</point>
		</line_through_two_points>
		<line_through_two_points>
			<line out="true">l</line>
			<point>F</point>
			<point>P</point>
		</line_through_two_points>
		<point_intersection_of_two_lines>
			<point out="true">A2</point>
			<line>lA</line>
			<line>g</line>
		</point_intersection_of_two_lines>
		<point_intersection_of_two_lines>
			<point out="true">B2</point>
			<line>lB</line>
			<line>g</line>
		</point_intersection_of_two_lines>
		<point_intersection_of_two_lines>
			<point out="true">X</point>
			<line>l</line>
			<line>g</line>
		</point_intersection_of_two_lines>

		<locus_defined_by_point_on_line_segment>
			<locus out="true">L</locus>
			<point>X</point>
			<point>P</point>
			<line_segment>s</line_segment>
		</locus_defined_by_point_on_line_segment>
	</constraints>
</construction>

