Message Boards Message Boards

Make a graph with a base surface plot and a rectangular region?


Objective: I am trying to make a a graph consisting of two graphs 1) a base surface plot 2) a rectangular region that represents the Quadratic Approximation at a specific point(x0,y0)

Here is the Code:

  Plot3D[coEfficientOne + (coEfficientTwo*(y - 
        y0)) + (coEfficientThree*(x - x0)*(y - 
        y0)) + (coEfficientFour*(x - x0)^2) + (coEfficientFive*(y - 
         y0)^2) + (coEfficientSix*(x - x0)), {x, x0 - \[Pi]/4, 
    x0 + \[Pi]/4}, {y, y0 - \[Pi]/4, y0 + \[Pi]/4}, PlotStyle -> Blue,
    PlotRange -> All]], {x0, -2 Pi, 2 Pi}, {y0, -2 Pi, 2 Pi}]

NOTES: All the Coefficient variables are the coefficient terms of the Quadratic approximation of a function of two variables. The coefficients are made up of elements of x0 and y0 only

Please Help Thanks!

POSTED BY: Anders Khaykin
24 days ago

Can you specify 'basePlot'

POSTED BY: Michiel van Mens
23 days ago

When the coefficients coEfficientOne etc. are evaluated when the Manipulate is run, the symbols x0 and y0 in the coefficients will be in the Global` context, but the control variables x0 and y0 will be localized in a private context by the Front End. While both appear in the code as x0 and y0, they are actually four different variables. So changing the controls for the localized x0 and y0 will not affect the global x0 and y0 in the coefficients.

It's hard to fix someone's code without having the code. One could try the Manipulate option LocalizeVariables -> False, but that has side effects that may be undesirable.

POSTED BY: Michael Rogers
23 days ago

this is a simple example to ask: is this the style of plot your looking to do? (swokowsi calc. 5th ed p. 880). Let C denote first-octant arc of the curve in which the parabaloid 2z=16-x^2-y^2 and the plane x+y=4 intersect. (describe minima and maxima of C) (note plotting those with Opacity[] would be easier!)

Remove[x, y, z, t, xt, yt, zt, g1, g5];

g1 = Plot3D[
   If[1/2 (16 - x^2 - y^2) > 0, 1/2 (16 - x^2 - y^2), Null], {x, -4, 
    4}, {y, -4, 4}, Mesh -> False, PlotPoints -> 50];

x =.; y =.; z =.; t =.;

xt[t_] := 4 - t;

yt[t_] := t;

zt[t_] := 4 t - t^2;

g5 = ParametricPlot3D[{xt[t], yt[t], zt[t]}, {t, 0, 4}]

Show[g5, g1, ViewPoint -> {1.3 - 1, 2.4, 2.0 - 2.25}, 
 PlotRange -> {{-4, 4}, {-4, 4}, {0, 8}}]

POSTED BY: John Hendrickson
22 days ago

Group Abstract Group Abstract