Hi everyone,
I’m working with ROOT 6.22/02 for a university exam using a virtual version of ubuntu on Repl. I’m compiling with g++.
My program should show with TGraph the trend of the intensity of the electric field generated on the axis of two charges, starting from 100 times a given distance to 1000 times that same distance.
It mostly works, but I noticed that some of the points on the graph are set to wrong positions, I really don’t understand where the problem could be.
This is the code:
TApplication myapp("app",0,0);
TGraph * field = new TGraph;
for ( double i = 1; i <=10; i+=0.2) {
double yy = 100.*i*delta;
CampoVettoriale CV = e.CampoElettrico(delta/2,yy,0) + p.CampoElettrico(delta/2,yy,0);
field->SetPoint(i*5-4,i*5-4,CV.Modulo());
}
field->Draw("ALP");
field->SetMarkerColorAlpha(6,0.30);
field->SetMarkerStyle(48);
field->SetMarkerSize(1);
myapp.Run();
It’s my firts post on here so I hope that it’s appropriate.
Thanks for help.
Nicolas