daven Posted March 21, 2012 Share Posted March 21, 2012 hey guys, im doing a Numerical N Body Simulaiton on 2 dimensions that means that i can see the trip of stars like the Solar system. but the problem isnt the physic but the C# i used chart to show the points. when i draw the points its showing them in the wrong place .. if its (0,0) its show them at (123,12312312) and i cant understand what the problem... please i need help. i have to send the project in less then week... for (int j = 0; j < s.number_of_bodies(); j++) { a = s.getx(j);// / 149597887000; b = s.gety(j);// / 149597887000; ch1.Series["Series" + (j + 3)].Points.AddXY(a, B); } the parameters a,b are DOUBLE type and they get the right value although its drawn in the wrong place at the graph(chart). if its not wrong tell me and i'll upload the whole project so u can see this by urself. thanks for reading! Quote Link to comment Share on other sites More sharing options...
int0x80 Posted March 21, 2012 Share Posted March 21, 2012 Try using the debugger in Visual Studio and setting breakpoints so that you can step and see the execution path and values of variables. You could also just use something like Console.WriteLine() to print variable values. Quote Link to comment Share on other sites More sharing options...
daven Posted June 14, 2012 Author Share Posted June 14, 2012 i used the quick watch to see every step the values. eventually i found the problem. thank you anyway. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.