Subversion Repositories svnkaklik

Compare Revisions

Regard whitespace Rev 648 → Rev 649

/programy/C/ix86/echo/DOC/plane_cut.nb
10,10 → 10,10
NotebookFileLineBreakTest
NotebookFileLineBreakTest
NotebookDataPosition[ 145, 7]
NotebookDataLength[ 15724, 569]
NotebookOptionsPosition[ 14134, 508]
NotebookOutlinePosition[ 14471, 523]
CellTagsIndexPosition[ 14428, 520]
NotebookDataLength[ 13289, 440]
NotebookOptionsPosition[ 12408, 404]
NotebookOutlinePosition[ 12745, 419]
CellTagsIndexPosition[ 12702, 416]
WindowFrame->Normal*)
 
(* Beginning of Notebook Content *)
26,166 → 26,95
RowBox[{"{",
RowBox[{
RowBox[{
SuperscriptBox["a", "2"], "==",
SuperscriptBox["a", "2"], "\[Equal]",
RowBox[{
SuperscriptBox["y", "2"], "+",
SuperscriptBox["x", "2"]}]}], ",",
SuperscriptBox[
RowBox[{"(",
RowBox[{"x", "-", "xl"}], ")"}], "2"], "+",
SuperscriptBox["y", "2"]}]}], ",",
RowBox[{
SuperscriptBox["b", "2"], "==",
SuperscriptBox["b", "2"], "\[Equal]",
RowBox[{
SuperscriptBox["y", "2"], "+", " ",
SuperscriptBox[
RowBox[{"(",
RowBox[{"r", "-", "x"}], ")"}], "2"]}]}]}], "}"}], ",", "x"}],
"]"}]], "Input",
CellChangeTimes->{{3.48025742799592*^9, 3.480257444164321*^9}, {
3.480257523613083*^9, 3.4802575457893877`*^9}, {3.4802575824866943`*^9,
3.480257595868989*^9}}],
RowBox[{"x", "-", "xr"}], ")"}], "2"], "+",
SuperscriptBox["y", "2"]}]}]}], "}"}], ",", "y"}], "]"}]], "Input",
CellChangeTimes->{{3.4803530692940283`*^9, 3.4803530717437077`*^9}, {
3.480353102304743*^9, 3.480353124780987*^9}, {3.480353158763401*^9,
3.480353266751618*^9}, {3.480353358354301*^9, 3.480353358968121*^9}}],
 
