Skip to content

Instantly share code, notes, and snippets.

@dam13n
Created July 24, 2025 21:01
Show Gist options
  • Select an option

  • Save dam13n/aed01886198c4563315052b74ac54289 to your computer and use it in GitHub Desktop.

Select an option

Save dam13n/aed01886198c4563315052b74ac54289 to your computer and use it in GitHub Desktop.
Notebook I used to explore and generate pitch parameters for Pitch Out Baseball (Mathematica 10.1)
(* Content-type: application/vnd.wolfram.mathematica *)
(*** Wolfram Notebook File ***)
(* http://www.wolfram.com/nb *)
(* CreatedBy='Mathematica 10.1' *)
(*CacheID: 234*)
(* Internal cache information:
NotebookFileLineBreakTest
NotebookFileLineBreakTest
NotebookDataPosition[ 158, 7]
NotebookDataLength[ 33140, 726]
NotebookOptionsPosition[ 32275, 696]
NotebookOutlinePosition[ 32631, 712]
CellTagsIndexPosition[ 32588, 709]
WindowFrame->Normal*)
(* Beginning of Notebook Content *)
Notebook[{
Cell[CellGroupData[{
Cell[BoxData[{
RowBox[{"width", " ", "=", " ", "312"}], "\[IndentingNewLine]",
RowBox[{"height", " ", "=", " ", "348"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{"timePeriod", " ", "=", " ", "10"}],
"\[IndentingNewLine]"}], "\[IndentingNewLine]",
RowBox[{"xPitcher", " ", "=", " ",
RowBox[{"142", " ", "-", " ",
RowBox[{"width", "/", "2"}]}]}], "\[IndentingNewLine]",
RowBox[{"yPitcher", " ", "=", " ",
RowBox[{
RowBox[{"height", "/", "2"}], " ", "-", " ",
"200"}]}], "\[IndentingNewLine]",
RowBox[{
RowBox[{"yFeet", " ", "=", " ",
RowBox[{
RowBox[{"height", "/", "2"}], " ", "-", " ", "238"}]}],
"\[IndentingNewLine]", "\[IndentingNewLine]",
RowBox[{"(*", " ",
RowBox[{"knuckle", " ", "crap"}], " ", "*)"}]}], "\[IndentingNewLine]",
RowBox[{"knuckle", " ", "=", " ",
RowBox[{"Function", "[",
RowBox[{
RowBox[{"{",
RowBox[{"t", ",", "P"}], "}"}], ",", " ",
RowBox[{"Sin", "[",
RowBox[{"2", "Pi", " ",
RowBox[{"t", "/", "P"}]}], "]"}]}], "]"}]}], "\[IndentingNewLine]",
RowBox[{
RowBox[{"kfac", " ", "=", " ",
RowBox[{"Function", "[",
RowBox[{"kfac", ",", " ", "kfac"}], "]"}]}], "\[IndentingNewLine]",
"\[IndentingNewLine]",
RowBox[{"(*", " ",
RowBox[{
RowBox[{"F",
RowBox[{"(", "t", ")"}]}], "=",
RowBox[{
RowBox[{"Af",
RowBox[{"(",
RowBox[{"Bt", "\[Dash]", "C"}], ")"}]}], "+",
RowBox[{
"D", " ", "\[IndentingNewLine]", " ", "period", " ", "is", " ", "2",
RowBox[{"pi", " ", "/", " ", "B"}]}]}]}], " ",
"*)"}]}], "\[IndentingNewLine]",
RowBox[{"xpos", "=", " ",
RowBox[{"Function", "[",
RowBox[{
RowBox[{"{",
RowBox[{"t", ",", "xfac", ",", "curve", ",", "xsway"}], "}"}], ",",
RowBox[{
RowBox[{"curve", "*", "xfac", "*",
RowBox[{"Sin", "[",
RowBox[{
RowBox[{"(",
RowBox[{"Pi", "/", "timePeriod"}], ")"}], " ", "t"}], "]"}]}], "+",
RowBox[{"xsway", "*",
RowBox[{"t", "/", "timePeriod"}]}], " ", "+", " ",
RowBox[{"xPitcher", " ", "*",
RowBox[{"timePeriod", "/",
RowBox[{"(",
RowBox[{"timePeriod", "+",
RowBox[{"t", "^", "2"}]}], ")"}]}]}]}]}],
"]"}]}], "\[IndentingNewLine]",
RowBox[{"yshadow", " ", "=", " ",
RowBox[{"Function", "[",
RowBox[{"t", ",",
RowBox[{
RowBox[{"yFeet", "*",
RowBox[{"timePeriod", "/",
RowBox[{"(",
RowBox[{"timePeriod", "+",
RowBox[{"t", "^", "2"}]}], " ", ")"}]}]}], " ", "-", " ",
RowBox[{
RowBox[{"height", "/", "2"}], "*",
RowBox[{"t", "/", "timePeriod"}]}]}]}], " ",
"]"}]}], "\[IndentingNewLine]",
RowBox[{"ypos", " ", "=", " ",
RowBox[{"Function", "[",
RowBox[{
RowBox[{"{",
RowBox[{"t", ",", "yfac", ",", "ysway", ",", "rise"}], "}"}], ",", " ",
RowBox[{
RowBox[{"rise", "*", "yfac", "*",
RowBox[{"Sin", "[",
RowBox[{"t", "*",
RowBox[{"Pi", "/", "timePeriod"}]}], "]"}]}], "-",
RowBox[{
RowBox[{"(", "ysway", ")"}], "*",
RowBox[{"t", "/", "timePeriod"}]}], "+", " ",
RowBox[{"yPitcher", "*",
RowBox[{"timePeriod", "/",
RowBox[{"(",
RowBox[{"timePeriod", "+",
RowBox[{"t", "^", "2"}]}], ")"}]}]}]}]}],
"]"}]}], "\[IndentingNewLine]",
RowBox[{"ballsize", " ", "=", " ",
RowBox[{"Function", "[",
RowBox[{"T", ",",
RowBox[{
RowBox[{".009", "*", "T"}], "+", ".02"}]}],
"]"}]}], "\[IndentingNewLine]",
RowBox[{"Animate", "[",
RowBox[{
RowBox[{"Show", "[",
RowBox[{
RowBox[{"ParametricPlot", "[",
RowBox[{
RowBox[{"{",
RowBox[{
RowBox[{
RowBox[{"xpos", "[",
RowBox[{"t", ",", "xfac", ",", "curve", ",", "xsway"}], "]"}], "+",
RowBox[{"kfac", "*",
RowBox[{"knuckle", "[",
RowBox[{"t", ",", "P"}], "]"}]}]}], ",",
RowBox[{
RowBox[{"ypos", "[",
RowBox[{"t", ",", "yfac", ",", "ysway", ",", "rise"}], "]"}], "+",
RowBox[{
RowBox[{"-", "kfac"}], "*",
RowBox[{"knuckle", "[",
RowBox[{"t", ",", "P"}], "]"}]}]}]}], "}"}], ",",
RowBox[{"{",
RowBox[{"t", ",", "0", ",", "10"}], "}"}], ",",
RowBox[{"AxesLabel", "\[Rule]",
RowBox[{"{",
RowBox[{"\"\<x\>\"", ",", "\"\<y\>\""}], "}"}]}], ",",
RowBox[{"PlotRange", "\[Rule]",
RowBox[{"{",
RowBox[{
RowBox[{"{",
RowBox[{
RowBox[{
RowBox[{"-", "width"}], "/", "2"}], ",",
RowBox[{"width", "/", "2"}]}], "}"}], ",",
RowBox[{"{",
RowBox[{
RowBox[{
RowBox[{"-", "height"}], "/", "2"}], ",", " ",
RowBox[{"height", "/", "2"}]}], "}"}]}], "}"}]}]}], "]"}], ",",
"\[IndentingNewLine]",
RowBox[{"Graphics", "[", "\[IndentingNewLine]",
RowBox[{"{",
RowBox[{
RowBox[{"Opacity", "[", ".1", "]"}], ",", "Green", ",",
RowBox[{"Rectangle", "[",
RowBox[{
RowBox[{"{",
RowBox[{
RowBox[{
RowBox[{"-", "width"}], "/", "2"}], ",",
RowBox[{
RowBox[{"-", "height"}], "/", "2"}]}], "}"}], ",",
RowBox[{"{",
RowBox[{
RowBox[{"width", "/", "2"}], ",", " ",
RowBox[{"height", "/", "2"}]}], "}"}]}], "]"}], ",",
"\[IndentingNewLine]",
RowBox[{"Opacity", "[", ".5", "]"}], ",", "Red", ",",
RowBox[{"Rectangle", "[",
RowBox[{
RowBox[{"{",
RowBox[{
RowBox[{"-", "1"}], ",", "1"}], "}"}], ",",
RowBox[{"{",
RowBox[{"1", ",", "8"}], "}"}]}], "]"}], ",",
"\[IndentingNewLine]", "Blue", ",",
RowBox[{"Rectangle", "[",
RowBox[{
RowBox[{"{",
RowBox[{
RowBox[{"-", "18"}], ",",
RowBox[{"-", "15"}]}], "}"}], ",",
RowBox[{"{",
RowBox[{
RowBox[{"-", "10"}], ",", "5"}], "}"}]}], "]"}], ",",
"\[IndentingNewLine]",
RowBox[{"Opacity", "[", "1", "]"}], ",", "Blue", ",",
RowBox[{"Rectangle", "[",
RowBox[{
RowBox[{"{",
RowBox[{
RowBox[{"-", "14"}], ",",
RowBox[{"-", "5"}]}], "}"}], ",",
RowBox[{"{",
RowBox[{
RowBox[{"-", "12"}], ",", "10"}], "}"}]}], "]"}], ",",
"\[IndentingNewLine]",
RowBox[{"Opacity", "[", "1", "]"}], ",", "Red", ",",
RowBox[{"PointSize", "[",
RowBox[{"ballsize", "[", "T", "]"}], "]"}], ",",
RowBox[{"Point", "[",
RowBox[{"{",
RowBox[{
RowBox[{
RowBox[{"xpos", "[",
RowBox[{"T", ",", "xfac", ",", "curve", ",", "xsway"}], "]"}],
"+",
RowBox[{"kfac", "*",
RowBox[{"knuckle", "[",
RowBox[{"T", ",", "P"}], "]"}]}]}], ",",
RowBox[{
RowBox[{"ypos", "[",
RowBox[{"T", ",", "yfac", ",", "ysway", ",", "rise"}], "]"}],
"+",
RowBox[{
RowBox[{"-", "kfac"}], "*",
RowBox[{"knuckle", "[",
RowBox[{"T", ",", "P"}], "]"}]}]}]}], "}"}], "]"}], ",",
"\[IndentingNewLine]",
RowBox[{"Opacity", "[", ".5", "]"}], ",", "Black", ",",
RowBox[{"PointSize", "[",
RowBox[{"ballsize", "[", "T", "]"}], "]"}], ",",
"\[IndentingNewLine]", "\t",
RowBox[{"Point", "[",
RowBox[{"{",
RowBox[{
RowBox[{
RowBox[{"xpos", "[",
RowBox[{"T", ",", "xfac", ",", "curve", ",", "xsway"}], "]"}],
"+",
RowBox[{"kfac", "*",
RowBox[{"knuckle", "[",
RowBox[{"T", ",", "P"}], "]"}]}]}], ",",
RowBox[{"yshadow", "[", "T", "]"}]}], "}"}], "]"}]}],
"\[IndentingNewLine]", "}"}], "]"}]}], "]"}], ",", " ",
"\[IndentingNewLine]",
RowBox[{"{",
RowBox[{"xfac", ",", "0", ",",
RowBox[{"width", "/", "2"}]}], "}"}], ",", " ", "\[IndentingNewLine]",
RowBox[{"{",
RowBox[{"curve", ",",
RowBox[{"-", "1"}], ",", "1"}], "}"}], ",", " ", "\[IndentingNewLine]",
RowBox[{"{",
RowBox[{"xsway", ",",
RowBox[{
RowBox[{"-", "width"}], "/", "2"}], ",",
RowBox[{"width", "/", "2"}]}], "}"}], ",", "\[IndentingNewLine]",
RowBox[{"{",
RowBox[{"yfac", ",", "0", ",",
RowBox[{"height", "/", "2"}]}], "}"}], ",", "\[IndentingNewLine]",
RowBox[{"{",
RowBox[{"ysway", ",", " ",
RowBox[{
RowBox[{"-", "height"}], "/", "2"}], ",", " ",
RowBox[{"height", "/", "2"}]}], "}"}], ",", "\[IndentingNewLine]",
RowBox[{"{",
RowBox[{"rise", ",", " ",
RowBox[{"-", "1"}], ",", "1"}], "}"}], ",", "\[IndentingNewLine]",
RowBox[{"{",
RowBox[{"kfac", ",", " ", "0", ",", "5"}], "}"}], ",",
"\[IndentingNewLine]",
RowBox[{"{",
RowBox[{"P", ",", "5", ",",
RowBox[{"timePeriod", "*", "100"}]}], "}"}], ",", "\[IndentingNewLine]",
RowBox[{"{",
RowBox[{"T", ",", "0", ",", "10"}], "}"}], ",",
RowBox[{"AnimationRunning", "\[Rule]", "False"}]}], "]"}], "\n"}], "Input",\
CellChangeTimes->{{3.6368417212958603`*^9, 3.6368417232334948`*^9},
3.6368418861922903`*^9, {3.636841917970449*^9, 3.636841941635989*^9},
3.636842297235067*^9, {3.636842349331213*^9, 3.6368424706395063`*^9}, {
3.636842510526162*^9, 3.6368425570292187`*^9}, {3.636843731107785*^9,
3.63684381132796*^9}, {3.636843891770005*^9, 3.6368439534471073`*^9}, {
3.636843990843614*^9, 3.636844025707292*^9}, {3.636844088224944*^9,
3.636844219591463*^9}, {3.6368443238998623`*^9, 3.6368443479243917`*^9}, {
3.636844661295908*^9, 3.636844662226386*^9}, {3.636844699806006*^9,
3.636844705292472*^9}, {3.636844853247456*^9, 3.636844887236576*^9}, {
3.6368449292241364`*^9, 3.636844938168886*^9}, {3.636845171055943*^9,
3.63684518405052*^9}, {3.636845287687086*^9, 3.636845298362031*^9}, {
3.63684557332294*^9, 3.636845603043364*^9}, {3.636845690097084*^9,
3.6368457305220327`*^9}, {3.636845812646549*^9, 3.636845861487445*^9}, {
3.636846314800709*^9, 3.636846338933733*^9}, {3.6368463855769377`*^9,
3.63684640067311*^9}, {3.6368470639056673`*^9, 3.636847224397272*^9}, {
3.6368473068468924`*^9, 3.636847448691842*^9}, {3.636847676229117*^9,
3.636847676327588*^9}, {3.636848635660584*^9, 3.636848651178636*^9}, {
3.636848683395138*^9, 3.636848711752734*^9}, {3.636848795366931*^9,
3.63684879617476*^9}, {3.636848848485634*^9, 3.636848913308001*^9}, {
3.6368490334652567`*^9, 3.636849035548502*^9}, 3.636849160100087*^9, {
3.63684946000451*^9, 3.6368495632094917`*^9}, {3.636849605822392*^9,
3.636849763198666*^9}, {3.63684980048164*^9, 3.6368498596515017`*^9}, {
3.636850564586804*^9, 3.6368507591888113`*^9}, {3.6368508075229683`*^9,
3.636850807923942*^9}, {3.6368508544098377`*^9, 3.636850894664234*^9}, {
3.636851006979995*^9, 3.636851110679147*^9}, {3.636851168237741*^9,
3.63685119623641*^9}, {3.63685239302212*^9, 3.636852420115028*^9},
3.63685245329902*^9, {3.636852490865147*^9, 3.636852532591867*^9}, {
3.636852619370756*^9, 3.63685262060431*^9}, 3.6368529259410553`*^9, {
3.6368530006965427`*^9, 3.636853119676999*^9}, {3.636853151877283*^9,
3.6368531537225227`*^9}, {3.636853185955336*^9, 3.636853207449297*^9},
3.6368538710871277`*^9, 3.636853905152219*^9, {3.636853946096889*^9,
3.636853946335905*^9}, {3.636853998750791*^9, 3.636854045490357*^9}, {
3.63685414924126*^9, 3.636854149359892*^9}, {3.636858246538011*^9,
3.6368583061127987`*^9}, {3.636858353197154*^9, 3.636858492951523*^9}, {
3.636858609134162*^9, 3.6368586753211*^9}, {3.63685880293368*^9,
3.6368588039824257`*^9}, {3.636858855787945*^9, 3.636858894898004*^9}, {
3.636859320277314*^9, 3.6368593681299667`*^9}, {3.636859462425549*^9,
3.636859587787799*^9}, {3.6368596728313923`*^9, 3.6368597028626633`*^9}, {
3.6368598312700367`*^9, 3.63685984332191*^9}, {3.636859929072646*^9,
3.6368599833823223`*^9}, {3.636860031167145*^9, 3.6368600323956213`*^9}, {
3.636860192441731*^9, 3.636860214045833*^9}, {3.636909156681035*^9,
3.636909185253147*^9}, 3.636909326563382*^9, {3.636910118128969*^9,
3.6369101364557734`*^9}, {3.636910191829157*^9, 3.6369101965168447`*^9}, {
3.636978680194648*^9, 3.636978707922258*^9}, {3.638980480002439*^9,
3.63898048334706*^9}, {3.638980519674384*^9, 3.6389805719664907`*^9}, {
3.638980662544836*^9, 3.638980698444334*^9}, 3.6389807338843*^9, {
3.6389807667455873`*^9, 3.6389807772080803`*^9}, {3.63898117122358*^9,
3.638981279129855*^9}, {3.638981439322063*^9, 3.6389814556022167`*^9}, {
3.6389816400991783`*^9, 3.638981687159355*^9}, {3.63898196907717*^9,
3.6389819767709217`*^9}, {3.6389827023501673`*^9,
3.6389827560835648`*^9}, {3.6389828812149343`*^9, 3.638982886412674*^9}, {
3.638983243933895*^9, 3.638983299018627*^9}, {3.6389833995284843`*^9,
3.6389834028152*^9}, {3.638983544146793*^9, 3.638983591783236*^9}, {
3.638983626429517*^9, 3.6389836820674553`*^9}, {3.638983738217306*^9,
3.638983800204973*^9}, {3.6389838483646193`*^9, 3.638983850676463*^9}, {
3.6389839470566177`*^9, 3.638983952206773*^9}, {3.638984070828432*^9,
3.6389840848647213`*^9}, {3.6389841779275303`*^9, 3.638984183468033*^9}, {
3.638984217549128*^9, 3.638984217874324*^9}, {3.638984299986374*^9,
3.638984301991317*^9}, {3.638984434970379*^9, 3.6389844372665243`*^9}, {
3.638984493546473*^9, 3.638984513461708*^9}, {3.638984547777666*^9,
3.638984628423411*^9}, {3.638985039120782*^9, 3.638985040839347*^9}, {
3.638985142703524*^9, 3.638985145812455*^9}, {3.638985204227624*^9,
3.6389852129962*^9}, {3.638985408270021*^9, 3.638985409566059*^9}, {
3.638985457644973*^9, 3.638985461453076*^9}, {3.6389855031731052`*^9,
3.638985518582563*^9}}],
Cell[BoxData["312"], "Output",
CellChangeTimes->{
3.63898070447075*^9, 3.6389807793484793`*^9, 3.6389819788309526`*^9,
3.638982729026493*^9, 3.6389827606154823`*^9, 3.638983316948656*^9,
3.638983403291568*^9, {3.6389835748982363`*^9, 3.638983593133754*^9},
3.638983628322813*^9, 3.6389836832087603`*^9, 3.638983746606529*^9,
3.63898380157031*^9, 3.638983851787026*^9, 3.638984183965818*^9,
3.638984218694957*^9, 3.638984303080462*^9, 3.638984439547895*^9, {
3.638984496046863*^9, 3.638984513843905*^9}, {3.638984548675515*^9,
3.638984628856063*^9}, {3.638985462760626*^9, 3.638985471875259*^9}, {
3.638985505084214*^9, 3.638985519152217*^9}}],
Cell[BoxData["348"], "Output",
CellChangeTimes->{
3.63898070447075*^9, 3.6389807793484793`*^9, 3.6389819788309526`*^9,
3.638982729026493*^9, 3.6389827606154823`*^9, 3.638983316948656*^9,
3.638983403291568*^9, {3.6389835748982363`*^9, 3.638983593133754*^9},
3.638983628322813*^9, 3.6389836832087603`*^9, 3.638983746606529*^9,
3.63898380157031*^9, 3.638983851787026*^9, 3.638984183965818*^9,
3.638984218694957*^9, 3.638984303080462*^9, 3.638984439547895*^9, {
3.638984496046863*^9, 3.638984513843905*^9}, {3.638984548675515*^9,
3.638984628856063*^9}, {3.638985462760626*^9, 3.638985471875259*^9}, {
3.638985505084214*^9, 3.638985519165073*^9}}],
Cell[BoxData["10"], "Output",
CellChangeTimes->{
3.63898070447075*^9, 3.6389807793484793`*^9, 3.6389819788309526`*^9,
3.638982729026493*^9, 3.6389827606154823`*^9, 3.638983316948656*^9,
3.638983403291568*^9, {3.6389835748982363`*^9, 3.638983593133754*^9},
3.638983628322813*^9, 3.6389836832087603`*^9, 3.638983746606529*^9,
3.63898380157031*^9, 3.638983851787026*^9, 3.638984183965818*^9,
3.638984218694957*^9, 3.638984303080462*^9, 3.638984439547895*^9, {
3.638984496046863*^9, 3.638984513843905*^9}, {3.638984548675515*^9,
3.638984628856063*^9}, {3.638985462760626*^9, 3.638985471875259*^9}, {
3.638985505084214*^9, 3.638985519173469*^9}}],
Cell[BoxData[
RowBox[{"-", "14"}]], "Output",
CellChangeTimes->{
3.63898070447075*^9, 3.6389807793484793`*^9, 3.6389819788309526`*^9,
3.638982729026493*^9, 3.6389827606154823`*^9, 3.638983316948656*^9,
3.638983403291568*^9, {3.6389835748982363`*^9, 3.638983593133754*^9},
3.638983628322813*^9, 3.6389836832087603`*^9, 3.638983746606529*^9,
3.63898380157031*^9, 3.638983851787026*^9, 3.638984183965818*^9,
3.638984218694957*^9, 3.638984303080462*^9, 3.638984439547895*^9, {
3.638984496046863*^9, 3.638984513843905*^9}, {3.638984548675515*^9,
3.638984628856063*^9}, {3.638985462760626*^9, 3.638985471875259*^9}, {
3.638985505084214*^9, 3.6389855191818542`*^9}}],
Cell[BoxData[
RowBox[{"-", "26"}]], "Output",
CellChangeTimes->{
3.63898070447075*^9, 3.6389807793484793`*^9, 3.6389819788309526`*^9,
3.638982729026493*^9, 3.6389827606154823`*^9, 3.638983316948656*^9,
3.638983403291568*^9, {3.6389835748982363`*^9, 3.638983593133754*^9},
3.638983628322813*^9, 3.6389836832087603`*^9, 3.638983746606529*^9,
3.63898380157031*^9, 3.638983851787026*^9, 3.638984183965818*^9,
3.638984218694957*^9, 3.638984303080462*^9, 3.638984439547895*^9, {
3.638984496046863*^9, 3.638984513843905*^9}, {3.638984548675515*^9,
3.638984628856063*^9}, {3.638985462760626*^9, 3.638985471875259*^9}, {
3.638985505084214*^9, 3.63898551919022*^9}}],
Cell[BoxData[
RowBox[{"-", "64"}]], "Output",
CellChangeTimes->{
3.63898070447075*^9, 3.6389807793484793`*^9, 3.6389819788309526`*^9,
3.638982729026493*^9, 3.6389827606154823`*^9, 3.638983316948656*^9,
3.638983403291568*^9, {3.6389835748982363`*^9, 3.638983593133754*^9},
3.638983628322813*^9, 3.6389836832087603`*^9, 3.638983746606529*^9,
3.63898380157031*^9, 3.638983851787026*^9, 3.638984183965818*^9,
3.638984218694957*^9, 3.638984303080462*^9, 3.638984439547895*^9, {
3.638984496046863*^9, 3.638984513843905*^9}, {3.638984548675515*^9,
3.638984628856063*^9}, {3.638985462760626*^9, 3.638985471875259*^9}, {
3.638985505084214*^9, 3.63898551919981*^9}}],
Cell[BoxData[
RowBox[{"Function", "[",
RowBox[{
RowBox[{"{",
RowBox[{"t", ",", "P"}], "}"}], ",",
RowBox[{"Sin", "[",
FractionBox[
RowBox[{"2", " ", "\[Pi]", " ", "t"}], "P"], "]"}]}], "]"}]], "Output",
CellChangeTimes->{
3.63898070447075*^9, 3.6389807793484793`*^9, 3.6389819788309526`*^9,
3.638982729026493*^9, 3.6389827606154823`*^9, 3.638983316948656*^9,
3.638983403291568*^9, {3.6389835748982363`*^9, 3.638983593133754*^9},
3.638983628322813*^9, 3.6389836832087603`*^9, 3.638983746606529*^9,
3.63898380157031*^9, 3.638983851787026*^9, 3.638984183965818*^9,
3.638984218694957*^9, 3.638984303080462*^9, 3.638984439547895*^9, {
3.638984496046863*^9, 3.638984513843905*^9}, {3.638984548675515*^9,
3.638984628856063*^9}, {3.638985462760626*^9, 3.638985471875259*^9}, {
3.638985505084214*^9, 3.638985519208623*^9}}],
Cell[BoxData[
RowBox[{"Function", "[",
RowBox[{"kfac", ",", "kfac"}], "]"}]], "Output",
CellChangeTimes->{
3.63898070447075*^9, 3.6389807793484793`*^9, 3.6389819788309526`*^9,
3.638982729026493*^9, 3.6389827606154823`*^9, 3.638983316948656*^9,
3.638983403291568*^9, {3.6389835748982363`*^9, 3.638983593133754*^9},
3.638983628322813*^9, 3.6389836832087603`*^9, 3.638983746606529*^9,
3.63898380157031*^9, 3.638983851787026*^9, 3.638984183965818*^9,
3.638984218694957*^9, 3.638984303080462*^9, 3.638984439547895*^9, {
3.638984496046863*^9, 3.638984513843905*^9}, {3.638984548675515*^9,
3.638984628856063*^9}, {3.638985462760626*^9, 3.638985471875259*^9}, {
3.638985505084214*^9, 3.638985519218717*^9}}],
Cell[BoxData[
RowBox[{"Function", "[",
RowBox[{
RowBox[{"{",
RowBox[{"t", ",", "xfac", ",", "curve", ",", "xsway"}], "}"}], ",",
RowBox[{
RowBox[{"curve", " ", "xfac", " ",
RowBox[{"Sin", "[",
FractionBox[
RowBox[{"\[Pi]", " ", "t"}], "timePeriod"], "]"}]}], "+",
FractionBox[
RowBox[{"xsway", " ", "t"}], "timePeriod"], "+",
FractionBox[
RowBox[{"xPitcher", " ", "timePeriod"}],
RowBox[{"timePeriod", "+",
SuperscriptBox["t", "2"]}]]}]}], "]"}]], "Output",
CellChangeTimes->{
3.63898070447075*^9, 3.6389807793484793`*^9, 3.6389819788309526`*^9,
3.638982729026493*^9, 3.6389827606154823`*^9, 3.638983316948656*^9,
3.638983403291568*^9, {3.6389835748982363`*^9, 3.638983593133754*^9},
3.638983628322813*^9, 3.6389836832087603`*^9, 3.638983746606529*^9,
3.63898380157031*^9, 3.638983851787026*^9, 3.638984183965818*^9,
3.638984218694957*^9, 3.638984303080462*^9, 3.638984439547895*^9, {
3.638984496046863*^9, 3.638984513843905*^9}, {3.638984548675515*^9,
3.638984628856063*^9}, {3.638985462760626*^9, 3.638985471875259*^9}, {
3.638985505084214*^9, 3.6389855192284393`*^9}}],
Cell[BoxData[
RowBox[{"Function", "[",
RowBox[{"t", ",",
RowBox[{
FractionBox[
RowBox[{"yFeet", " ", "timePeriod"}],
RowBox[{"timePeriod", "+",
SuperscriptBox["t", "2"]}]], "-",
FractionBox[
RowBox[{"height", " ", "t"}],
RowBox[{"2", " ", "timePeriod"}]]}]}], "]"}]], "Output",
CellChangeTimes->{
3.63898070447075*^9, 3.6389807793484793`*^9, 3.6389819788309526`*^9,
3.638982729026493*^9, 3.6389827606154823`*^9, 3.638983316948656*^9,
3.638983403291568*^9, {3.6389835748982363`*^9, 3.638983593133754*^9},
3.638983628322813*^9, 3.6389836832087603`*^9, 3.638983746606529*^9,
3.63898380157031*^9, 3.638983851787026*^9, 3.638984183965818*^9,
3.638984218694957*^9, 3.638984303080462*^9, 3.638984439547895*^9, {
3.638984496046863*^9, 3.638984513843905*^9}, {3.638984548675515*^9,
3.638984628856063*^9}, {3.638985462760626*^9, 3.638985471875259*^9}, {
3.638985505084214*^9, 3.6389855192372932`*^9}}],
Cell[BoxData[
RowBox[{"Function", "[",
RowBox[{
RowBox[{"{",
RowBox[{"t", ",", "yfac", ",", "ysway", ",", "rise"}], "}"}], ",",
RowBox[{
RowBox[{"rise", " ", "yfac", " ",
RowBox[{"Sin", "[",
FractionBox[
RowBox[{"t", " ", "\[Pi]"}], "timePeriod"], "]"}]}], "-",
FractionBox[
RowBox[{"ysway", " ", "t"}], "timePeriod"], "+",
FractionBox[
RowBox[{"yPitcher", " ", "timePeriod"}],
RowBox[{"timePeriod", "+",
SuperscriptBox["t", "2"]}]]}]}], "]"}]], "Output",
CellChangeTimes->{
3.63898070447075*^9, 3.6389807793484793`*^9, 3.6389819788309526`*^9,
3.638982729026493*^9, 3.6389827606154823`*^9, 3.638983316948656*^9,
3.638983403291568*^9, {3.6389835748982363`*^9, 3.638983593133754*^9},
3.638983628322813*^9, 3.6389836832087603`*^9, 3.638983746606529*^9,
3.63898380157031*^9, 3.638983851787026*^9, 3.638984183965818*^9,
3.638984218694957*^9, 3.638984303080462*^9, 3.638984439547895*^9, {
3.638984496046863*^9, 3.638984513843905*^9}, {3.638984548675515*^9,
3.638984628856063*^9}, {3.638985462760626*^9, 3.638985471875259*^9}, {
3.638985505084214*^9, 3.638985519246112*^9}}],
Cell[BoxData[
RowBox[{"Function", "[",
RowBox[{"T", ",",
RowBox[{
RowBox[{"0.009`", " ", "T"}], "+", "0.02`"}]}], "]"}]], "Output",
CellChangeTimes->{
3.63898070447075*^9, 3.6389807793484793`*^9, 3.6389819788309526`*^9,
3.638982729026493*^9, 3.6389827606154823`*^9, 3.638983316948656*^9,
3.638983403291568*^9, {3.6389835748982363`*^9, 3.638983593133754*^9},
3.638983628322813*^9, 3.6389836832087603`*^9, 3.638983746606529*^9,
3.63898380157031*^9, 3.638983851787026*^9, 3.638984183965818*^9,
3.638984218694957*^9, 3.638984303080462*^9, 3.638984439547895*^9, {
3.638984496046863*^9, 3.638984513843905*^9}, {3.638984548675515*^9,
3.638984628856063*^9}, {3.638985462760626*^9, 3.638985471875259*^9}, {
3.638985505084214*^9, 3.638985519255361*^9}}],
Cell[BoxData[
TagBox[
StyleBox[
DynamicModuleBox[{$CellContext`curve$$ = -1., $CellContext`kfac$$ =
0., $CellContext`P$$ = 5., $CellContext`rise$$ = -1., $CellContext`T$$ =
2.318387985229492, $CellContext`xfac$$ =
0., $CellContext`xsway$$ = -156., $CellContext`yfac$$ =
0., $CellContext`ysway$$ = 148.3, Typeset`show$$ = True,
Typeset`bookmarkList$$ = {}, Typeset`bookmarkMode$$ = "Menu",
Typeset`animator$$, Typeset`animvar$$ = 1, Typeset`name$$ =
"\"untitled\"", Typeset`specs$$ = {{
Hold[$CellContext`xfac$$], 0, 156}, {
Hold[$CellContext`curve$$], -1, 1}, {
Hold[$CellContext`xsway$$], -156, 156}, {
Hold[$CellContext`yfac$$], 0, 174}, {
Hold[$CellContext`ysway$$], -174, 174}, {
Hold[$CellContext`rise$$], -1, 1}, {
Hold[$CellContext`kfac$$], 0, 5}, {
Hold[$CellContext`P$$], 5, 1000}, {
Hold[$CellContext`T$$], 0, 10}}, Typeset`size$$ = {360., {198., 203.}},
Typeset`update$$ = 0, Typeset`initDone$$, Typeset`skipInitDone$$ =
True, $CellContext`xfac$210281$$ = 0, $CellContext`curve$210282$$ =
0, $CellContext`xsway$210283$$ = 0, $CellContext`yfac$210284$$ =
0, $CellContext`ysway$210285$$ = 0, $CellContext`rise$210286$$ =
0, $CellContext`kfac$210287$$ = 0, $CellContext`P$210288$$ =
0, $CellContext`T$210289$$ = 0},
DynamicBox[Manipulate`ManipulateBoxes[
1, StandardForm,
"Variables" :> {$CellContext`curve$$ = -1, $CellContext`kfac$$ =
0, $CellContext`P$$ = 5, $CellContext`rise$$ = -1, $CellContext`T$$ =
0, $CellContext`xfac$$ =
0, $CellContext`xsway$$ = -156, $CellContext`yfac$$ =
0, $CellContext`ysway$$ = -174}, "ControllerVariables" :> {
Hold[$CellContext`xfac$$, $CellContext`xfac$210281$$, 0],
Hold[$CellContext`curve$$, $CellContext`curve$210282$$, 0],
Hold[$CellContext`xsway$$, $CellContext`xsway$210283$$, 0],
Hold[$CellContext`yfac$$, $CellContext`yfac$210284$$, 0],
Hold[$CellContext`ysway$$, $CellContext`ysway$210285$$, 0],
Hold[$CellContext`rise$$, $CellContext`rise$210286$$, 0],
Hold[$CellContext`kfac$$, $CellContext`kfac$210287$$, 0],
Hold[$CellContext`P$$, $CellContext`P$210288$$, 0],
Hold[$CellContext`T$$, $CellContext`T$210289$$, 0]},
"OtherVariables" :> {
Typeset`show$$, Typeset`bookmarkList$$, Typeset`bookmarkMode$$,
Typeset`animator$$, Typeset`animvar$$, Typeset`name$$,
Typeset`specs$$, Typeset`size$$, Typeset`update$$, Typeset`initDone$$,
Typeset`skipInitDone$$}, "Body" :> Show[
ParametricPlot[{$CellContext`xpos[$CellContext`t, \
$CellContext`xfac$$, $CellContext`curve$$, $CellContext`xsway$$] + \
$CellContext`kfac$$ $CellContext`knuckle[$CellContext`t, $CellContext`P$$], \
$CellContext`ypos[$CellContext`t, $CellContext`yfac$$, $CellContext`ysway$$, \
$CellContext`rise$$] + (-$CellContext`kfac$$) \
$CellContext`knuckle[$CellContext`t, $CellContext`P$$]}, {$CellContext`t, 0,
10}, AxesLabel -> {"x", "y"},
PlotRange -> {{(-$CellContext`width)/2, $CellContext`width/
2}, {(-$CellContext`height)/2, $CellContext`height/2}}],
Graphics[{
Opacity[0.1], Green,
Rectangle[{(-$CellContext`width)/2, (-$CellContext`height)/
2}, {$CellContext`width/2, $CellContext`height/2}],
Opacity[0.5], Red,
Rectangle[{-1, 1}, {1, 8}], Blue,
Rectangle[{-18, -15}, {-10, 5}],
Opacity[1], Blue,
Rectangle[{-14, -5}, {-12, 10}],
Opacity[1], Red,
PointSize[
$CellContext`ballsize[$CellContext`T$$]],
Point[{$CellContext`xpos[$CellContext`T$$, $CellContext`xfac$$, \
$CellContext`curve$$, $CellContext`xsway$$] + $CellContext`kfac$$ \
$CellContext`knuckle[$CellContext`T$$, $CellContext`P$$], \
$CellContext`ypos[$CellContext`T$$, $CellContext`yfac$$, \
$CellContext`ysway$$, $CellContext`rise$$] + (-$CellContext`kfac$$) \
$CellContext`knuckle[$CellContext`T$$, $CellContext`P$$]}],
Opacity[0.5], Black,
PointSize[
$CellContext`ballsize[$CellContext`T$$]],
Point[{$CellContext`xpos[$CellContext`T$$, $CellContext`xfac$$, \
$CellContext`curve$$, $CellContext`xsway$$] + $CellContext`kfac$$ \
$CellContext`knuckle[$CellContext`T$$, $CellContext`P$$],
$CellContext`yshadow[$CellContext`T$$]}]}]],
"Specifications" :> {{$CellContext`xfac$$, 0, 156, AnimationRunning ->
False, AppearanceElements -> {
"ProgressSlider", "PlayPauseButton", "FasterSlowerButtons",
"DirectionButton"}}, {$CellContext`curve$$, -1, 1,
AnimationRunning -> False,
AppearanceElements -> {
"ProgressSlider", "PlayPauseButton", "FasterSlowerButtons",
"DirectionButton"}}, {$CellContext`xsway$$, -156, 156,
AnimationRunning -> False,
AppearanceElements -> {
"ProgressSlider", "PlayPauseButton", "FasterSlowerButtons",
"DirectionButton"}}, {$CellContext`yfac$$, 0, 174,
AnimationRunning -> False,
AppearanceElements -> {
"ProgressSlider", "PlayPauseButton", "FasterSlowerButtons",
"DirectionButton"}}, {$CellContext`ysway$$, -174, 174,
AnimationRunning -> False,
AppearanceElements -> {
"ProgressSlider", "PlayPauseButton", "FasterSlowerButtons",
"DirectionButton"}}, {$CellContext`rise$$, -1, 1, AnimationRunning ->
False, AppearanceElements -> {
"ProgressSlider", "PlayPauseButton", "FasterSlowerButtons",
"DirectionButton"}}, {$CellContext`kfac$$, 0, 5, AnimationRunning ->
False, AppearanceElements -> {
"ProgressSlider", "PlayPauseButton", "FasterSlowerButtons",
"DirectionButton"}}, {$CellContext`P$$, 5, 1000, AnimationRunning ->
False, AppearanceElements -> {
"ProgressSlider", "PlayPauseButton", "FasterSlowerButtons",
"DirectionButton"}}, {$CellContext`T$$, 0, 10, AnimationRunning ->
False, AppearanceElements -> {
"ProgressSlider", "PlayPauseButton", "FasterSlowerButtons",
"DirectionButton"}}},
"Options" :> {
ControlType -> Animator, AppearanceElements -> None, DefaultBaseStyle ->
"Animate", DefaultLabelStyle -> "AnimateLabel", SynchronousUpdating ->
True, ShrinkingDelay -> 10.}, "DefaultOptions" :> {}],
ImageSizeCache->{731., {219., 224.}},
SingleEvaluation->True],
Deinitialization:>None,
DynamicModuleValues:>{},
SynchronousInitialization->True,
UndoTrackedVariables:>{Typeset`show$$, Typeset`bookmarkMode$$},
UnsavedVariables:>{Typeset`initDone$$},
UntrackedVariables:>{Typeset`size$$}], "Animate",
Deployed->True,
StripOnInput->False],
Manipulate`InterpretManipulate[1]]], "Output",
CellChangeTimes->{
3.63898070447075*^9, 3.6389807793484793`*^9, 3.6389819788309526`*^9,
3.638982729026493*^9, 3.6389827606154823`*^9, 3.638983316948656*^9,
3.638983403291568*^9, {3.6389835748982363`*^9, 3.638983593133754*^9},
3.638983628322813*^9, 3.6389836832087603`*^9, 3.638983746606529*^9,
3.63898380157031*^9, 3.638983851787026*^9, 3.638984183965818*^9,
3.638984218694957*^9, 3.638984303080462*^9, 3.638984439547895*^9, {
3.638984496046863*^9, 3.638984513843905*^9}, {3.638984548675515*^9,
3.638984628856063*^9}, {3.638985462760626*^9, 3.638985471875259*^9}, {
3.638985505084214*^9, 3.6389855193497868`*^9}}]
}, Open ]],
Cell[BoxData[""], "Input"]
},
WindowSize->{978, 752},
WindowMargins->{{Automatic, 207}, {37, Automatic}},
FrontEndVersion->"10.1 for Mac OS X x86 (32-bit, 64-bit Kernel) (March 23, \
2015)",
StyleDefinitions->"Default.nb"
]
(* End of Notebook Content *)
(* Internal cache information *)
(*CellTagsOutline
CellTagsIndex->{}
*)
(*CellTagsIndex
CellTagsIndex->{}
*)
(*NotebookFileOutline
Notebook[{
Cell[CellGroupData[{
Cell[580, 22, 14175, 327, 760, "Input"],
Cell[14758, 351, 675, 10, 28, "Output"],
Cell[15436, 363, 675, 10, 28, "Output"],
Cell[16114, 375, 674, 10, 28, "Output"],
Cell[16791, 387, 693, 11, 28, "Output"],
Cell[17487, 400, 690, 11, 28, "Output"],
Cell[18180, 413, 690, 11, 28, "Output"],
Cell[18873, 426, 873, 17, 47, "Output"],
Cell[19749, 445, 736, 12, 28, "Output"],
Cell[20488, 459, 1177, 25, 49, "Output"],
Cell[21668, 486, 970, 20, 49, "Output"],
Cell[22641, 508, 1173, 25, 49, "Output"],
Cell[23817, 535, 788, 14, 28, "Output"],
Cell[24608, 551, 7622, 140, 494, "Output"]
}, Open ]],
Cell[32245, 694, 26, 0, 28, "Input"]
}
]
*)
(* End of internal cache information *)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment