How to represent reflection of a particle inside a standard simplex?

68 Views Asked by At

I am trying to simulate the trajectory of an evolutionary system represented by a vector of probabilities $\vec p = [p_1, p_2,...] $. Values are restricted between 0 and 1. As a result we can think the system is contained in a standard simplex.

So far, so good. However, I would like to have the system to reflect every time it reach one of the borders of the simplex, i.e. $p_i =0$ for any $i$. By reflection I mean something similar to physical reflection of a light beam: to leave the border in the same angle and the same distance as the source, but in a different direction.

I found a somewhat simple rule in wikipedia:

${\displaystyle \operatorname {Ref} _{a}(v)=v-2{\frac {v\cdot a}{a\cdot a}}a,}$

However, it seems it requires the plane $a$ passing by origin, plus its describe the behavior of vector instead of a point. I searched for other formulas, but I must admit, got a little lost in the diversity of solutions.

Assuming there I have all positions of the system was up to the point it reaches the border, is there a more direct formula I can use?

1

There are 1 best solutions below

2
On BEST ANSWER

Angle measurement requires you to introduce metrics, which can be done differently resulting in different embeddings of the simplex into $\mathbf R^{k}$ ($k$ is the size of probability vector). However, let's discuss the most symmetric one (the one that creates a regular simplex as an embedding).

We will embed the simplex into $\mathbf R^{k}$ with vertices at the end of basis unit vectors. Thus, our simplex lies on a hyperplane $\sum p_i=1$. Its normal is: $$n=\frac1{\sqrt k}(1,\ldots,1)^T$$

To get the normal to the border lying at the hyperplane, we project the normal, for example, $e_1=(1,0,\ldots,0)$ to the hyperplane: $$v_1'=e_1-n(e_1,v),\qquad v_1=\frac{v_1'}{|v_1'|}=\frac1{\sqrt{k(k-1)}}\Big((k-1),-1,\ldots,-1\Big)^T$$ This vector is what we use in formula you have found.