Desargues's theorem

From JSXGraph Wiki

1234−1−2−3−41234−1−2−3−4
q
p1
p2
p3
q1

The underlying JavaScript code