Cell[BoxData[
RowBox[{
RowBox[{
RowBox[{"-",
SuperscriptBox["b", "4"]}], "+",
RowBox[{"2", " ",
SuperscriptBox["b", "2"], " ",
SuperscriptBox["r", "2"]}], "-",
SuperscriptBox["r", "4"], "-",
RowBox[{"4", " ",
SuperscriptBox["r", "2"], " ",
SuperscriptBox["y", "2"]}]}], "\[Equal]",
RowBox[{
SuperscriptBox["a", "4"], "+",
RowBox[{
SuperscriptBox["a", "2"], " ",
RowBox[{"(",
RowBox[{
RowBox[{
RowBox[{"-", "2"}], " ",
SuperscriptBox["b", "2"]}], "-",
RowBox[{"2", " ",
SuperscriptBox["r", "2"]}]}], ")"}]}]}]}]], "Output",
CellChangeTimes->{3.480257547792871*^9, 3.4802575969300547`*^9}]
SuperscriptBox["b", "2"], "-",
RowBox[{"2", " ", "x", " ", "xl"}], "+",
SuperscriptBox["xl", "2"], "+",
RowBox[{"2", " ", "x", " ", "xr"}], "-",
SuperscriptBox["xr", "2"]}], "\[Equal]",
SuperscriptBox["a", "2"]}]], "Output",
CellChangeTimes->{3.480353267873107*^9, 3.480353360763659*^9}]
}, Open ]],
 
Cell[CellGroupData[{
 
Cell[BoxData[
RowBox[{"Simplify", "[",
RowBox[{"Solve", "[",
RowBox[{
RowBox[{
RowBox[{"-",
SuperscriptBox["b", "4"]}], "+",
RowBox[{"2", " ",
SuperscriptBox["b", "2"], " ",
SuperscriptBox["r", "2"]}], "-",
SuperscriptBox["r", "4"], "-",
RowBox[{"4", " ",
SuperscriptBox["r", "2"], " ",
SuperscriptBox["y", "2"]}]}], "\[Equal]",
RowBox[{
SuperscriptBox["a", "4"], "+",
RowBox[{
SuperscriptBox["a", "2"], " ",
RowBox[{"(",
RowBox[{
RowBox[{
RowBox[{"-", "2"}], " ",
SuperscriptBox["b", "2"]}], "-",
RowBox[{"2", " ",
SuperscriptBox["r", "2"]}]}], ")"}]}]}]}], "]"}]], "Input",
CellChangeTimes->{{3.480258949696538*^9, 3.4802589666213627`*^9}}],
SuperscriptBox["b", "2"], "-",
RowBox[{"2", " ", "x", " ", "xl"}], "+",
SuperscriptBox["xl", "2"], "+",
RowBox[{"2", " ", "x", " ", "xr"}], "-",
SuperscriptBox["xr", "2"]}], "\[Equal]",
SuperscriptBox["a", "2"]}], ",", "x"}], "]"}]], "Input",
CellChangeTimes->{{3.480353384264968*^9, 3.4803534038301287`*^9}}],
 
Cell[BoxData[
RowBox[{"{",
RowBox[{"{",
RowBox[{"x", "\[Rule]",
FractionBox[
RowBox[{
RowBox[{
SuperscriptBox["a", "4"], "+",
SuperscriptBox["b", "4"], "+",
SuperscriptBox["r", "4"], "+",
RowBox[{"4", " ",
SuperscriptBox["r", "2"], " ",
SuperscriptBox["y", "2"]}]}], "\[Equal]",
RowBox[{
RowBox[{"-",
SuperscriptBox["a", "2"]}], "+",
SuperscriptBox["b", "2"], "+",
SuperscriptBox["xl", "2"], "-",
SuperscriptBox["xr", "2"]}],
RowBox[{"2", " ",
SuperscriptBox["b", "2"], " ",
SuperscriptBox["r", "2"]}], "+",
RowBox[{"2", " ",
SuperscriptBox["a", "2"], " ",
RowBox[{"(",
RowBox[{
SuperscriptBox["b", "2"], "+",
SuperscriptBox["r", "2"]}], ")"}]}]}]}]], "Output",
CellChangeTimes->{3.480258967385964*^9}]
RowBox[{"xl", "-", "xr"}], ")"}]}]]}], "}"}], "}"}]], "Output",
CellChangeTimes->{3.480353405169127*^9}]
}, Open ]],
 
Cell[CellGroupData[{
 
Cell[BoxData[
RowBox[{"Solve", "[",
RowBox[{"FullSimplify", "[",
FractionBox[
RowBox[{
RowBox[{
RowBox[{
SuperscriptBox["a", "4"], "+",
SuperscriptBox["b", "4"], "+",
SuperscriptBox["r", "4"], "+",
RowBox[{"4", " ",
SuperscriptBox["r", "2"], " ",
SuperscriptBox["y", "2"]}]}], "\[Equal]",
RowBox[{
RowBox[{"-",
SuperscriptBox["a", "2"]}], "+",
SuperscriptBox["b", "2"], "+",
SuperscriptBox["xl", "2"], "-",
SuperscriptBox["xr", "2"]}],
RowBox[{"2", " ",
SuperscriptBox["b", "2"], " ",
SuperscriptBox["r", "2"]}], "+",
RowBox[{"2", " ",
SuperscriptBox["a", "2"], " ",
RowBox[{"(",
RowBox[{
SuperscriptBox["b", "2"], "+",
SuperscriptBox["r", "2"]}], ")"}]}]}]}], ",", "y"}], "]"}]], "Input",
CellChangeTimes->{{3.4802589709519663`*^9, 3.480258994751276*^9}}],
RowBox[{"xl", "-", "xr"}], ")"}]}]], "]"}]], "Input",
CellChangeTimes->{{3.480353414741691*^9, 3.480353459715658*^9}}],
 
Cell[BoxData[
RowBox[{"{",
RowBox[{
RowBox[{"{",
RowBox[{"y", "\[Rule]",
RowBox[{"-",
FractionBox[
SqrtBox[
RowBox[{
RowBox[{"-",
SuperscriptBox["a", "4"]}], "+",
SuperscriptBox["a", "2"]}], "+",
SuperscriptBox["b", "2"], "+",
SuperscriptBox["xl", "2"], "-",
SuperscriptBox["xr", "2"]}],
RowBox[{"2", " ",
SuperscriptBox["a", "2"], " ",
SuperscriptBox["b", "2"]}], "-",
SuperscriptBox["b", "4"], "+",
RowBox[{"2", " ",
SuperscriptBox["a", "2"], " ",
SuperscriptBox["r", "2"]}], "+",
RowBox[{"2", " ",
SuperscriptBox["b", "2"], " ",
SuperscriptBox["r", "2"]}], "-",
SuperscriptBox["r", "4"]}]],
RowBox[{"2", " ", "r"}]]}]}], "}"}], ",",
RowBox[{"{",
RowBox[{"y", "\[Rule]",
FractionBox[
SqrtBox[
RowBox[{
RowBox[{"-",
SuperscriptBox["a", "4"]}], "+",
RowBox[{"2", " ",
SuperscriptBox["a", "2"], " ",
SuperscriptBox["b", "2"]}], "-",
SuperscriptBox["b", "4"], "+",
RowBox[{"2", " ",
SuperscriptBox["a", "2"], " ",
SuperscriptBox["r", "2"]}], "+",
RowBox[{"2", " ",
SuperscriptBox["b", "2"], " ",
SuperscriptBox["r", "2"]}], "-",
SuperscriptBox["r", "4"]}]],
RowBox[{"2", " ", "r"}]]}], "}"}]}], "}"}]], "Output",
CellChangeTimes->{3.480258995585805*^9}]
RowBox[{"(",
RowBox[{"xl", "-", "xr"}], ")"}]}]]], "Output",
CellChangeTimes->{{3.4803534378225803`*^9, 3.4803534603115587`*^9}}]
}, Open ]],
 
