Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2014

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Plot in manipulate

  • To: mathgroup at smc.vnet.net
  • Subject: [mg132174] Re: Plot in manipulate
  • From: Alexei Boulbitch <Alexei.Boulbitch at iee.lu>
  • Date: Thu, 9 Jan 2014 03:51:45 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • Delivered-to: l-mathgroup@wolfram.com
  • Delivered-to: mathgroup-outx@smc.vnet.net
  • Delivered-to: mathgroup-newsendx@smc.vnet.net

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]


It depends on what do you wish to achieve, which is not clear from your question. If your aim is to get the plot (plotting what?) left, or right of your already existing image, use Row[],
If you need to have the plot and the image superimposed, use Show[].

If you are after something else, explain it more precisely.

Have fun.

Alexei BOULBITCH, Dr., habil.
IEE S.A.
ZAE Weiergewan,
11, rue Edmond Reuter,
L-5326 Contern, LUXEMBOURG

Office phone :  +352-2454-2566
Office fax:       +352-2454-3566
mobile phone:  +49 151 52 40 66 44

e-mail: alexei.boulbitch at iee.lu<mailto:alexei.boulbitch at iee.lu>




  • Prev by Date: Re: Avoid iteration in pattern test?
  • Next by Date: Mathematia and (NAIF)-Spice?
  • Previous by thread: Re: Plot in manipulate
  • Next by thread: Elasticity functions for Bezier and rectangular forms