MathGroup Archive 1999

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: in center of a triangle

  • To: mathgroup at smc.vnet.net
  • Subject: [mg19628] Re: in center of a triangle
  • From: phbrf at t-online.de (Peter Breitfeld)
  • Date: Mon, 6 Sep 1999 04:20:43 -0400
  • Organization: das ist ein breites Feld ...
  • References: <7qqbur$4gv@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Tom De Vries <tdevries at mail2.westworld.ca> schrieb:
> Hello!
> 
> I was wondering if anyone has seen or has written a Mathematica  procedure to
> generate the incenter of a triangle given the vertices of the triangle.  The
> incenter of a triangle is the point at which the angle bisectors meet.  From
> this point you can draw an inscribed circle in the triangle.
> 
> Thanks for any help you could offer on this!!
> 
> Tom De Vries
> Edmonton, Alberta, Canada
> 
Maybe you look for something like this:

Winkelhalb[A_List,B_List,C_List]:=
Module[{Wa,Wb,Wc,W,u,v,s,t},
        u=(A-C)/Sqrt[(A-C).(A-C)];
        v=(B-C)/Sqrt[(B-C).(B-C)];
        Wc=Flatten[A+(B-A)s/.Solve[C+(u+v)/2 t==A+(B-A)s,{s,t}]];
        u=(A-B)/Sqrt[(A-B).(A-B)];
        v=(C-B)/Sqrt[(C-B).(C-B)];
        Wb=Flatten[A+(C-A)s/.Solve[B+(u+v)/2 t==A+(C-A)s,{s,t}]];
        u=(C-A)/Sqrt[(C-A).(C-A)];
        v=(B-A)/Sqrt[(B-A).(B-A)];
        Wa=Flatten[B+(B-C)s/.Solve[A+(u+v)/2 t==B+(B-C)s,{s,t}]];
   W=Flatten[A+t(Wa-A)/.Solve[A+t(Wa-A)==B+s(Wb-B),{s,t}]];
   {W,Wa,Wb,Wc}
]

This function returns the incenter W of the triangel with vertices A, B
and C and the points Wa, Wb, Wc where the where the bisectors meet the
opposite sides of the triangle, so Wa ist the section point of the
bisector through A with BC.


Peter
-- 
=--=--=--=--=--=--=--=--=--=--=--=--=  http://home.t-online.de/home/phbrf  =--=
=--= Peter Breitfeld, Saulgau, Germany        PGP public key: 08548045  =--=--=



  • Prev by Date: RE: Transparent plot color?
  • Next by Date: Re: crystal structure?
  • Previous by thread: Re: in center of a triangle
  • Next by thread: Re: in center of a triangle