Cell[CellGroupData[{
196,52 → 125,66
RowBox[{"{",
RowBox[{
RowBox[{
SuperscriptBox["a", "2"], "==",
SuperscriptBox["a", "2"], "\[Equal]",
RowBox[{
SuperscriptBox["y", "2"], "+",
SuperscriptBox["x", "2"]}]}], ",",
SuperscriptBox[
RowBox[{"(",
RowBox[{"x", "-", "xl"}], ")"}], "2"], "+",
SuperscriptBox["y", "2"]}]}], ",",
RowBox[{
SuperscriptBox["b", "2"], "==",
SuperscriptBox["b", "2"], "\[Equal]",
RowBox[{
SuperscriptBox["y", "2"], "+", " ",
SuperscriptBox[
RowBox[{"(",
RowBox[{"r", "-", "x"}], ")"}], "2"]}]}]}], "}"}], ",", "y"}],
"]"}]], "Input",
CellChangeTimes->{{3.480259014363867*^9, 3.480259014483967*^9}}],
RowBox[{"x", "-", "xr"}], ")"}], "2"], "+",
SuperscriptBox["y", "2"]}]}]}], "}"}], ",", "x"}], "]"}]], "Input",
CellChangeTimes->{{3.48035354117004*^9, 3.4803535430443707`*^9}}],
 
Cell[BoxData[
RowBox[{
RowBox[{
SuperscriptBox["b", "2"], "-",
SuperscriptBox["r", "2"], "+",
RowBox[{"2", " ", "r", " ", "x"}]}], "\[Equal]",
SuperscriptBox["a", "2"]}]], "Output",
CellChangeTimes->{3.48025901538303*^9}]
}, Open ]],
 
Cell[CellGroupData[{
 
Cell[BoxData[
RowBox[{"Simplify", "[",
RowBox[{"-",
SuperscriptBox["b", "4"]}], "+",
RowBox[{"2", " ",
SuperscriptBox["b", "2"], " ",
SuperscriptBox["xl", "2"]}], "-",
SuperscriptBox["xl", "4"], "-",
RowBox[{"4", " ",
SuperscriptBox["b", "2"], " ", "xl", " ", "xr"}], "+",
RowBox[{"4", " ",
SuperscriptBox["xl", "3"], " ", "xr"}], "+",
RowBox[{"2", " ",
SuperscriptBox["b", "2"], " ",
SuperscriptBox["xr", "2"]}], "-",
RowBox[{"6", " ",
SuperscriptBox["xl", "2"], " ",
SuperscriptBox["xr", "2"]}], "+",
RowBox[{"4", " ", "xl", " ",
SuperscriptBox["xr", "3"]}], "-",
SuperscriptBox["xr", "4"], "-",
RowBox[{"4", " ",
SuperscriptBox["xl", "2"], " ",
SuperscriptBox["y", "2"]}], "+",
RowBox[{"8", " ", "xl", " ", "xr", " ",
SuperscriptBox["y", "2"]}], "-",
RowBox[{"4", " ",
SuperscriptBox["xr", "2"], " ",
SuperscriptBox["y", "2"]}]}], "\[Equal]",
RowBox[{
SuperscriptBox["a", "4"], "+",
RowBox[{
SuperscriptBox["b", "2"], "-",
SuperscriptBox["r", "2"], "+",
RowBox[{"2", " ", "r", " ", "x"}]}], "\[Equal]",
SuperscriptBox["a", "2"]}], "]"}]], "Input",
CellChangeTimes->{{3.480259022777849*^9, 3.480259039864859*^9}}],
 
Cell[BoxData[
SuperscriptBox["a", "2"], " ",
RowBox[{"(",
RowBox[{
RowBox[{
SuperscriptBox["a", "2"], "+",
RowBox[{"r", " ",
RowBox[{"(",
RowBox[{"r", "-",
RowBox[{"2", " ", "x"}]}], ")"}]}]}], "\[Equal]",
SuperscriptBox["b", "2"]}]], "Output",
CellChangeTimes->{3.480259042740219*^9}]
RowBox[{"-", "2"}], " ",
SuperscriptBox["b", "2"]}], "-",
RowBox[{"2", " ",
SuperscriptBox["xl", "2"]}], "+",
RowBox[{"4", " ", "xl", " ", "xr"}], "-",
RowBox[{"2", " ",
SuperscriptBox["xr", "2"]}]}], ")"}]}]}]}]], "Output",
CellChangeTimes->{3.480353544000967*^9}]
}, Open ]],
 
Cell[CellGroupData[{
251,218 → 194,143
RowBox[{
RowBox[{
RowBox[{
SuperscriptBox["a", "2"], "+",
RowBox[{"r", " ",
RowBox[{"(",
RowBox[{"r", "-",
RowBox[{"2", " ", "x"}]}], ")"}]}]}], "\[Equal]",
SuperscriptBox["b", "2"]}], ",", "x"}], "]"}]], "Input",
CellChangeTimes->{{3.480259057756564*^9, 3.480259075038864*^9}}],
 
Cell[BoxData[
RowBox[{"{",
RowBox[{"{",
RowBox[{"x", "\[Rule]",
FractionBox[
RowBox[{
SuperscriptBox["a", "2"], "-",
SuperscriptBox["b", "2"], "+",
SuperscriptBox["r", "2"]}],
RowBox[{"2", " ", "r"}]]}], "}"}], "}"}]], "Output",
CellChangeTimes->{3.4802590759762087`*^9}]
}, Open ]],
 
