Transforming a square to regular triangle

76 Views Asked by At

I am trying to find the mapping for a square [(0,0),(1,0),(0,1),(1,1)] to a right angled triangle [(0,0),(1,0),(0,1)] then to a arbitary triangle in 2d.

The issue I am having is a) finding the mapping from the square to right angled triangle; b) the process in applying the mapping.

I know the process for the right angled triangle to the arbitary one:

$ (x,y)^T = \begin{bmatrix} x_1-x_0 & x_2-x_0\\ y_1-y_0 & y_2-y_0 \end{bmatrix} (\hat{x},\hat{y})^T+(x_0,y_0)^T$, where $\hat{}$ signifies the right angled triangle.

However, I am unsure what the original mapping is, i.e. the equation of the change.

For the square I am struggling to think of a mapping and then have no idea how to apply it. My first attempt was to take the mapping, $ (\hat{x},\hat{y})^T = (\eta_1(1-\eta_2),\ \eta_2)^T $.

Then find the Jacobian, $ J = \begin{bmatrix} 1-\eta_2 & \eta_1 \\ 0 & 1 \end{bmatrix} $.

Which gives the transformation, $ (\hat{x},\hat{y})^T = \begin{bmatrix} 1-\eta_2 & \eta_1 \\ 0 & 1 \end{bmatrix}(\eta_1,\eta_2)^T $ , I think.

The reason I look to do this is for numerical quadratures.

I am not sure if the above is correct so any advice would be great - even if it is a good book on mappings!