Exploring Analyic Geometry with Mathematica® |
|||||
| Home | Contents | Commands | Packages | Explorations | Reference |
| Tour | Lines | Circles | Conics | Analysis | Tangents |
D2DMaster2D
The package D2DMaster2D is the master package for Descarta2D. It establishes the names owned by all the other Descarta2D packages (so they will load automatically when referenced), and it provides the basic environment of queries supporting the Descarta2D objects.
Descarta2D Initialization
Load the Descarta2D package stubs.
If[Names["D2DMaster2D"]=={"D2DMaster2D"},
D2DMaster$2D::loaded=
"The package 'D2DMaster2D' has already been loaded.";
Message[D2DMaster$2D::loaded]];
D2DMaster$2D::noPath=
"The path to 'D2DMaster2D.m' cannot be found; unable to initialize Descarta2D.";
D2DMaster$2D::tooManyPaths=
"More than one path to 'D2DMaster2D.m' was found; using `1`.";
D2D$paths=FileNames["D2DMaster2D.m",$TopDirectory,Infinity];
D2D$dir=Map[DirectoryName,D2D$paths];
If[Length[D2D$dir]===0,
Message[D2DMaster$2D::noPath],
If[Length[D2D$dir]>1,
Message[D2DMaster$2D::tooManyPaths,First[D2D$dir]]];
If[!MemberQ[$Path,First[D2D$dir]],AppendTo[$Path,First[D2D$dir]]]];
Remove[D2D$paths,D2D$dir];
DeclarePackage["D2DArc2D`",{"D2DArc2D", "Arc2D", "Bulge2D", "Complement2D"}];
DeclarePackage["D2DArcLength2D`", {"D2DArcLength2D", "ArcLength2D", "Circumference2D", "Perimeter2D", "Span2D"}];
DeclarePackage["D2DArea2D`", {"D2DArea2D", "Area2D", "SectorArea2D", "SegmentArea2D"}];
DeclarePackage["D2DCircle2D`", {"D2DCircle2D", "Circle2D", "Radius2D"}];
DeclarePackage["D2DConic2D`", {"D2DConic2D", "Asymptotes2D", "Directrices2D", "Eccentricity2D", "FocalChords2D", "Foci2D", "Vertices2D"}];
DeclarePackage["D2DConicArc2D`", {"D2DConicArc2D", "Apex2D", "ConicArc2D", "Rho2D"}];
DeclarePackage["D2DEllipse2D`", {"D2DEllipse2D", "Ellipse2D", "SemiMajorAxis2D", "SemiMinorAxis2D"}];
DeclarePackage["D2DEquations2D`", {"D2DEquations2D", "Equation2D", "Polynomial2D", "SimplifyCoefficients2D"}];
DeclarePackage["D2DExpressions2D`", {"D2DExpressions2D", "IsApproximate2D", "IsComplex2D", "IsNegative2D", "IsNumeric2D", "IsReal2D", "IsScalarPair2D", "IsScalar2D", "IsTinyImaginary2D", "IsZero2D", "IsZeroOrNegative2D"}];
DeclarePackage["D2DGeometry2D`", {"D2DGeometry2D", "IsCoincident2D", "IsCollinear2D", "IsConcentric2D", "IsConcurrent2D", "IsOn2D", "IsParallel2D", "IsTripleParallel2D", "IsPerpendicular2D", "IsTangent2D"}];
DeclarePackage["D2DHyperbola2D`", {"D2DHyperbola2D", "Conjugate2D", "Hyperbola2D", "SemiTransverseAxis2D", "SemiConjugateAxis2D"}];
DeclarePackage["D2DIntersect2D`", {"D2DIntersect2D", "Parameters2D", "Points2D"}];
DeclarePackage["D2DLine2D`",{"D2DLine2D", "Angle2D", "Line2D", "Parallel2D", "Perpendicular2D", "Slope2D"}];
DeclarePackage["D2DLoci2D`", {"D2DLoci2D", "Loci2D"}];
DeclarePackage["D2DMaster2D`", {"Is2D", "IsValid2D", "ObjectNames2D"}];
DeclarePackage["D2DMedial2D`", {"D2DMedial2D", "MedialEquations2D", "MedialLoci2D"}];
DeclarePackage["D2DNumbers2D`", {"D2DNumbers2D", "ChopImaginary2D", "PrimaryAngle2D", "PrimaryAngleRange2D"}];
DeclarePackage["D2DParabola2D`", {"D2DParabola2D", "FocalLength2D", "Parabola2D"}];
DeclarePackage["D2DPencil2D`", {"D2DPencil2D", "Pencil2D"}];
DeclarePackage["D2DPoint2D`", {"D2DPoint2D", "Coordinates2D", "Distance2D", "Point2D", "XCoordinate2D", "YCoordinate2D"}];
DeclarePackage["D2DQuadratic2D`", {"D2DQuadratic2D", "Quadratic2D"}];
DeclarePackage["D2DSegment2D`", {"D2DSegment2D", "Length2D", "Segment2D"}];
DeclarePackage["D2DSketch2D`", {"D2DSketch2D", "AskCurveLength2D", "CurveLength2D", "CurveLimits2D", "IsDisplay2D", "MakePrimitives2D", "SetDisplay2D", "Sketch2D"}];
DeclarePackage["D2DSolve2D`", {"D2DSolve2D", "MaxSeconds2D", "Solve2D"}];
DeclarePackage["D2DTangentCircles2D`", {"D2DTangentCircles2D", "TangentCircles2D"}];
DeclarePackage["D2DTangentConics2D`", {"D2DTangentConics2D", "TangentConics2D", "TangentQuadratics2D"}];
DeclarePackage["D2DTangentLines2D`", {"D2DTangentLines2D", "TangentEquation2D", "TangentLines2D", "TangentSegments2D"}];
DeclarePackage["D2DTangentPoints2D`", {"D2DTangentPoints2D", "TangentPoints2D"}];
DeclarePackage["D2DTransform2D`", {"D2DTransform2D", "Reflect2D", "ReflectAngle2D", "Rotate2D", "Scale2D", "Translate2D"}];
DeclarePackage["D2DTriangle2D`", {"D2DTriangle2D", "Centroid2D", "Circumscribed2D", "Inscribed2D", "SolveTriangle2D", "Triangle2D"}];
Package Initialization
BeginPackage["D2DMaster2D`"];
D2DMaster2D::usage=
"D2DMaster2D is the master package for Descarta2D.";
D2DMaster2D::loaded=
"The package 'D2DMaster2D' has already been loaded.";
Is2D::usage=
"Is2D[object,headList] returns 'True' if the object is valid and its head is included in the list of object heads.";
IsValid2D::usage=
"IsValid2D[object] returns 'True' if the object is syntactically valid.";
ObjectNames2D::usage=
"ObjectNames2D[ ] returns a list of strings that are the names of all Descarta2D objects.";
Begin["`Private`"];
Objects
Object Names
Format: ObjectNames2D[]
Returns a list of strings that are the symbolic names for all Descarta2D objects.
ObjectNames2D[]:={"Arc2D", "Circle2D", "ConicArc2D", "Ellipse2D",
"Hyperbola2D", "Line2D", "Parabola2D", "Point2D", "Quadratic2D",
"Segment2D", "Triangle2D"};
Default Queries
Is Query
Format: Is2D[object,objHeadList]
Returns True if the object is valid and has its head included in the objHeadList; otherwise, returns False.
Is2D[obj_,objHead_List] :=
(IsValid2D[obj] && (Or @@ Map[(Head[obj]===#)&,objHead]));
Valid Query
Format: IsValid2D[object]
Returns True if the object is geometric and is syntactically valid; otherwise, returns False. Only the default case is implemented here.
IsValid2D[___] := False;
Epilogue
End[ ]; (* end of "`Private" *)
EndPackage[ ]; (* end of "D2DMaster2D`" *)