| Author |
Comment/Response |
jkarges
|
12/29/11 7:30pm
Hi,
I'm working on a project where I need to plot the trajectory of the center of a rolling disk. I've solved for the necessary InterpolatingFunctions of the 5 generalized coordinates using NDSolve, and these plot nicely using the Plot[] function, but when I try to combine the x,y, and z coordinates in a ParametricPlot3D, the plot turns up blank. Here's a sample of my code:
nhsol = NDSolve[
Join[{nhEOM1 == 0, nhEOM2 == 0, nhEOM3 == 0,
D[C1[[1]].{q1'[t], q2'[t], q3'[t], q4'[t], q5'[t]}, t] == 0,
D[C1[[2]].{q1'[t], q2'[t], q3'[t], q4'[t], q5'[t]}, t] == 0},
inits1] /. params, {q1[t], q2[t], q3[t], q4[t], q5[t]}, {t, 3}]
(*Working singular dimension plots:*)
Plot[(-aPc[[1]] /. params) /. nhsol, {t, 0, 3}]
Plot[(aPc[[2]] /. params) /. nhsol, {t, 0, 3}]
Plot[(aPc[[3]] /. params) /. nhsol, {t, 0, 3}]
(*Non-working Parametric Plot:*)
ParametricPlot3D[{(-aPc[[1]] /. params) /.
nhsol, (aPc[[2]] /. params) /. nhsol, (aPc[[3]] /. params) /.
nhsol}, {t, 0, 3}]
Attachment: Project3.nb, URL: , |
|