http://www.mathworks.com/matlabcentral/newsreader/view_thread/307167
MATLAB Central Newsreader  One interesting problem in geometry
Feed for thread: One interesting problem in geometry
enus
©19942015 by MathWorks, Inc.
webmaster@mathworks.com
MATLAB Central Newsreader
http://blogs.law.harvard.edu/tech/rss
60
MathWorks
http://www.mathworks.com/images/membrane_icon.gif

Mon, 02 May 2011 23:09:05 +0000
One interesting problem in geometry
http://www.mathworks.com/matlabcentral/newsreader/view_thread/307167#834091
samik
Given the coordinates of the 3 vertices of any triangle. How can we inscribe an equilateral triangle inside that given triangle. That means the vertices of the equilateral triangle will lie on the sides of the given triangle.Any one has any closed form solution to plot this equilateral triangle?

Mon, 02 May 2011 23:56:07 +0000
Re: One interesting problem in geometry
http://www.mathworks.com/matlabcentral/newsreader/view_thread/307167#834097
Florin Neacsu
"samik " <das.samik@gmail.com> wrote in message <ipndih$g5n$1@fred.mathworks.com>...<br>
> Given the coordinates of the 3 vertices of any triangle. How can we inscribe an equilateral triangle inside that given triangle. That means the vertices of the equilateral triangle will lie on the sides of the given triangle.Any one has any closed form solution to plot this equilateral triangle?<br>
<br>
Hi,<br>
<br>
The intersection of the three bisectors(I guess this is the word for the line separating an angle into two equal angles) have a common intersection point which is the center of a circle. If you consider the radius of that circle as S/p with S the surface of the triangle and p the semiperimeter, the you obtain an circle "interior" to the triangle. Whitin this circle you can construct an equilateral triangle.<br>
<br>
If you need functions to plot all this, I think you can find on fileexchange "geom2d".<br>
<br>
Regards,<br>
Florin

Tue, 03 May 2011 00:04:04 +0000
Re: One interesting problem in geometry
http://www.mathworks.com/matlabcentral/newsreader/view_thread/307167#834101
Roger Stafford
"samik " <das.samik@gmail.com> wrote in message <ipndih$g5n$1@fred.mathworks.com>...<br>
> Given the coordinates of the 3 vertices of any triangle. How can we inscribe an equilateral triangle inside that given triangle. That means the vertices of the equilateral triangle will lie on the sides of the given triangle.Any one has any closed form solution to plot this equilateral triangle?<br>
      <br>
The trouble with that problem is that in general there will be infinitely many possible solutions. To see this, suppose the given triangle is itself equilateral. Then any inner triangle made up of points on the three sides which have a common ratio of distances along the edges to the three outer vertices will necessarily also be equilateral. That is, if each point on a side cuts its edge in, say, a 2to3 ratio in a counterclockwise sense, then the three points points must all be the same distance apart.<br>
<br>
Or to view things differently, there are three independent parameters that would determine a triangle inscribed within another given triangle  that is three degrees of freedom. Requiring the inner triangle to be equilateral imposes only two conditions or equations on these three parameters. One more is needed for a unique solution.<br>
<br>
Roger Stafford

Tue, 03 May 2011 00:10:22 +0000
Re: One interesting problem in geometry
http://www.mathworks.com/matlabcentral/newsreader/view_thread/307167#834103
samik
"Florin Neacsu" wrote in message <ipngan$qp2$1@fred.mathworks.com>...<br>
> "samik " <das.samik@gmail.com> wrote in message <ipndih$g5n$1@fred.mathworks.com>...<br>
> > Given the coordinates of the 3 vertices of any triangle. How can we inscribe an equilateral triangle inside that given triangle. That means the vertices of the equilateral triangle will lie on the sides of the given triangle.Any one has any closed form solution to plot this equilateral triangle?<br>
> <br>
> Hi,<br>
> <br>
> The intersection of the three bisectors(I guess this is the word for the line separating an angle into two equal angles) have a common intersection point which is the center of a circle. If you consider the radius of that circle as S/p with S the surface of the triangle and p the semiperimeter, the you obtain an circle "interior" to the triangle. Whitin this circle you can construct an equilateral triangle.<br>
> <br>
> If you need functions to plot all this, I think you can find on fileexchange "geom2d".<br>
> <br>
> Regards,<br>
> Florin <br>
<br>
Hi Florin,<br>
<br>
But that triangle will not necessarily have its vertices falling on the sides of the given triangle. It will be inscribed in the circles though. Hence this will not be the solution of the problem that I mentioned.<br>
<br>
Samik

Tue, 03 May 2011 00:35:05 +0000
Re: One interesting problem in geometry
http://www.mathworks.com/matlabcentral/newsreader/view_thread/307167#834104
Florin Neacsu
"samik " <das.samik@gmail.com> wrote in message <ipnh5e$9vl$1@fred.mathworks.com>...<br>
> "Florin Neacsu" wrote in message <ipngan$qp2$1@fred.mathworks.com>...<br>
> > "samik " <das.samik@gmail.com> wrote in message <ipndih$g5n$1@fred.mathworks.com>...<br>
> > > Given the coordinates of the 3 vertices of any triangle. How can we inscribe an equilateral triangle inside that given triangle. That means the vertices of the equilateral triangle will lie on the sides of the given triangle.Any one has any closed form solution to plot this equilateral triangle?<br>
> > <br>
> > Hi,<br>
> > <br>
> > The intersection of the three bisectors(I guess this is the word for the line separating an angle into two equal angles) have a common intersection point which is the center of a circle. If you consider the radius of that circle as S/p with S the surface of the triangle and p the semiperimeter, the you obtain an circle "interior" to the triangle. Whitin this circle you can construct an equilateral triangle.<br>
> > <br>
> > If you need functions to plot all this, I think you can find on fileexchange "geom2d".<br>
> > <br>
> > Regards,<br>
> > Florin <br>
> <br>
> Hi Florin,<br>
> <br>
> But that triangle will not necessarily have its vertices falling on the sides of the given triangle. It will be inscribed in the circles though. Hence this will not be the solution of the problem that I mentioned.<br>
> <br>
> Samik<br>
<br>
Hello,<br>
Indeed, it will not. I overlooked that detailed. Sorry about that.<br>
Florin