Cell[BoxData[
RowBox[{"ParametricPlot", "[",
RowBox[{
RowBox[{"{",
RowBox[{
FractionBox[
RowBox[{
SuperscriptBox["a", "2"], "-",
SuperscriptBox["b", "2"], "+",
SuperscriptBox["0.1", "2"]}], "0.2"], ",", " ",
FractionBox[
SqrtBox[
RowBox[{
RowBox[{"-",
SuperscriptBox["a", "4"]}], "+",
SuperscriptBox["b", "4"]}], "+",
RowBox[{"2", " ",
SuperscriptBox["a", "2"], " ",
SuperscriptBox["b", "2"]}], "-",
SuperscriptBox["b", "4"], "+",
SuperscriptBox["b", "2"], " ",
SuperscriptBox["xl", "2"]}], "-",
SuperscriptBox["xl", "4"], "-",
RowBox[{"4", " ",
SuperscriptBox["b", "2"], " ", "xl", " ", "xr"}], "+",
RowBox[{"4", " ",
SuperscriptBox["xl", "3"], " ", "xr"}], "+",
RowBox[{"2", " ",
SuperscriptBox["a", "2"], " ",
SuperscriptBox["0.1", "2"]}], "+",
RowBox[{"2", " ",
SuperscriptBox["b", "2"], " ",
SuperscriptBox["0.1", "2"]}], "-",
SuperscriptBox["0.1", "4"]}]], "0.2"]}], "}"}], ",",
RowBox[{"{",
RowBox[{"a", ",", "0", ",", "10"}], "}"}], ",", " ",
RowBox[{"{",
RowBox[{"b", ",", "0", ",", "10"}], "}"}]}], "]"}]], "Input",
CellChangeTimes->{{3.480260726697213*^9, 3.480260795029454*^9}, {
3.4802610157613573`*^9, 3.480261151606037*^9}, {3.480261184002676*^9,
3.480261316392874*^9}, {3.48026136441684*^9, 3.48026148678514*^9}}],
 
Cell[CellGroupData[{
 
Cell[BoxData[
RowBox[{"\[IndentingNewLine]",
RowBox[{"Eliminate", "[",
SuperscriptBox["xr", "2"]}], "-",
RowBox[{"6", " ",
SuperscriptBox["xl", "2"], " ",
SuperscriptBox["xr", "2"]}], "+",
RowBox[{"4", " ", "xl", " ",
SuperscriptBox["xr", "3"]}], "-",
SuperscriptBox["xr", "4"], "-",
RowBox[{"4", " ",
SuperscriptBox["xl", "2"], " ",
SuperscriptBox["y", "2"]}], "+",
RowBox[{"8", " ", "xl", " ", "xr", " ",
SuperscriptBox["y", "2"]}], "-",
RowBox[{"4", " ",
SuperscriptBox["xr", "2"], " ",
SuperscriptBox["y", "2"]}]}], "\[Equal]",
RowBox[{
RowBox[{"{",
SuperscriptBox["a", "4"], "+",
RowBox[{
RowBox[{
SuperscriptBox["a", "2"], "==",
RowBox[{
SuperscriptBox["y", "2"], "+",
SuperscriptBox["x", "2"]}]}], ",",
RowBox[{
SuperscriptBox["b", "2"], "==",
RowBox[{
SuperscriptBox["y", "2"], "+", " ",
SuperscriptBox[
SuperscriptBox["a", "2"], " ",
RowBox[{"(",
RowBox[{"r", "-", "x"}], ")"}], "2"]}]}]}], "}"}], ",", "a"}],
"]"}]}]], "Input",
CellChangeTimes->{{3.480263655197631*^9, 3.480263663686249*^9}}],
 
Cell[BoxData[
RowBox[{
RowBox[{
SuperscriptBox["r", "2"], "-",
RowBox[{"2", " ", "r", " ", "x"}], "+",
SuperscriptBox["x", "2"], "+",
SuperscriptBox["y", "2"]}], "\[Equal]",
SuperscriptBox["b", "2"]}]], "Output",
CellChangeTimes->{{3.480263658468478*^9, 3.480263664271557*^9}}]
}, Open ]],
RowBox[{"-", "2"}], " ",
SuperscriptBox["b", "2"]}], "-",
RowBox[{"2", " ",
SuperscriptBox["xl", "2"]}], "+",
RowBox[{"4", " ", "xl", " ", "xr"}], "-",
RowBox[{"2", " ",
SuperscriptBox["xr", "2"]}]}], ")"}]}]}]}], ",", "y"}],
"]"}]], "Input",
CellChangeTimes->{{3.480353625922577*^9, 3.4803536373630657`*^9}}],
 
