Re: Cool example with ContourPlot+EvaluationMonitor
- To: mathgroup at smc.vnet.net
- Subject: [mg125584] Re: Cool example with ContourPlot+EvaluationMonitor
- From: David Kahle <david.kahle at gmail.com>
- Date: Tue, 20 Mar 2012 02:19:29 -0500 (EST)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- References: <jk1fpb$4v0$1@smc.vnet.net> <201203191001.FAA01040@smc.vnet.net>
Yea, really nice work. Adding to Ralph's question - is there a particular method that Mathematica (predominantly) follows for this? Can you refer me to a good source? (Text, paper, etc?) Cheers david. On Mar 19, 2012, at 5:01 AM, Ralph Dratman wrote: > Could one of you please explain a little more? I think I get the > general idea about putting together the plot of an implicit function > by a sort of scanning process, but I don't understand the details. > Thank you. > > Ralph > > On Sun, Mar 18, 2012 at 3:43 AM, Murta <rodrigomurtax at gmail.com> wrote: >> Nice!.. I played with the code and made it shorter. >> It's the same thing. >> >> Dynamic[ >> ListPlot[data, Frame -> True, AspectRatio -> 1, PlotStyle -> Blue, >> PlotRange -> {{-1.6, 1.6}, {-1.6, 1.6}}, Epilog -> Circle[{0, 0}]]] >> data = {}; freeze = 0.01 >> >> ContourPlot[x^2 + y^2 == 1, {x, -1.5, 1.5}, {y, -1.5, 1.5}, >> EvaluationMonitor :> (AppendTo[data, {x, y}]; Pause[freeze])] >> >> []'s >> Murta >> On Mar 17, 4:51 am, psycho_dad <s.nesse... at gmail.com> wrote: >>> The following example shows in real-time (sort of) how ContourPlot calculates a contour (in this example a unit circle): >>> >>> f[x_, y_, freeze_] := (Pause[freeze]; (x^2 + y^2)) >>> data = {}; freeze = 0.04; >>> Dynamic[ListPlot[data, Frame -> True, AspectRatio -> 1, >>> PlotStyle -> Blue, PlotRange -> {{-1.6, 1.6}, {-1.6, 1.6}}, >>> Epilog -> Circle[{0, 0}]]] >>> ContourPlot[f[x, y, freeze] == 1, {x, -1.5, 1.5}, {y, -1.5, 1.5}, >>> EvaluationMonitor :> AppendTo[data, {x, y}]]; >>> >>> Initially I just wanted to get all the points from ContourPlot, but then it dawned on me that using Dynamic I could do that in real time! I hope you like it :D >>> >>> Cheers >>> >>> PS Change the parameter freeze (set to 0.04 secs) to make the animation slower or faster. >>> PPS This is so cool, I just knew I had to share it! >> >> >
- References:
- Re: Cool example with ContourPlot+EvaluationMonitor
- From: Ralph Dratman <ralph.dratman@gmail.com>
- Re: Cool example with ContourPlot+EvaluationMonitor