Group Abstract Group Abstract

Message Boards Message Boards

0
|
37 Views
|
2 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Some help with my projectile motion pseudocode algorithim please?

Posted 13 hours ago

I cannot get my parabola to form a complete arc, I believe there is an issue with how i have laid out my code and if possible could somone direct me on how to get the graph to update as the cooridanates come in?

POSTED BY: Charles Wallen
2 Replies

I would increase the time, for example

time = 22;

and then cut off the excess plot below the x axis using PlotRange:

Show[m, b, PlotRange -> {0, Max[dataset[[All, 2]]] + 5}, 
 PlotRangePadding -> None]

You can build your dataset with Table, instead of For:

dataset = Table[{ux*t, (uy*t) + (1/2*a*t^2)},
  {t, 0, 21}]
POSTED BY: Gianluca Gorni
Posted 10 hours ago

I used gemini 3.6 flash, hope this helps.

"By wrapping ListLinePlot inside Dynamic[ListLinePlot[dataset, ...]] above the loop, you tell Mathematica:

" "Watch the variable dataset. Every single time AppendTo[dataset, {x, y}] adds a new point inside the loop, redraw this plot instantly on screen." "

POSTED BY: William Hedlin
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard