       Re: Cool example with ContourPlot+EvaluationMonitor

• To: mathgroup at smc.vnet.net
• Subject: [mg125579] Re: Cool example with ContourPlot+EvaluationMonitor
• From: Ralph Dratman <ralph.dratman at gmail.com>
• Date: Mon, 19 Mar 2012 05:01:07 -0500 (EST)
• Delivered-to: l-mathgroup@mail-archive0.wolfram.com
• References: <jk1fpb\$4v0\$1@smc.vnet.net>

```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!
>
>

```

• Prev by Date: Re: Export Data and Decimal Separator
• Next by Date: Re: Eigenvalues, eigenvectors, matrix ranks, determinants, and all that stuff
• Previous by thread: Re: Cool example with ContourPlot+EvaluationMonitor
• Next by thread: Re: Cool example with ContourPlot+EvaluationMonitor