Cell[CellGroupData[{
 
Cell[BoxData[
RowBox[{"Simplify", "[",
RowBox[{
RowBox[{
SuperscriptBox["r", "2"], "-",
RowBox[{"2", " ", "r", " ", "x"}], "+",
SuperscriptBox["x", "2"], "+",
SuperscriptBox["y", "2"]}], "\[Equal]",
SuperscriptBox["b", "2"]}], "]"}]], "Input",
CellChangeTimes->{{3.4802636687522917`*^9, 3.48026368255702*^9}}],
 
Cell[BoxData[
RowBox[{
RowBox[{
SuperscriptBox["b", "2"], "+",
RowBox[{"2", " ", "r", " ", "x"}]}], "\[Equal]",
RowBox[{
SuperscriptBox["r", "2"], "+",
SuperscriptBox["x", "2"], "+",
SuperscriptBox["y", "2"]}]}]], "Output",
CellChangeTimes->{3.480263685526928*^9}]
}, Open ]],
 
Cell[CellGroupData[{
 
Cell[BoxData[
RowBox[{"Solve", "[",
RowBox[{
RowBox[{
RowBox[{
SuperscriptBox["b", "2"], "+",
RowBox[{"2", " ", "r", " ", "x"}]}], "\[Equal]",
RowBox[{
SuperscriptBox["r", "2"], "+",
SuperscriptBox["x", "2"], "+",
SuperscriptBox["y", "2"]}]}], ",", "b"}], "]"}]], "Input",
CellChangeTimes->{{3.480263691906734*^9, 3.480263707606902*^9}}],
 
Cell[BoxData[
RowBox[{"{",
RowBox[{
RowBox[{"{",
RowBox[{"b", "\[Rule]",
RowBox[{"y", "\[Rule]",
RowBox[{"-",
FractionBox[
SqrtBox[
RowBox[{
SuperscriptBox["r", "2"], "-",
RowBox[{"2", " ", "r", " ", "x"}], "+",
SuperscriptBox["x", "2"], "+",
SuperscriptBox["y", "2"]}]]}]}], "}"}], ",",
RowBox[{"{",
RowBox[{"b", "\[Rule]",
SqrtBox[
SuperscriptBox["a", "4"], "+",
SuperscriptBox["b", "4"], "-",
RowBox[{"2", " ",
SuperscriptBox["b", "2"], " ",
SuperscriptBox["xl", "2"]}], "+",
SuperscriptBox["xl", "4"], "+",
RowBox[{"4", " ",
SuperscriptBox["b", "2"], " ", "xl", " ", "xr"}], "-",
RowBox[{"4", " ",
SuperscriptBox["xl", "3"], " ", "xr"}], "-",
RowBox[{"2", " ",
SuperscriptBox["b", "2"], " ",
SuperscriptBox["xr", "2"]}], "+",
RowBox[{"6", " ",
SuperscriptBox["xl", "2"], " ",
SuperscriptBox["xr", "2"]}], "-",
RowBox[{"4", " ", "xl", " ",
SuperscriptBox["xr", "3"]}], "+",
SuperscriptBox["xr", "4"], "+",
RowBox[{
SuperscriptBox["r", "2"], "-",
RowBox[{"2", " ", "r", " ", "x"}], "+",
SuperscriptBox["x", "2"], "+",
SuperscriptBox["y", "2"]}]]}], "}"}]}], "}"}]], "Output",
CellChangeTimes->{3.480263708377795*^9}]
}, Open ]],
 
Cell[CellGroupData[{
 
Cell[BoxData[
RowBox[{"Eliminate", "[",
SuperscriptBox["a", "2"], " ",
RowBox[{"(",
RowBox[{
RowBox[{"{",
RowBox[{
RowBox[{"-", "2"}], " ",
SuperscriptBox["b", "2"]}], "-",
RowBox[{"2", " ",
SuperscriptBox["xl", "2"]}], "+",
RowBox[{"4", " ", "xl", " ", "xr"}], "-",
RowBox[{"2", " ",
SuperscriptBox["xr", "2"]}]}], ")"}]}]}]],
SqrtBox[
RowBox[{
SuperscriptBox["a", "2"], "==",
RowBox[{
SuperscriptBox["y", "2"], "+",
SuperscriptBox["x", "2"]}]}], ",",
RowBox[{"-", "4"}], " ",
SuperscriptBox["xl", "2"]}], "+",
RowBox[{"8", " ", "xl", " ", "xr"}], "-",
RowBox[{"4", " ",
SuperscriptBox["xr", "2"]}]}]]]}]}], "}"}], ",",
RowBox[{"{",
RowBox[{"y", "\[Rule]",
FractionBox[
SqrtBox[
RowBox[{
SuperscriptBox["b", "2"], "==",
SuperscriptBox["a", "4"], "+",
SuperscriptBox["b", "4"], "-",
RowBox[{"2", " ",
SuperscriptBox["b", "2"], " ",
SuperscriptBox["xl", "2"]}], "+",
SuperscriptBox["xl", "4"], "+",
RowBox[{"4", " ",
SuperscriptBox["b", "2"], " ", "xl", " ", "xr"}], "-",
RowBox[{"4", " ",
SuperscriptBox["xl", "3"], " ", "xr"}], "-",
RowBox[{"2", " ",
SuperscriptBox["b", "2"], " ",
SuperscriptBox["xr", "2"]}], "+",
RowBox[{"6", " ",
SuperscriptBox["xl", "2"], " ",
SuperscriptBox["xr", "2"]}], "-",
RowBox[{"4", " ", "xl", " ",
SuperscriptBox["xr", "3"]}], "+",
SuperscriptBox["xr", "4"], "+",
RowBox[{
SuperscriptBox["y", "2"], "+", " ",
SuperscriptBox[
SuperscriptBox["a", "2"], " ",
RowBox[{"(",
RowBox[{"r", "-", "x"}], ")"}], "2"]}]}]}], "}"}], ",", "b"}],
"]"}]], "Input",
CellChangeTimes->{{3.4802637422228947`*^9, 3.480263742630278*^9}}],
 
Cell[BoxData[
RowBox[{
RowBox[{
SuperscriptBox["x", "2"], "+",
SuperscriptBox["y", "2"]}], "\[Equal]",
SuperscriptBox["a", "2"]}]], "Output",
CellChangeTimes->{3.48026374413827*^9}]
}, Open ]],
 
