[quote author=Fu-Kwun Hwang link=topic=749.msg2824#msg2824 date=1222068471]
It is easy with EJS if you just want to calculate the area for know function f(t).
Because what you want to do is calculate the integration of the function f(t).
Remember in evolution page when you type
dx/dt= v;
and
dv/dt=a; // or what ever function you have provided
What EJS did was integrate those two functions : v(t) and a(t) for you.
If you save the value x(t) before you let the time evolute as  xs and x(t) just after the end time of your integration as xn.
Then, xn-xs is the area that you want.

[color=blue][b]A good physics teacher is not the one that students think the teacher is very good in physics.
A good teacher is the one who make students think they can be very good in physics. (students can solve physics problem by themselves.)[/b][/color]

[/quote]

Let me try this first!
If you save the value x(t) before you let the time evolute as  xs and x(t) just after the end time of your integration as xn.
Then, xn-xs is the area that you want.
When i encounter problem, i am ask again :)

[b][color=blue]I do agree on the strength of empowering, enabling, engaging the students...... make them believe in their own abilities/themselves. I know you are using EJS as a pedagogy tool for deep and meaningful learning. That is why i am learning and sharpening my tool![/color][/b]


BTW i figure out the logic of the polygon the simple area of a polygon with 4 vertices
(PT[0],PY1[0])
(PT[1],PY1[1])
(PT[2],PY1[2])
(PT[3],PY1[3]). 
Area = 1/2 ( base)( height) = 1/2 ( PX[3] - PX[0] ) {( PT[2] - PT[3] )+(PT[1] - PT[0])}
not as elegant as the method you mentioned