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


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

Re: Any way to get gradient lines as well as contour lines?

From Bob Hanlon <hanlonr357@gmail.com>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: Any way to get gradient lines as well as contour lines?
Date 2013-02-04 01:19 +0000
Message-ID <ken2b6$7eo$1@smc.vnet.net> (permalink)
References <20130203074823.CADA568AF@smc.vnet.net>
Organization Time-Warner Telecom

Show all headers | View raw


Grad[Sin[x + y^2], {x, y}]

{Cos[x + y^2], 2*y*Cos[x + y^2]}

Plot3D[Sin[x + y^2], {x, -Pi, Pi}, {y, -2, 2},
 MeshFunctions -> {
   Cos[#1 + #2^2] &,
   2 #2 Cos[#1 + #2^2] &},
 Mesh -> {10, 20},
 PlotPoints -> 35]


Bob Hanlon


On Sun, Feb 3, 2013 at 2:48 AM, Chris Young <cy56@comcast.net> wrote:
> I'd like to be able to plot "gradient lines", i.e., lines of steepest
> descent, on plots of functions of x and y, f(x, y). The contour lines
> can be obtained via MeshFunctions, as in
>
> Plot3D[Sin[x + y^2], {x, -3, 3}, {y, -2, 2}, MeshFunctions -> {#3 &},
> Mesh -> 5].
>
> I'd like all the lines at right angles to these contours.
>
> There must be some way to use the gradient function and then integrate
> to the get the gradient lines.
>
> Maybe this is difficult to do, in general. Also, maybe in general the
> "gradient lines" wouldn't be continuous.
>
> But I wonder if it could be done for some simple examples.
>
> Any suggestions appreciated.
>
> Chris Young
> cy56@comcast.net
>
>

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


Thread

Re: Any way to get gradient lines as well as contour lines? Bob Hanlon <hanlonr357@gmail.com> - 2013-02-04 01:19 +0000

csiph-web