Page 1 of 1

plotting forces

PostPosted: Sat Dec 31, 2011 1:23 pm
by scott cox
I use algodoo in my Physics classes. One major improvement would be the ability to plot force-time graphs. I can plot kinetic energy-time graphs, etc so why not force-time? It would also be fantastic to have the ability to calculate the area under the graph. The gradient of any graph is able to be seen by simply moving the cursor over the line. It'd be great if we could also calculate areas.

Re: plotting forces

PostPosted: Wed Jan 04, 2012 2:53 pm
by emilk
I spent the day yesterday implementing integral calculation and visualization in the plot, and boy does it look sweet!

I also added the option to plot acceleration and force magnitude for an object, so one can now easily see that the integral of the acceleration is the current velocity, and the integral of the velocity is the position.

Please try it out in Algodoo 2.0.2 b2 at viewtopic.php?f=24&t=5834#p57796

Re: plotting forces

PostPosted: Thu Jan 05, 2012 5:44 am
by scott cox
Well done Emil!
Talk about a fast response. I make a request and 2 days later its done. The integral function on the graphs looks really cool. These small additions make a huge impact the usefulness of algodoo in my Physics classes. Keep up the good work :P

Re: plotting forces

PostPosted: Fri Jan 06, 2012 3:02 am
by scott cox
Actually I did notice one small improvement that could be made. The integral function in the graphs only works when time is selected as the x coordinate. For work, displacement needs to be selected as the x coordinate, in which case the integral won't work on the graph. I don't want to sound like I'm criticising though, you've done a great job :)

Re: plotting forces

PostPosted: Thu Jan 26, 2012 6:06 pm
by emilk
Thanks for the feedback, and I'm glad you enjoy the integrals!

I restricted the integral calculations to time on the x axis so as not to confuse the user when producing e.g. velocity/position graphs which can easily loop back on themselves (e.g. for a pendelum), but I do see your point about work calculations.

I could remove the integral only for the case when the x-axis loops back on oneself, though if I add support for signed forces (i.e. force along x/y axis) then one would probably want support for work-integral even when it does loop back on oneself.

I'll have to consider this a bit I think. Happy for more feedback!

Edit: I've now uploaded 2.0.2 b5 which supports integral for all plots, as well as force/acceleration plotting on x/y axis (not just magnitude).