I have been working on this problem for my own research but I am a bit stuck on how to proceed.
The following problem is related to Viviani's Theorem but with some modifications. The problem I am trying to solve is as follows:
Assume you have an equilateral triangle as illustrated below. You are to select values of $p$, $q$, and $r$ such that $p,q,r \overset{iid}{\sim} U(0,1)$. What are the distributions of $x$, $y$, and $z$?
I am having difficulty determining the formulas for $x$, $y$, and $z$. Perhaps there is a better way of setting up the problem but I am not quite sure what that would be. If anyone can provide some insights then I would be very thankful.

You have: $$ \begin{align} \displaystyle\frac{\sqrt{3}}{2}q&=x+\frac{y}{2}\\ \displaystyle p&=\frac{q}{2}+\frac{\sqrt{3}}{2}y\\ \displaystyle\frac{\sqrt{3}}{2} (1-r)&=x+\frac{z}{2}\\ \displaystyle 1-p&=\frac{1-r}{2}+\frac{\sqrt{3}}{2}z \end{align} $$ hence: $$ \begin{align} r&=p-q+\frac{1}{2}\\ x&= \frac{2q-p}{\sqrt{3}}\\ y&= \frac{2 p-q}{\sqrt{3}}\\ z&=-\frac{p}{\sqrt{3}}-\frac{q}{\sqrt{3}}+\frac{\sqrt{3}}{2} \end{align} $$