Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #9164

Re: Cool example with ContourPlot+EvaluationMonitor

From "Kevin J. McCann" <kjm@KevinMcCann.com>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: Cool example with ContourPlot+EvaluationMonitor
Date 2012-03-20 07:22 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <jk9b7l$blj$1@smc.vnet.net> (permalink)
References <jk1fpb$4v0$1@smc.vnet.net>

Show all headers | View raw


Another variation on a very cool theme.

f[x_, y_, freeze_] := (Pause[freeze]; x^2 + y^2)
data = {}; freeze = 0.01;
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},
   PlotPoints -> 30,
   EvaluationMonitor :> {AppendTo[data, {x, y}],
     If[Length[data] >= 600, data = Drop[data, 1]]}];

On 3/17/2012 3:51 AM, psycho_dad wrote:
> 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}]];

Back to comp.soft-sys.math.mathematica | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Cool example with ContourPlot+EvaluationMonitor psycho_dad <s.nesseris@gmail.com> - 2012-03-17 07:51 +0000
  Re: Cool example with ContourPlot+EvaluationMonitor Murta <rodrigomurtax@gmail.com> - 2012-03-18 07:50 +0000
  Re: Cool example with ContourPlot+EvaluationMonitor Ralph Dratman <ralph.dratman@gmail.com> - 2012-03-19 10:05 +0000
    Re: Cool example with ContourPlot+EvaluationMonitor psycho_dad <s.nesseris@gmail.com> - 2012-03-20 07:25 +0000
  Re: Cool example with ContourPlot+EvaluationMonitor David Kahle <david.kahle@gmail.com> - 2012-03-20 07:20 +0000
  Re: Cool example with ContourPlot+EvaluationMonitor "Kevin J. McCann" <kjm@KevinMcCann.com> - 2012-03-20 07:22 +0000
    Re: Cool example with ContourPlot+EvaluationMonitor psycho_dad <s.nesseris@gmail.com> - 2012-03-21 10:44 +0000
  Re: Cool example with ContourPlot+EvaluationMonitor "djmpark" <djmpark@comcast.net> - 2012-03-23 06:35 +0000

csiph-web