0
$\begingroup$

I am not a Math guy. So, if this question is silly, then please forgive me.

I have a triangle which has the following coordinates: (all the measurements are in cm.)

A - (35, 0)
B - (70, 70)
C - (0, 70)

I have filled this triangle with black color.

Now, I want to draw another triangle inside it. I don't know what the co-ordinates of that triangle will be. But after drawing new triangle i will fill it with red color and it should look like there is a black border of 1 cm around it.

Can you please let me know the co-ordinates for new triangle?

Update:

@Floris gave me this value of 3 pairs of vertices:

$(70-\frac{1}{2}(\sqrt{5}+1),69)$, $(35,\sqrt{5})$ and $(\frac{1}{2}(\sqrt{5}+1),69)$

In this case:

A - (35, 0)

B - (70, 70)

C - (0, 70)

P - $(35,\sqrt{5})$

Q - $(70-\frac{1}{2}(\sqrt{5}+1),69)$

R - $(\frac{1}{2}(\sqrt{5}+1),69)$

Which gives me output like:

enter image description here

But now suppose I want to have border of 10 cm:

So, I changed the value to: (please consider x = 10)

A - (35, 0)

B - (70, 70)

C - (0, 70)

P - 35,x√5

Q - 70-((x/2)(√5+x)),70-x

R - (1/2)(√5+x),70-x

But I am getting

enter image description here

I want the formula for inner triangle's vertices. In short I need P, Q, and R having some x.

$\endgroup$
2
$\begingroup$

Note that the edges are given by $\overline{AB}=\{(x+35,2x):x\in[0,35]\}$, $\overline{BC}=\{(x,70):x\in[0,70]\}$ and $\overline{AC}=\{(35-x,2x):x\in[0,35]\}$. The linepieces on centimetre from the edges are given by $$\hat{AB}=\{(35+x-\frac{2}{5}\sqrt{5},2x+\frac{1}{5}\sqrt{5}):x\in[0,35]\},$$ $$\hat{BC}=\{(x,69):x\in[0,70]\}$$ and $$\hat{AC}=\{(35-x+\frac{2}{5}\sqrt{5},2x+\frac{1}{5}\sqrt{5}):x\in[0,35]\}$$ which have intersections $(70-\frac{1}{2}(\sqrt{5}+1),69)$, $(35,\sqrt{5})$ and $(\frac{1}{2}(\sqrt{5}+1),69)$, which are the coordinates of the red triangle.

This process can be generalised for different borders. Note that $$\hat{AB}=\overline{AB}-(\frac{2}{5}\sqrt{5},\frac{1}{5}\sqrt{5})$$ here $(\frac{2}{5}\sqrt{5},\frac{1}{5}\sqrt{5})$ is a unit vector which is orthogonal to $\overline{AB}$. So if we want a border of length $l$, then we can just take $$\hat{AB}_{l}=\overline{AB}-l\cdot(\frac{2}{5}\sqrt{5},\frac{1}{5}\sqrt{5})$$ This gives us $$\hat{AB}_{l}=\{(35+x-\frac{2l}{5}\sqrt{5},2x+\frac{l}{5}\sqrt{5}):x\in[0,35]\},$$ $$\hat{BC}_{l}=\{(x,70-l):x\in[0,70]\}$$ and $$\hat{AC}_{l}=\{(35-x+\frac{2l}{5}\sqrt{5},2x+\frac{l}{5}\sqrt{5}):x\in[0,35]\}.$$ To calculate the coordinates of the new triangle we have to find the intersections of the triangles, these are given by: $$\hat{AB}_{l}\cap\hat{AC}_{l}=\{(35,l\sqrt{5})\}$$ as due to symmetry $35=35-x+\frac{2l}{5}\sqrt{5}\Leftrightarrow x=\frac{2l}{5}\sqrt{5}$. From which it then follows that $2x+\frac{l}{5}\sqrt{5}=l\sqrt{5}$. For $\hat{AB}_{l}\cap\hat{BC}_{l}$ we can solve $$70-l=2x+\frac{l}{5}\sqrt{5}\Leftrightarrow x=35-\frac{l}{2}(1+\frac{1}{5}\sqrt{5})$$ which then gives $35+x-\frac{2l}{5}\sqrt{5}=70-\frac{l}{2}(1+\sqrt{5})$. Hence $$\hat{AB}_{l}\cap\hat{BC}_{l}=\{(70-\frac{l}{2}(1+\sqrt{5}),70-l)\}.$$ Finally by symmetry we find that $$\hat{AC}_{l}\cap\hat{BC}_{l}=\{(\frac{l}{2}(1+\sqrt{5}),70-l)\}.$$

$\endgroup$
  • $\begingroup$ First of all thanks for giving me an accurate answer. I have checked (70−12(5‾√+1),69) , (35,5‾√) and (12(5‾√+1),69), and it works perfectly. I really don't understand the calculations that you have put in your answer. And now I need a border of 2 or 3 pixels at some places. So, can you please give me the formula for border = x? Sorry, if I asked for too much help. $\endgroup$ – Vishal Mar 29 '19 at 7:14
  • $\begingroup$ @Vishal I've changed the bounds of $x$ to precisely give the edges of the red triangle. $\endgroup$ – Floris Claassens Mar 29 '19 at 10:03
  • $\begingroup$ Sorry, i was unable to explain you what exactly i need. You have given me the formula to get the sides of red triangle, but I need the formula for the vertices of red triangle. The vertices that you gave me last time works fine for me. But thats static for 1 cm border. I want that dynamic. So, that in some triangles I have border = 2 or border = 3 or border = 10, where I will be able to calculate the vertices of inner triangle by just replacing x with the desired border. $\endgroup$ – Vishal Mar 29 '19 at 10:20
  • $\begingroup$ I'm not exactly sure what you need, could you explain by for example giving what you understand to be the vertices of a simple triangle? I'll try to go from there. $\endgroup$ – Floris Claassens Mar 29 '19 at 10:27
  • $\begingroup$ I have updated the question with relevent information. Please take a look at it. Thanks again for taking time for me. $\endgroup$ – Vishal Mar 29 '19 at 10:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.