Theorem: In triangle A1A2A3, let M1, M2, M3 be the midpoints of the sides A2A3, A3A1, A1A2, let H1, H2, H3 be the feet of the altitudes on these sides, and let N1, N2, N3 be the midpoints of the segments A1H, A2H, A3H, where H is the orthocenter of the triangle. Then, the nine points M1, M2, M3, H1, H2, H3, N1, N2, N3 lie on a circle whose center N is the midpoint of the segment joining the orthocenter H to the circumcenter O1 of the triangle, and whose radius is half the circumradius of the triangle.
Define the triangle A1A2A3.
Find the midpoints of A2A3, A1A3, A1A2.
Find the orthocenter and circumcenter of A1A2A3.
Find the altitudes of A1A2A3.
Define the points N1, N2, N3.
Check if M1, M2, M3, H1, H2, H3, N1, N2, N3 are on circle c1.
The Nine-Point Circle Theorem can now be plotted.