Thu, 05 May 2011 23:16:05 +0000
Re: One interesting problem in geometry
http://www.mathworks.com/matlabcentral/newsreader/view_thread/307167#834629
Roger Stafford
"samik " <das.samik@gmail.com> wrote in message <ipndih$g5n$1@fred.mathworks.com>...<br>
> Given the coordinates of the 3 vertices of any triangle. How can we inscribe an equilateral triangle inside that given triangle. That means the vertices of the equilateral triangle will lie on the sides of the given triangle.Any one has any closed form solution to plot this equilateral triangle?<br>
         <br>
I have thought about your interesting geometry problem a little more, Samik. It seems to me that an appropriate canonical condition to place on the inscribed triangle is that it have a minimum perimeter, or what is equivalent in this case, a minimum possible area. With that requirement the inscribed triangle becomes unique and behaves as one might expect. In the case of an outer triangle which is also equilateral, the minimum inner equilateral triangle would have vertices located at the midpoints of the sides of the outer triangle.<br>
<br>
On paper I have managed to show that the solution can be found by maximizing (yes maximizing) a certain trigonometric expression which gives rise to a quite solvable equation of its derivative. I am sure that it could be made into a decent matlab procedure but it is sufficiently complicated that I haven't found the time to do it, (at least not yet.)<br>
<br>
After doing the above paper scribbling, I found the following websites which also purport to have a solution to this minimization problem, though I haven't had time to understand their presentation on that yet. They do acknowledge that it is a difficult problem. You might check them out if you are still interested:<br>
<br>
<a href="http://mathafou.free.fr/pbg_en/sol143.html">http://mathafou.free.fr/pbg_en/sol143.html</a><br>
<a href="http://mathafou.free.fr/pbg_en/sol143b.html">http://mathafou.free.fr/pbg_en/sol143b.html</a><br>
<br>
Roger Stafford

Sat, 07 May 2011 06:37:04 +0000
Re: One interesting problem in geometry
http://www.mathworks.com/matlabcentral/newsreader/view_thread/307167#834807
Roger Stafford
"Roger Stafford" wrote in message <ipvb3l$2k9$1@newscl01ah.mathworks.com>...<br>
> I have thought about your interesting geometry problem a little more, Samik. .... <br>
      <br>
I finally found time to translate my paper solution to the matlab function below which I have called 'mintri'. As I said earlier, its solution is unique by requiring that the inscribed triangle have a minimum area.<br>
<br>
I have subjected it to a number of tests and presumably all the bugs have been eliminated. If you encounter any difficulties, please let me know.<br>
<br>
I have not decided whether to enter it into the FEX. I doubt that very many people would be interested in such a special purpose function, but you never know.<br>
<br>
                            <br>
function T2 = mintri(T1)<br>
<br>
% T2 = mintri(T1)<br>
% Argument T1 is a 3 by 2 array in which its three rows<br>
% are each x,y coordinates defining the three vertices of<br>
% an outer triangle. The returned 3 by 2 array, T2, is a<br>
% similar representation of the three vertices of an<br>
% equilateral triangle inscribed in the sides of the outer<br>
% triangle and having the property that its area is the<br>
% minimum among all such inscribed equilateral triangles.<br>
% Roger Stafford  May 6, 2011<br>
<br>
PA = T1(1,:); PB = T1(2,:); PC = T1(3,:);<br>
A = atan2(abs(det([PBPA;PCPA])),dot(PBPA,PCPA));<br>
B = atan2(abs(det([PCPB;PAPB])),dot(PCPB,PAPB));<br>
C = atan2(abs(det([PAPC;PBPC])),dot(PAPC,PBPC));<br>
t1 = max(2/3*pi+2/3*[AB,BC,CA]);<br>
t2 = min( 2/3*pi+2/3*[CA,AB,BC]);<br>
k1 = cos((CB)/3)/sin(A)+cos((AC)/3)/sin(B)+cos((BA)/3)/sin(C);<br>
k2 = sin((CB)/3)/sin(A)+sin((AC)/3)/sin(B)+sin((BA)/3)/sin(C);<br>
t0 = atan2(k2,k1);<br>
if t1<=t0 & t0<=t2, t = [t1,t0,t2]; else t = [t1,t2]; end<br>
[ig,ix] = max(k1*cos(t)+k2*sin(t)); t = t(ix);<br>
s1 = sin(t/2 + pi/3 + (CA)/3)/sin(A);<br>
s1 = s1/(s1+sin(t/2 + pi/3 + (CB)/3)/sin(B));<br>
s2 = sin(t/2 + pi/3 + (AB)/3)/sin(B);<br>
s2 = s2/(s2+sin(t/2 + pi/3 + (AC)/3)/sin(C));<br>
s3 = sin(t/2 + pi/3 + (BC)/3)/sin(C);<br>
s3 = s3/(s3+sin(t/2 + pi/3 + (BA)/3)/sin(A));<br>
T2 = [s1*PB+(1s1)*PA;s2*PC+(1s2)*PB;s3*PA+(1s3)*PC];<br>
return<br>
                            <br>
<br>
Roger Stafford