0
|
7028 Views
|
|
0 Total Likes
View groups...
Share
GROUPS:

# Animating a racecar go around the track

Posted 11 years ago
 I am have a lot of difficult with the problem.  I have a picture of a race car superimposed on a picture of a cicular racetrack, the point of this is the use the animate command to make the racecar go around the track.  I've been experimenting all day with how to go about this using map, table, and animate commands and I can't get a meaningful output.  The first part shows the portion given.  The next section is mine.  I really don't know what to do.  It seems like I should use the map command to pair the command ofthe picture of the track with an equation that I can I can increment using a table command.  Nothing I do works!
Sort By:
Posted 11 years ago
 Dear Megan,we tried your code, but when we pasted it in Mathemtica it broke and did not work. It also contained mixed pieces of text and generally was very large and very hard to work with. Our advice is is to come up with a smaller simpler self-sufficient working code that pinpoints your issue. If you have a few issues - you can ask a few different questions. Also please take a look at the Wolfram Demonstrations Project for many example of working animations. The source code is available for download there and you can adopt it to your own problem. There are many demonstrations there that you can look at. For instance:Frictional Force on a Car in a Turn Manipulate[  Grid[{{Graphics[{Gray, Disk[{0, 0}, r + 7, {-\[Pi]/4, \[Pi]/4}],        RGBColor[.6, .73, .36], Disk[{0, 0}, r, {-\[Pi]/4, \[Pi]/4}],        RGBColor[.49, 0, 0],        Rotate[{Polygon[{{r + .5, -2}, {r + .5, 2}, {r + 2.5,             2}, {r + 2.5, -2}}], Yellow,          Disk[{r + .7, 2}, .1, {0, \[Pi]}],          Disk[{r + 2.3, 2}, .1, {0, \[Pi]}],          Disk[{r + .7, -2}, .1, {\[Pi], 2 \[Pi]}],         Disk[{r + 2.3, -2}, .1, {\[Pi], 2 \[Pi]}], Gray,         Polygon[{{r + .75, .55}, {r + .55, .85}, {r + 2.4, .85}, {r +             2.2, .55}}],         Polygon[{{r + .75, -.55}, {r + .55, -.85}, {r +             2.4, -.85}, {r + 2.2, -.55}}],         Polygon[{{r + .55, -.7}, {r + .55, .7}, {r + .75, .45}, {r + \.75, -.45}}],         Polygon[{{r + 2.4, -.7}, {r + 2.4, .7}, {r + 2.2, .45}, {r +             2.2, -.45}}], Blue, Arrow[{{0, 0}, {r + 1.5, 0}}],         Text[Style["r", 18, Italic], {r - 1, .5}],         Arrow[{{r + 1.5, 0}, {r + 1.5, 1.5}}],         Arrow[{{r + 2.5, 0}, {r + 1.5, 0}}], White,         Text[Style["v", 18, Italic], {r + 1.5, 1.75}], Black,         Text[         Style["\!$$\*SubscriptBox[\(f$$, $$s$$]\)", 18,           Italic], {r + 3, 0}]}, \[Theta], {0, 0}]},      PlotRange -> {{r - 4, r + 8}, {-8, 8}}, Background -> LightGray,      ImageSize -> 300], Spacer[5],     Text@Style[      Column[{"centripetal acceleration:",         Row[{NumberForm[( 10/36. v)^2/r, {3, 2}],           " m/\!$$\*SuperscriptBox[\(s$$, $$2$$]\)"}],        "", "force needed:",         Row[{NumberForm[(m  10/36. v)^2/r, {3, 2}], " N "}], "",         "minimal static friction\ncoefficient:",         NumberForm[m (10/36. v)^2/(9.81 m r), {3, 2}]}, Spacings -> 2,        Alignment -> Center], 14, Purple, Bold]}}], {{r, 50}, 20, 100,   Appearance -> "Labeled"}, {{\[Theta], -.04}, -ArcSin[6/r] ,   ArcSin[6/r], Appearance -> "Labeled" }, {{v, 60}, 35, 120,   Appearance -> "Labeled"}, {{m, 1050}, 850, 1200, Appearance -> "Labeled"}]
Community posts can be styled and formatted using the Markdown syntax.