Is there a homeomorphism between the $n$-dimensional cube to the $n$-dimensional simplex that doesn't create hard corners? This is related to a similar question found here. However, the mappings in response to that question create corners. Specifically, I've been playing with schemes where
- Set a direction to squeeze the point $x\in[0,1]^n$, $v$
- Project $x$ into the nullspace of $v$, $y = x - \frac{v^Tx}{v^Tv}v$
- Draw a line between $x$ and $y$, $l(\alpha) = \alpha(y-x)+x$
- $l(0)=x$, so we know it's in the hypercube. Find $$ \alpha_l = \arg\max\{\alpha\geq 0:l(\alpha)\in[0,1]^n\} $$ $$ \alpha_r = \arg\min\{\alpha\leq 0:l(\alpha)\in[0,1]^n\} $$ Basically, how far left and right we can travel and stay inside the cube
- Define the squeeze factor $$ \alpha = \frac{\alpha_l}{\alpha_l-\alpha_r} $$ Basically, how far between the leftmost and rightmost points we are along the direction $v$.
- Determine a new leftmost and rightmost point on the simplex, $$ z_l = l(\alpha_l) $$ $$ z_r = \frac{1-\sum x_i}{\sum (y_i-x_i)} $$ It turns out the left most point is the same for the cube and the simplex.
- Use the squeeze factor to determine the new mapping for $x$ $$ w=\alpha(z_r-z_l)+z_l $$
Anyway, that was a little circuitous, but it works. It turns out if $v=(1,\dots,1)$, we get the first answer to the linked question above. If we set $v = x$, we get the second scheme.
Alright, so what's the problem? This mapping makes something that kind of looks like a reentrant corner on smooth areas mapped to the simplex. For example, if we set $v=(1,\dots,1)$ and map a circle centered at $(0.5,0.5)$ of radius $0.25$ to the simplex, we go from
to
Basically, we get a heart shaped object with these hard corners. I've tried a bunch of different schemes for choosing $v$ and I keep getting corners, which is undesirable. I really want something that's mapped smoothly to the simplex.
Anyway, is there a smooth map from the hypercube to the simplex where where something like a circle mapped from the hypercube to the simplex won't have these corners?
Edit 1
I think @Del has a good answer and here's what it looks like. Given a rectangular grid
The scheme transforms this into
which shows how the grid is squished to fit into the simplex. It turns out this is smooth for the use case I described above. We can see this with the deformed circle
Anyway, thanks for the help!



