Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #16388
| From | Jenhow <jenh0w@hotmail.com> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Plot in manipulate |
| Date | 2014-01-08 08:41 +0000 |
| Message-ID | <laj306$do5$1@smc.vnet.net> (permalink) |
| Organization | Time-Warner Telecom |
How do I add a plot that would be manipulated by the variables in the following code?
Manipulate[
TT = (initialvelocity + Sqrt[initialvelocity^2 + 2 gravity height])/
gravity;
Potential =
gravity*(-.5 gravity time^2 + initialvelocity time + height)*mass;
Kinetic = (.5 mass (((-gravity)*time) + initialvelocity)^2);
If[time > TT, time = TT];
Graphics
[{
Blue, Line[
Table[{tt, -.5 gravity tt^2 + initialvelocity tt + height}, {tt,
0, TT, .01}]],
RGBColor[.49, 0, 0],
Disk[{time, -.5 gravity time^2 + initialvelocity time + height},
5 mass], RGBColor[.25, .43, .82],
}],
{{time, .0, "Time"}, 0.000,
Round[Dynamic[ (initialvelocity + Sqrt[
initialvelocity^2 + 2 gravity height])/gravity ], 10.^-3], .01,
Appearance -> "Labeled", ControlPlacement -> Top},
{{mass, .07, "Mass"}, .001, .1, .001, ImageSize -> Tiny,
Appearance -> "Labeled"},
{{gravity, 9.8, "Gravity"}, 1, 20, .01, ImageSize -> Tiny,
Appearance -> "Labeled"},
{{initialvelocity, 5., "Initial Velocity"}, 0, 5, .01,
ImageSize -> Tiny, Appearance -> "Labeled"},
{{height, 5., "Height"}, 0, 10, .01, ImageSize -> Tiny,
Appearance -> "Labeled"},
ControlPlacement -> Left, TrackedSymbols -> True]
Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread
Plot in manipulate Jenhow <jenh0w@hotmail.com> - 2014-01-08 08:41 +0000
csiph-web