f1 := ode({m*x''(t) + R*x'(t) + k*x(t), x(0) = 0, x'(0) = 1}, x(t)):
f2 := subs(f1, m = 10 , R = 1 , k = 10):
f3 := solve(f2):
line := plot::Line3d([0, 0, 0.1],[f3[1]+1, 0, 0.1], t= 0..50, LineWidth = 1,
LineColor = RGB::Black):
surf := plot::Surface([u, v, 0], u = 0..2 , v = -1..1 , FillColorDirectionX = 1 ):
box := plot::Box([f3[1]+0.75, -0.25, 0], [f3[1]+1.25, 0.25,0.2], t = 0..50,
FillColor = RGB::Grey.[0.2]):
plot(plot::CoordinateSystem3d(line, surf, box, ViewingBoxZMin = 0, ViewingBoxZMax = 0.5,
ViewingBoxYMin = -1, ViewingBoxYMax = 1, ViewingBoxXMin = 0, ViewingBoxXMax = 2),
GridVisible = TRUE, GridLineStyle = Dashed );
