(* ::Package:: *)

(* ::Section:: *)
(*stiff*)


SetDirectory[NotebookDirectory[]];
<<PluckerToolbox.m;
IdealCoordinateLines={
IdealXLine=LineThrough[YIdealPoint,ZIdealPoint],
IdealYLine=LineThrough[ZIdealPoint,XIdealPoint],
IdealZLine=LineThrough[XIdealPoint,YIdealPoint]};

(*P-Lines*)

(*P-Lines Z-Family*)
PLineZPlusPlus[k_]:=IntersectionLine[ZLevel[2],Plane[{1,-1,0,Sqrt[k-2]}]];
PLineZPlusMinus[k_]:=IntersectionLine[ZLevel[2],Plane[{1,-1,0,-Sqrt[k-2]}]];
PLineZMinusPlus[k_]:=IntersectionLine[ZLevel[-2],Plane[{1,1,0,-Sqrt[k-2]}]];
PLineZMinusMinus[k_]:=IntersectionLine[ZLevel[-2],Plane[{1,1,0,Sqrt[k-2]}]];
PLinesZ[k_]:={PLineZPlusPlus[k],PLineZPlusMinus[k],PLineZMinusPlus[k],PLineZMinusMinus[k]};

(*P-Lines Y-Family*)
PLineYPlusPlus[k_]:=IntersectionLine[YLevel[2],Plane[{-1,0,1,Sqrt[k-2]}]];
PLineYPlusMinus[k_]:=IntersectionLine[YLevel[2],Plane[{-1,0,1,-Sqrt[k-2]}]];
PLineYMinusPlus[k_]:=IntersectionLine[YLevel[-2],Plane[{1,0,1,-Sqrt[k-2]}]];
PLineYMinusMinus[k_]:=IntersectionLine[YLevel[-2],Plane[{1,0,1,Sqrt[k-2]}]];
PLinesY[k_]:={PLineYPlusPlus[k],PLineYPlusMinus[k],PLineYMinusPlus[k],PLineYMinusMinus[k]};

(*P-Lines X-Family*)
PLineXPlusPlus[k_]:=IntersectionLine[XLevel[2],Plane[{0,1,-1,Sqrt[k-2]}]];
PLineXPlusMinus[k_]:=IntersectionLine[XLevel[2],Plane[{0,1,-1,-Sqrt[k-2]}]];
PLineXMinusPlus[k_]:=IntersectionLine[XLevel[-2],Plane[{0,1,1,-Sqrt[k-2]}]];
PLineXMinusMinus[k_]:=IntersectionLine[XLevel[-2],Plane[{0,1,1,Sqrt[k-2]}]];
PLinesX[k_]:={PLineXPlusPlus[k],PLineXPlusMinus[k],PLineXMinusPlus[k],PLineXMinusMinus[k]};

SlopePlus[k_] := (Sqrt[k+2]+Sqrt[k-2])/2;
SlopeMinus[k_] := (Sqrt[k+2]-Sqrt[k-2])/2;
(*C-Lines*)


(* I think this is faulty: Plus andd Minus should be interchanged? I'll do that now *)
(*C-Lines Z-Family*)
CLineZPlusPlus[k_]:=IntersectionLine[ZLevel[Sqrt[k+2]],Plane[{1,-SlopeMinus[k],0, 0}]];
CLineZPlusMinus[k_]:=IntersectionLine[ZLevel[Sqrt[k+2]],Plane[{1,-SlopePlus[k],0, 0}]];
CLineZMinusPlus[k_]:=IntersectionLine[ZLevel[-Sqrt[k+2]],Plane[{1,SlopeMinus[k],0, 0}]];
CLineZMinusMinus[k_]:=IntersectionLine[ZLevel[-Sqrt[k+2]],Plane[{1,SlopePlus[k],0, 0}]];
CLinesZ[k_]:={CLineZPlusPlus[k],CLineZPlusMinus[k],CLineZMinusPlus[k],CLineZMinusMinus[k]};

(*C-Lines Y-Family*)
CLineYPlusPlus[k_]:=IntersectionLine[YLevel[Sqrt[k+2]],Plane[{-SlopeMinus[k],0,1, 0}]];
CLineYPlusMinus[k_]:=IntersectionLine[YLevel[Sqrt[k+2]],Plane[{-SlopePlus[k],0,1, 0}]];
CLineYMinusPlus[k_]:=IntersectionLine[YLevel[-Sqrt[k+2]],Plane[{SlopeMinus[k],0,1, 0}]];
CLineYMinusMinus[k_]:=IntersectionLine[YLevel[-Sqrt[k+2]],Plane[{SlopePlus[k],0,1, 0}]];
CLinesY[k_]:={CLineYPlusPlus[k],CLineYPlusMinus[k],CLineYMinusPlus[k],CLineYMinusMinus[k]};

(*C-Lines X-Family*)
CLineXPlusPlus[k_]:=IntersectionLine[XLevel[Sqrt[k+2]],Plane[{0,1,-SlopeMinus[k], 0}]];
CLineXPlusMinus[k_]:=IntersectionLine[XLevel[Sqrt[k+2]],Plane[{0,1,-SlopePlus[k], 0}]];
CLineXMinusPlus[k_]:=IntersectionLine[XLevel[-Sqrt[k+2]],Plane[{0,1,SlopeMinus[k], 0}]];
CLineXMinusMinus[k_]:=IntersectionLine[XLevel[-Sqrt[k+2]],Plane[{0,1,SlopePlus[k], 0}]];
CLinesX[k_]:={CLineXPlusPlus[k],CLineXPlusMinus[k],CLineXMinusPlus[k],CLineXMinusMinus[k]};


(* ::Input:: *)
(**)
