(* Content-type: application/vnd.wolfram.mathematica *)

(*** Wolfram Notebook File ***)
(* http://www.wolfram.com/nb *)

(* CreatedBy='Mathematica 8.0' *)

(*CacheID: 234*)
(* Internal cache information:
NotebookFileLineBreakTest
NotebookFileLineBreakTest
NotebookDataPosition[       157,          7]
NotebookDataLength[      3685,        101]
NotebookOptionsPosition[      3191,         82]
NotebookOutlinePosition[      3606,         98]
CellTagsIndexPosition[      3563,         95]
WindowFrame->Normal*)

(* Beginning of Notebook Content *)
Notebook[{
Cell["\<\
EXAMPLE

The program CircleSG[a,b,r,view] computes, if exists, the minimal system of \
generators of the semigroup associated to the circle with center (a, b) and \
radius r (a, b and r must belong to the rational number set). Parameter \
\"view\" is optional, if its value is True it will render a graphic \
representation of the semigroup.

In this case example, we compute the minimal system of generators of the \
semigroup S associated to the circle with center (11/2, 1) and radius 5/2.\
\>", "Text",
 CellChangeTimes->{{3.540207844434116*^9, 3.5402078917319803`*^9}, {
  3.540297625780588*^9, 3.540297669828108*^9}}],

Cell["<< CircleSG`", "Text",
 CellChangeTimes->{{3.540207898654193*^9, 3.540207910595745*^9}}],

Cell["CircleSG[11/2, 1, 5/2, True]", "Text",
 CellChangeTimes->{
  3.540207906729679*^9, {3.540215312868188*^9, 3.540215341073801*^9}}],

Cell[BoxData[
 GraphicsBox[{LineBox[{{0, 0}, {24, 18}}], 
   LineBox[NCache[{{0, 0}, {Rational[144, 5], Rational[-42, 5]}}, {{0, 0}, {
      28.8, -8.4}}]], 
   {RGBColor[0, 0, 1], PointSize[0.005], Thickness[Large], 
    PointBox[{{2., 1.}, {3., 2.}, {6., 4.}, {10., 7.}}]}, {
    CircleBox[NCache[{Rational[11, 2], 1}, {5.5, 1}], NCache[
     Rational[5, 2], 2.5]], CircleBox[{11, 2}, 5], 
    CircleBox[NCache[{Rational[33, 2], 3}, {16.5, 3}], NCache[
     Rational[15, 2], 7.5]], CircleBox[{22, 4}, 10], 
    CircleBox[NCache[{Rational[55, 2], 5}, {27.5, 5}], NCache[
     Rational[25, 2], 12.5]], CircleBox[{33, 6}, 15], 
    CircleBox[NCache[{Rational[77, 2], 7}, {38.5, 7}], NCache[
     Rational[35, 2], 17.5]], CircleBox[{44, 8}, 20]}, 
   {RGBColor[1, 0, 0], PointSize[0.005], Thickness[Large], 
    PointBox[{{3., 1.}, {4., 0.}, {4., 1.}, {4., 2.}, {4., 3.}, {5., 0.}, {5.,
      1.}, {5., 2.}, {5., 3.}, {6., 0.}, {6., 1.}, {6., 3.}, {7., 0.}, {7., 
     5.}}]}},
  Axes->True,
  AxesOrigin->{0, 0},
  ImageSize->{626., Automatic},
  PlotRange->{{0, All}, {0, All}},
  PlotRangeClipping->True]], "Text",
 CellChangeTimes->{3.540207916112269*^9, 3.5402153676703224`*^9}],

Cell["\<\
{{3, 1}, {4, 0}, {4, 1}, {4, 2}, {4, 3}, {5, 0}, {5, 1}, {5, 2}, {5, 3}, {6, \
0}, {6, 1}, {6, 3}, {7, 0}, {7, 5}}\
\>", "Text",
 CellChangeTimes->{3.5402079322692547`*^9}],

Cell["\<\
The red points are the minimal generator set of S, and the blue points are \
the points belong to the integer cone determinated by the extremal rays of \
the drawing, but not belong to the semigroup S.\
\>", "Text",
 CellChangeTimes->{
  3.540207938983355*^9, 3.540212823621811*^9, {3.5402153028666153`*^9, 
   3.540215307978908*^9}, 3.5402153794109936`*^9, 3.540215442739616*^9}]
},
WindowSize->{740, 652},
WindowMargins->{{Automatic, -819}, {Automatic, 56}},
FrontEndVersion->"7.0 for Microsoft Windows (64-bit) (November 10, 2008)",
StyleDefinitions->FrontEnd`FileName[{"Utility"}, "Memo.nb", CharacterEncoding -> 
  "WindowsANSI"]
]
(* End of Notebook Content *)

(* Internal cache information *)
(*CellTagsOutline
CellTagsIndex->{}
*)
(*CellTagsIndex
CellTagsIndex->{}
*)
(*NotebookFileOutline
Notebook[{
Cell[557, 20, 633, 13, 180, "Text"],
Cell[1193, 35, 94, 1, 28, "Text"],
Cell[1290, 38, 135, 2, 28, "Text"],
Cell[1428, 42, 1181, 23, 298, "Text"],
Cell[2612, 67, 182, 4, 47, "Text"],
Cell[2797, 73, 390, 7, 47, "Text"]
}
]
*)

(* End of internal cache information *)
