<!-- This example ilustrates the locus_defined_by_point_on_circle constraint
A cardioid is constructed as the pedal of a circle
See http://xahlee.org/SpecialPlaneCurves_dir/Cardioid_dir/cardioid.html

Description:
	Let c be a circle and A a point on it
	For every point P on the circle:
		Let t be the tangent to c at P
		Let X be the point on t such that AX is perpendicular to PX
-->


<construction>
	<elements>
		<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>5</double>
				<double>1</double>
			</homogeneous_coordinates>
		</point>
		<point id="P">
			<homogeneous_coordinates>
				<double>5</double>
				<double>0</double>
				<double>1</double>
			</homogeneous_coordinates>
		</point>
		<point id="X">
			<homogeneous_coordinates>
				<double>5</double>
				<double>5</double>
				<double>1</double>
			</homogeneous_coordinates>
		</point>
		<line id="r">
			<homogeneous_coordinates>
				<double>0</double>
				<double>1</double>
				<double>0</double>
			</homogeneous_coordinates>
		</line>
		<line id="t">
			<homogeneous_coordinates>
				<double>1</double>
				<double>0</double>
				<double>-5</double>
			</homogeneous_coordinates>
		</line>
		<line id="l">
			<homogeneous_coordinates>
				<double>0</double>
				<double>1</double>
				<double>-5</double>
			</homogeneous_coordinates>
		</line>
		<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>-25</double>
			</matrix>
		</circle>
		<locus id="L">
		</locus>
	</elements>
	<constraints>
		<circle_by_center_and_point>
			<circle out="true">c</circle>
			<point>C</point>
			<point>A</point>
		</circle_by_center_and_point>
		<point_on_circle>
			<point out="true">P</point>
			<circle>c</circle>
		</point_on_circle>
		<line_through_two_points>
			<line out="true">r</line>
			<point>C</point>
			<point>P</point>
		</line_through_two_points>
		<line_perpendicular_to_line_through_point>
			<line out="true">t</line>
			<line>r</line>
			<point>P</point>
		</line_perpendicular_to_line_through_point>
		<line_perpendicular_to_line_through_point>
			<line out="true">l</line>
			<line>t</line>
			<point>A</point>
		</line_perpendicular_to_line_through_point>
		<point_intersection_of_two_lines>
			<point out="true">X</point>
			<line>t</line>
			<line>l</line>
		</point_intersection_of_two_lines>
		<locus_defined_by_point_on_circle>
			<locus out="true">L</locus>
			<point>X</point>
			<point>P</point>
			<circle>c</circle>
		</locus_defined_by_point_on_circle>
	</constraints>
</construction>

