- #1
relroy
- 13
- 0
Hello,
I am writing a code in Mathematica to draw chain segements (Conformal Geometry - Hermetian matrix chains).
The purpose of the code is to take 3 complex numbers as input and test if they are collinear or not. If collinear, output should be a line else a circle or an arc passing through the 3 points. Below is the function DrawChainSegment so far.
DrawChainSegment[z0_, z1_, z2_] := Module[{output},
output = Line[{ToR2[zo], ToR2[z2]}];
Return[output];] /; LinearDependent[z2 - z1, z0 - z1];
DrawChainSegment[z0_, z1_, z2_] :=
Module[{}, "The case where we have a circle"] /; z0 == 0;
I am stuck at this so kindly suggest how to make the first case of drawing a line work and also help me in completing the module for the circle case. Any suggestions or tips are welcome. Thank you.
I am writing a code in Mathematica to draw chain segements (Conformal Geometry - Hermetian matrix chains).
The purpose of the code is to take 3 complex numbers as input and test if they are collinear or not. If collinear, output should be a line else a circle or an arc passing through the 3 points. Below is the function DrawChainSegment so far.
DrawChainSegment[z0_, z1_, z2_] := Module[{output},
output = Line[{ToR2[zo], ToR2[z2]}];
Return[output];] /; LinearDependent[z2 - z1, z0 - z1];
DrawChainSegment[z0_, z1_, z2_] :=
Module[{}, "The case where we have a circle"] /; z0 == 0;
I am stuck at this so kindly suggest how to make the first case of drawing a line work and also help me in completing the module for the circle case. Any suggestions or tips are welcome. Thank you.