Cell[CellGroupData[{
 
Cell[BoxData[
RowBox[{"Solve", "[",
RowBox[{
RowBox[{
RowBox[{
SuperscriptBox["x", "2"], "+",
SuperscriptBox["y", "2"]}], "\[Equal]",
SuperscriptBox["a", "2"]}], ",", "a"}], "]"}]], "Input",
CellChangeTimes->{{3.480263751875348*^9, 3.480263763613769*^9}}],
 
Cell[BoxData[
RowBox[{"{",
RowBox[{
RowBox[{"{",
RowBox[{"a", "\[Rule]",
RowBox[{"-",
RowBox[{"-", "2"}], " ",
SuperscriptBox["b", "2"]}], "-",
RowBox[{"2", " ",
SuperscriptBox["xl", "2"]}], "+",
RowBox[{"4", " ", "xl", " ", "xr"}], "-",
RowBox[{"2", " ",
SuperscriptBox["xr", "2"]}]}], ")"}]}]}]],
SqrtBox[
RowBox[{
SuperscriptBox["x", "2"], "+",
SuperscriptBox["y", "2"]}]]}]}], "}"}], ",",
RowBox[{"{",
RowBox[{"a", "\[Rule]",
SqrtBox[
RowBox[{
SuperscriptBox["x", "2"], "+",
SuperscriptBox["y", "2"]}]]}], "}"}]}], "}"}]], "Output",
CellChangeTimes->{3.480263765039091*^9}]
RowBox[{"-", "4"}], " ",
SuperscriptBox["xl", "2"]}], "+",
RowBox[{"8", " ", "xl", " ", "xr"}], "-",
RowBox[{"4", " ",
SuperscriptBox["xr", "2"]}]}]]]}], "}"}]}], "}"}]], "Output",
CellChangeTimes->{3.4803536794619617`*^9}]
}, Open ]],
 
Cell[CellGroupData[{
472,41 → 340,69
FractionBox[
SqrtBox[
RowBox[{
RowBox[{"-",
SuperscriptBox["a", "4"]}], "+",
SuperscriptBox["a", "4"], "+",
SuperscriptBox["b", "4"], "-",
RowBox[{"2", " ",
SuperscriptBox["b", "2"], " ",
SuperscriptBox["xl", "2"]}], "+",
SuperscriptBox["xl", "4"], "+",
RowBox[{"4", " ",
SuperscriptBox["b", "2"], " ", "xl", " ", "xr"}], "-",
RowBox[{"4", " ",
SuperscriptBox["xl", "3"], " ", "xr"}], "-",
RowBox[{"2", " ",
SuperscriptBox["b", "2"], " ",
SuperscriptBox["xr", "2"]}], "+",
RowBox[{"6", " ",
SuperscriptBox["xl", "2"], " ",
SuperscriptBox["xr", "2"]}], "-",
RowBox[{"4", " ", "xl", " ",
SuperscriptBox["xr", "3"]}], "+",
SuperscriptBox["xr", "4"], "+",
RowBox[{
SuperscriptBox["a", "2"], " ",
RowBox[{"(",
RowBox[{
RowBox[{
RowBox[{"-", "2"}], " ",
SuperscriptBox["b", "2"]}], "-",
SuperscriptBox["b", "4"], "+",
RowBox[{"2", " ",
SuperscriptBox["a", "2"], " ",
SuperscriptBox["r", "2"]}], "+",
SuperscriptBox["xl", "2"]}], "+",
RowBox[{"4", " ", "xl", " ", "xr"}], "-",
RowBox[{"2", " ",
SuperscriptBox["b", "2"], " ",
SuperscriptBox["r", "2"]}], "-",
SuperscriptBox["r", "4"]}]],
RowBox[{"2", " ", "r"}]], "]"}]], "Input",
CellChangeTimes->{{3.480334626025627*^9, 3.480334632855236*^9}, {
3.4803347434308167`*^9, 3.480334744290421*^9}}],
SuperscriptBox["xr", "2"]}]}], ")"}]}]}]],
SqrtBox[
RowBox[{
RowBox[{
RowBox[{"-", "4"}], " ",
SuperscriptBox["xl", "2"]}], "+",
RowBox[{"8", " ", "xl", " ", "xr"}], "-",
RowBox[{"4", " ",
SuperscriptBox["xr", "2"]}]}]]], "]"}]], "Input",
CellChangeTimes->{{3.480353699507608*^9, 3.4803537093257113`*^9}}],
 
Cell[BoxData[
FractionBox[
SqrtBox[
RowBox[{
RowBox[{"-",
RowBox[{"(",
RowBox[{"a", "-", "b", "-", "r"}], ")"}]}], " ",
RowBox[{"a", "-", "b", "+", "xl", "-", "xr"}], ")"}], " ",
RowBox[{"(",
RowBox[{"a", "+", "b", "-", "r"}], ")"}], " ",
RowBox[{"a", "+", "b", "+", "xl", "-", "xr"}], ")"}], " ",
RowBox[{"(",
RowBox[{"a", "-", "b", "+", "r"}], ")"}], " ",
RowBox[{"a", "-", "b", "-", "xl", "+", "xr"}], ")"}], " ",
RowBox[{"(",
RowBox[{"a", "+", "b", "+", "r"}], ")"}]}]],
RowBox[{"2", " ", "r"}]]], "Output",
CellChangeTimes->{3.480334634541192*^9, 3.4803347455989037`*^9}]
RowBox[{"a", "+", "b", "-", "xl", "+", "xr"}], ")"}]}]],
RowBox[{"2", " ",
SqrtBox[
RowBox[{"-",
SuperscriptBox[
RowBox[{"(",
RowBox[{"xl", "-", "xr"}], ")"}], "2"]}]]}]]], "Output",
CellChangeTimes->{3.480353711776017*^9}]
}, Open ]]
},
WindowSize->{1434, 824},
WindowSize->{1440, 826},
WindowMargins->{{0, Automatic}, {Automatic, 25}},
FrontEndVersion->"7.0 for Linux x86 (64-bit) (February 25, 2009)",
StyleDefinitions->"Default.nb"
523,53 → 419,28
(*NotebookFileOutline
Notebook[{
Cell[CellGroupData[{
Cell[567, 22, 648, 20, 32, "Input"],
Cell[1218, 44, 692, 23, 33, "Output"]
Cell[567, 22, 760, 21, 32, "Input"],
Cell[1330, 45, 345, 9, 33, "Output"]
}, Open ]],
Cell[CellGroupData[{
Cell[1947, 72, 749, 24, 32, "Input"],
Cell[2699, 98, 579, 19, 33, "Output"]
Cell[1712, 59, 418, 11, 32, "Input"],
Cell[2133, 72, 434, 14, 53, "Output"]
}, Open ]],
Cell[CellGroupData[{
Cell[3315, 122, 694, 21, 32, "Input"],
Cell[4012, 145, 1369, 42, 54, "Output"]
Cell[2604, 91, 400, 12, 59, "Input"],
Cell[3007, 105, 357, 11, 53, "Output"]
}, Open ]],
Cell[CellGroupData[{
Cell[5418, 192, 547, 18, 32, "Input"],
Cell[5968, 212, 239, 7, 33, "Output"]
Cell[3401, 121, 613, 19, 32, "Input"],
Cell[4017, 142, 1424, 44, 33, "Output"]
}, Open ]],
Cell[CellGroupData[{
Cell[6244, 224, 303, 8, 32, "Input"],
Cell[6550, 234, 273, 9, 33, "Output"]
Cell[5478, 191, 1592, 47, 32, "Input"],
Cell[7073, 240, 3226, 92, 121, "Output"]
}, Open ]],
Cell[CellGroupData[{
Cell[6860, 248, 366, 11, 32, "Input"],
Cell[7229, 261, 316, 10, 50, "Output"]
}, Open ]],
Cell[7560, 274, 1175, 32, 66, "Input"],
Cell[CellGroupData[{
Cell[8760, 310, 599, 19, 55, "Input"],
Cell[9362, 331, 299, 8, 33, "Output"]
}, Open ]],
Cell[CellGroupData[{
Cell[9698, 344, 340, 9, 32, "Input"],
Cell[10041, 355, 289, 9, 33, "Output"]
}, Open ]],
Cell[CellGroupData[{
Cell[10367, 369, 382, 11, 32, "Input"],
Cell[10752, 382, 626, 20, 46, "Output"]
}, Open ]],
Cell[CellGroupData[{
Cell[11415, 407, 549, 18, 32, "Input"],
Cell[11967, 427, 195, 6, 33, "Output"]
}, Open ]],
Cell[CellGroupData[{
Cell[12199, 438, 283, 8, 32, "Input"],
Cell[12485, 448, 450, 16, 46, "Output"]
}, Open ]],
Cell[CellGroupData[{
Cell[12972, 469, 684, 20, 66, "Input"],
Cell[13659, 491, 459, 14, 51, "Output"]
Cell[10336, 337, 1475, 44, 79, "Input"],
Cell[11814, 383, 578, 18, 63, "Output"]
}, Open ]]
}
]
576,3 → 447,4
*)
 
