Parameterizing the space of convex quadrilaterals If $P=\mathbb{R}^2$ is the plane, is there a continuous surjection from $P^4$ to the space of convex quadrilaterals?
Specifically, I'm looking for a continuous $f:P^4\to P^4$ such that:

*

*[convexity] for any $x$, the segments $f_1(x)f_3(x)$ and $f_2(x)f_4(x)$ intersect;

*[surjectivity] any convex quadrilateral $y$ with four distinct points is of the form $y=\sigma^i f(x)$ or $y=\sigma^i \tau f(x)$.

Here $\sigma$ and $\tau$ are a cyclic permutation and a reversal, $\sigma((a,b,c,d))=(b,c,d,a)$ and $\tau((a,b,c,d))=(d,c,b,a)$. So the conditions let the vertices overlap but require a suitable order, either clockwise or counterclockwise.
I'd be happy with positive or negative results about $f:P^n\to P^m$ for any $n\ge m\ge 4$. This may be topologically impossible, but I don't know the topology to prove it.
 A: Let $R\subseteq P$ be the region $\{(x,y)\in P:x>0,y>0, x+y>1\}$ and let $g:P\to R$ be continuous and bijective. Let $h(p_2, p_3, p_4; (x, y)) = p_3+(p_2-p_3)y + (p_4-p_3)x$. Note that $h: P^4 \to P$ is continuous, and that $h(p_2, p_3, p_4; q_i)=p_i$, where $q_2=(0,1)$, $q_3=(0,0)$, and $q_4=(1,0)$.
Let $f_1(p_1,p_2,p_3,p_4) = h(p_2, p_3, p_4; g(p_1))$ and $f_i(p_1,p_2,p_3,p_4) = p_i$ for $i=2,3,4$. $f:P^4\to P^4$ is continuous. When $p_2p_3p_4$ are not colinear, then $f$ yields a strictly convex nondegenerate quadrilateral. Even when $p_2p_3p_4$ are colinear, either $p_3$ is between $p_2$ and $p_4$ or either $p_2$ or $p_4$ are between $f_1$ and $p_3$, ensuring nonempty intersection of $p_2p_4$ and $f_1p_3$.
Given a nondegenerate convex quadrilateral $r_1r_2r_3r_4$, then $h^{-1}(r_2,r_3,r_4;r_1)\in R$ (where the inverse refers only to the last argument). So there exists $p_1$ such that $g(p_1) = h^{-1}(r_2,r_3,r_4;r_1)$ and so $r_i = f_i(p_1, r_2, r_3, r_4)$.

Additions from Matt F.: This algorithm results in patterns of images like

for $f\left(\!\Big(\dfrac{6-3t}2,\dfrac{6-3t}2\Big),(0,1),(0,0),(1.0)\!\right)$ on $1\le t\le 5$, and

for $f\left(\!(2,2),(0,1),\Big(\dfrac{t-2}3,\dfrac{t-2}3\Big),(1,0)\!\right)$ on $1\le t\le 5$ ($t=\frac72$ is degenerate).
All the graphs show a gray box for $(\pm2,\pm2)$, and use
$$g(x,y)=\left(\frac{1+e^y}{1+e^x},
\frac{1+e^y}{1+e^x}e^x\right)$$
Meawnwhile, here is another way to describe the algorithm and write the proof:
Let $R\subseteq P$ be the region $\{(x,y)\in P:x>0,\,y>0,\, x+y>1\}$.
Let $g:P\to R$ be continuous and bijective.
Let $h(a,b,c,d) = c + (b-c)g(a)_y + (d-c)g(a)_x.$
Let $f(a,b,c,d) = (h(a,b,c,d),\, b,\, c,\, d)$.
Then $f:P^4\to P^4$ is continuous.
Since $h(\cdot,b,c,d)$ is an affine transformation and $(g(a),(0,1),(0,0),(1,0))$ is convex,
\begin{align}
f(a,b,c,d) = \big(& h(\,g(a),b,c,d),\\
& h((0,1),b,c,d),\\
& h((0,0),b,c,d),\\
& h((1,0),b,c,d)\big)
\end{align}
is also convex.
If $(z,b,c,d)$ is a non-degenerate convex quadrilateral, then there are $i,j$ with $z = c + (b-c)j + (d-c)i$ and $i>0$, $j>0$, $i+j>1$. So there is $a$ with $g(a)=(i,j)$ and $f(a,b,c,d)=(z,b,c,d)$. Hence the requirement of surjectivity holds.
