Re: Using Nearest on a group of points
- To: mathgroup at smc.vnet.net
- Subject: [mg117596] Re: Using Nearest on a group of points
- From: Peter Pein <petsie at dordos.net>
- Date: Thu, 24 Mar 2011 06:27:39 -0500 (EST)
- References: <im9sk8$g5j$1@smc.vnet.net> <imc952$1ke$1@smc.vnet.net>
Am 23.03.2011 08:57, schrieb Martin VavpotiÄ?: > Actually, I already found the solution. > > Now I'm interested in making a line graph with a dot showing the > current state on the line. For instance: I plot a sinus line, then > make a dot where sin(x) is, with x travelling from 0 to 2PI so it > appears as if the dot is sliding across the line. > > When that's done I wish to merge this graph with an already existing > animation so they have one slider. > the dot can be done with: Manipulate[Block[{spl=Plot[Sin[x],{x,0,2Pi}]}, Show[spl,Graphics[{Red,PointSize[.02],Point[{x0,Sin[x0]}]}]]], {x0,0,2Pi}] and I didn't try out, but I guess the Animation should depend on x0 too and reside inside the Show[]. Peter