(* End of internal cache information *)
 
/programy/C/ix86/echo/DOC/plane_cut.pdf
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/programy/C/ix86/echo/SW/sonar/sonar.kdevelop
187,8 → 187,8
<includestyle>3</includestyle>
<root>/usr/share/qt3</root>
<designerintegration>EmbeddedKDevDesigner</designerintegration>
<qmake></qmake>
<designer></designer>
<qmake>/usr/bin/qmake</qmake>
<designer>/usr/bin/designer</designer>
<designerpluginpaths/>
</qt>
<references/>
/programy/C/ix86/echo/SW/sonar/src/.deps/sonar.Po
1,11 → 1,11
sonar.o: sonar.c /usr/include/stdio.h /usr/include/features.h \
/usr/include/bits/predefs.h /usr/include/sys/cdefs.h \
/usr/include/bits/wordsize.h /usr/include/gnu/stubs.h \
/usr/include/gnu/stubs-32.h \
/usr/lib/gcc/i486-linux-gnu/4.4.1/include/stddef.h \
/usr/include/gnu/stubs-64.h \
/usr/lib/gcc/x86_64-linux-gnu/4.4.1/include/stddef.h \
/usr/include/bits/types.h /usr/include/bits/typesizes.h \
/usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
/usr/lib/gcc/i486-linux-gnu/4.4.1/include/stdarg.h \
/usr/lib/gcc/x86_64-linux-gnu/4.4.1/include/stdarg.h \
/usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
/usr/include/bits/stdio.h /usr/include/bits/stdio2.h \
/usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \
52,9 → 52,9
 
