Drawing a circle in perspective

The red circle is inscribed in the square ABCD, which projects to the quadrilateral WXYZ on the xy plane using P as a point of perspective. The circle projects onto the orange conic inscribed in WXYZ.
You can move the point P to change the point of perspective. The red circle has centre O and radius OF, and you can move O and F to change these. The square ABCD will be automatically redrawn. Moving the points Q, R and S will change the plane containing the circle. You can rotate the whole figure by clicking and dragging.