18 TText *text5, *text3, *textn;
23 TF1 *
f =
new TF1(
"f",
"sin(x)*sin(x/10)",
a - 0.05 * (
b -
a),
b + 0.05 * (
b -
a));
30 gPad->GetRangeAxis(xx1, yy1, xx2, yy2);
33 line5 =
new TLine(xx1 + dx * 0.3, yy1 + dy * 1.02, xx1 + dx * 0.38, yy1 + dy * 1.02);
36 text5 =
new TText(xx1 + dx * 0.4, yy1 + dy * 1.03,
"quintic spline");
39 line3 =
new TLine(xx1 + dx * 0.67, yy1 + dy * 1.02, xx1 + dx * 0.75, yy1 + dy * 1.02);
42 text3 =
new TText(xx1 + dx * 0.77, yy1 + dy * 1.03,
"third spline");
45 textn =
new TText(xx1 + dx * 0.8, yy1 + dy * 0.91,
" ");
56 for (
Int_t nnp = 2; nnp <=
np; ++nnp) {
65 for (
Int_t i = 0; i < nnp; ++i) {
67 yy[i] =
f->Eval(xx[i]);
74 spline5 =
new TSpline5(
"Test", xx,
f, nnp,
"b1e1b2e2",
f->Derivative(
a),
f->Derivative(
b),
75 (
f->Derivative(
a + eps) -
f->Derivative(
a)) / eps,
76 (
f->Derivative(
b) -
f->Derivative(
b - eps)) / eps);
82 spline5->
Draw(
"lcsame");
87 spline3 =
new TSpline3(
"Test", xx, yy, nnp,
"b1e1",
f->Derivative(
a),
f->Derivative(
b));
96 spline3->
Draw(
"lcpsame");
98 sprintf(
text,
"%3d knots", nnp);
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t np
Option_t Option_t TPoint TPoint const char text
R__EXTERN TSystem * gSystem
virtual void SetLineWidth(Width_t lwidth)
Set the line width.
virtual void SetLineColor(Color_t lcolor)
Set the line color.
virtual void SetMarkerColor(Color_t mcolor=1)
Set the marker color.
virtual void SetMarkerStyle(Style_t mstyle=1)
Set the marker style.
virtual void SetMarkerSize(Size_t msize=1)
Set the marker size.
virtual void SetTextAlign(Short_t align=11)
Set the text alignment.
virtual void SetTextSize(Float_t tsize=1)
Set the text size.
Use the TLine constructor to create a simple line.
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
virtual void Draw(Option_t *option="")
Default Draw method for all objects.
Class to create third splines to interpolate knots Arbitrary conditions can be introduced for first a...
Class to create quintic natural splines to interpolate knots Arbitrary conditions can be introduced f...
void Draw(Option_t *option="") override
Draw this function with its current attributes.
virtual void Sleep(UInt_t milliSec)
Sleep milliSec milli seconds.
Base class for several text objects.
LongDouble_t Power(LongDouble_t x, LongDouble_t y)
Returns x raised to the power y.