Student Support Forum
-----
Student Support Forum: 'Conversion 5->6 help' topicStudent Support Forum > General > Archives > "Conversion 5->6 help"

< Previous Comment | Next Comment >Help | Reply To Comment | Reply To Topic | Post New Topic
Author Comment/Response
Forum Moderator
email me
07/06/08 06:43am

The best source for this would be the author:

http://www.wolfram.com/services/training/wagon.html

I fiddled with a V6 Animate example and by trial and error came up with:

cycloid[t_] := {t - Sin[t], 1 - Cos[t]};

frames = 30;

locus = Table[cycloid[t], {t, 0, 2 \[Pi], 2 \[Pi]/(frames - 1)}];

Animate[t = i 2 \[Pi]/(frames - 1);
Graphics[{GrayLevel[0.5], Disk[{t, 1}, 1], Circle[{t, 1}, 1],
GrayLevel[0], Line[{{-1, 0}, {7, 0}}], AbsoluteThickness[2],
Line[{{t, 1}, {t - Sin[t], 1 - Cos[t]}}], AbsolutePointSize[3],
Table[Point[locus[[j]]], {j, 1, i + 1}]},
PlotRange -> {{-2, 10}, {-2, 2}}, ImageSize -> {Large, Tiny}], {i,
0, frames - 1}, AnimationRunning -> False]

The answer to the questions like "Why was this code put in that place? Why was this part changed in that particular way? ..." and so on are all the same .... "Because it worked!" I suggest you work with the example (and other examples you want to convert) and make small changes to see what works and what does not. Making sure that you know what each part of the code is meant to do will help as well. Evaluating pieces of the code can help with that process. The author of the original code (Stan Wagon in this case) will probably be the best source.

Tom Zeller

URL: ,

Subject (listing for 'Conversion 5->6 help')
Author Date Posted
Conversion 5->6 help Giulia 07/03/08 4:13pm
Re: Conversion 5->6 help Forum Modera... 07/06/08 06:43am
Re: Conversion 5->6 help Giulia 07/07/08 09:36am
< Previous Comment | Next Comment >Help | Reply To Comment | Reply To Topic | Post New Topic





 © 2008 Wolfram Research, Inc.  Terms of Use  Privacy Policy |
Sign up for our newsletter: