Re: realtime plotting of points
- To: mathgroup at smc.vnet.net
- Subject: [mg35794] Re: realtime plotting of points
- From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
- Date: Thu, 1 Aug 2002 04:35:01 -0400 (EDT)
- Organization: Universitaet Leipzig
- References: <ai7ss5$fi6$1@smc.vnet.net>
- Reply-to: kuska at informatik.uni-leipzig.de
- Sender: owner-wri-mathgroup at wolfram.com
Hi, ok, it is not perfect but what is with DynamicFrame[t_Integer, range_] := Module[{arg, gr}, arg = 2Pi*t/18; gr = Graphics[{{Hue[Mod[t/18, 1]], AbsolutePointSize[8.0], Point[{Cos[arg], Sin[arg]}]}, Line[{{0, 0}, {Cos[arg], Sin[arg]}}]}, PlotRange -> range, AspectRatio -> Automatic]; DisplayString[gr] ] and nb = NotebookCreate[]; Do[ NotebookFind[nb, "MyAnimationFrame", Previous, CellTags]; NotebookDelete[nb]; NotebookWrite[nb, Cell[GraphicsData["PostScript", DynamicFrame[i, {{-1.5, 1.5}, {-1.5, 1.5}}] ] , "Graphics", CellTags -> "MyAnimationFrame"] ], {i, 18}] Regards Jens aatish wrote: > > Hi > I was wondering whether there's a way to provide mathematica with x > and y coordinates of a point from a c++ program (with mathlink or > otherwise) and have it graph it out point by point, perhaps even > erasing the previous image as it goes along. For example, if the > correct points are supplied as output, can mathematica show me the > movement of a planet in its orbit or SHM, etc. (whatever the code is > meant to generate). Currently I output the points to a file in the > ListPlot form, but then I just get the orbit drawn out instead of the > particle moving along it. I've been searching for an answer on google > groups, but I read somewhere that realtime plotting of points can't be > done on mathematica. is this true? and if it can than how? > Any help would be greatly appreciated > regards > aatish > aatish at mac.com