Desargues's theorem

From JSXGraph Wiki

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

The underlying JavaScript code