/usr/include/gnu/stubs.h:
 
/usr/include/gnu/stubs-32.h:
/usr/include/gnu/stubs-64.h:
 
/usr/lib/gcc/i486-linux-gnu/4.4.1/include/stddef.h:
/usr/lib/gcc/x86_64-linux-gnu/4.4.1/include/stddef.h:
 
/usr/include/bits/types.h:
 
66,7 → 66,7
 
/usr/include/wchar.h:
 
/usr/lib/gcc/i486-linux-gnu/4.4.1/include/stdarg.h:
/usr/lib/gcc/x86_64-linux-gnu/4.4.1/include/stdarg.h:
 
/usr/include/bits/stdio_lim.h:
 
/programy/C/ix86/echo/SW/sonar/src/sonar
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/programy/C/ix86/echo/SW/sonar/src/sonar.c
20,7 → 20,8
 
#define SOUND_SPEED 340.0 // sound speed in air in metrs per second
#define MAX_RANGE 10.0 // maximal working radius in meters
#define APERTURE 0.2 // distance between microphones
#define Xl -0.1 // microphones position
#define Xr 0.1
 
static char *device = "plughw:0,0"; /* playback device */
static snd_pcm_format_t format = SND_PCM_FORMAT_S16; /* sample format */
278,7 → 279,8
echo_map = malloc(3*period_size*period_size * sizeof(float)); // Array to store two dimensional image of echos
if (echo_map == NULL) printf("Can't allocate enought memory");
 
k = SOUND_SPEED/rate;
k = SOUND_SPEED/rate; // normalising constant
 
// generate ping pattern
chirp_size = linear_windowed_chirp(chirp);
 
374,8 → 376,8
for(j=0;j < period_size; j+=10)
{
b=k*j;
echo_map[m]=(a*a-b*b+APERTURE*APERTURE)/(2*APERTURE);
echo_map[m+1]=sqrt((a-b-APERTURE)*(a+b-APERTURE)*(a-b+APERTURE)*(a+b+APERTURE))/(2*r);
echo_map[m]=(-a*a+b*b+Xl*Xl+Xr*Xr)/(2*Xl-2*Xr);
echo_map[m+1]=sqrt((a-b-Xl-Xr)*(a+b+Xl+Xr)*(a-b-Xl+Xr)*(a-b-Xl+Xr)*(a+b-Xl+Xr))/(-2*(Xl-Xr));
echo_map[m+2]=correlationl[i]*correlationr[j];
m+=3;
}
418,7 → 420,7
 
j=0;
out=fopen("/tmp/plane_cut.txt","w"); // writes plane cut - e.g. density map to file
for (i=0;i < period_size*period_size; i++)
for (i=0;i < period_size*period_size/100; i++)
{
fprintf(out,"%3.3f %3.3f %3.3f\n", echo_map[j], echo_map[j+1], echo_map[j+2]);
j+=3;