2D Functions
Function Plot
Parametric Plot
Multiple Parametric Plot
Filled Plot
Multiple Filled Plot
Logarithmic Plot


2D Data Plots
Data Plot
Data Error Plot
Data Logarithmic Plot
Data Labeled Plot


Contour & Density Plots
Contour Plot
Density Plot
Level Curves


3D Functions
3D Function Plot
3D Parametric Plot
3D Multiple Parametric Plot
3D Vector Field
3D Gradient Field
Shadow 3D Function

3D Data Plots
Contour 3D Data Plot
Density 3D Data Plot


Special Plots
Vector Field
Bar Charts
Pie Chart
Zonotope Show


Links
About This Site
Citation & Credits
Sci.Vis. Tutorials
webComputing


Plot of 3D Gradient Fields

Plot the gradient field defined by a scalar function in a specified range. This plot allows the graphical display of vector fields in three dimensions. The vector field can be represented by lines or arrows that can display direction and magnitude.

Enter a function of x, y and z :   " >   

Plot Range for :   " >   <= x <=   " >

Plot Range for :   " >   <= y <=   " >

Plot Range for :   " >   <= y <=   " >

    

   with   Interactive rotation and resizing   

<%Mathlet Needs["Graphics`PlotField3D`"]; %> <%Mathlet MSPBlock[ {$$funcxyz, $$begxx, $$endxx, $$begyy, $$endyy, $$begzz, $$endzz, $$h, $$xRangeBeg,$$xRangeEnd, $$yRangeBeg, $$yRangeEnd, $$zRangeBeg, $$zRangeEnd,(* $$clipFill,*) $$boxFlag, $$box1, $$box2, $$box3, $$xAxeLabel, $$yAxeLabel, $$zAxeLabel, $$xAxeValue, $$yAxeValue, $$zAxeValue, $$plotLabel, $$aspectRatio, $$lightFlag, $$meshFlag, $$imageSize, $$view1, $$view2, $$view3}, fc = {If[MSPValueQ[$$face1],MSPToExpression[$$face1],""], If[MSPValueQ[$$face2],MSPToExpression[$$face2],""], If[MSPValueQ[$$face3],MSPToExpression[$$face3],""], If[MSPValueQ[$$face4],MSPToExpression[$$face4],""], If[MSPValueQ[$$face5],MSPToExpression[$$face5],""], If[MSPValueQ[$$face6],MSPToExpression[$$face6],""]}; result = PlotGradientField3D[$$funcxyz, {x, $$begxx, $$endxx},{y, $$begyy, $$endyy}, {z, $$begzz, $$endzz}, PlotRange->{If[$$xPlotRange === "Specified",{$$xRangeBeg,$$xRangeEnd}, MSPToExpression[$$xPlotRange]], If[$$yPlotRange === "Specified",{$$yRangeBeg,$$yRangeEnd}, MSPToExpression[$$yPlotRange]], If[$$zPlotRange ==="Specified", {$$zRangeBeg,$$zRangeEnd}, MSPToExpression[$$zPlotRange]]}, Boxed->$$boxFlag, BoxRatios->If[$$boxRatios==="Specified", {$$box1,$$box2,$$box3},Automatic], AxesEdge->{If[$$xAxeFlag === "Specified" , $$xAxeValue , MSPToExpression[$$xAxeFlag]], If[$$yAxeFlag === "Specified" , $$yAxeValue , MSPToExpression[$$yAxeFlag]], If[$$zAxeFlag === "Specified" , $$zAxeValue , MSPToExpression[$$zAxeFlag]] }, AxesLabel->{If[$$xAxeLabel === Null, "", ToString[HoldForm[$$xAxeLabel]]], If[$$yAxeLabel === Null, "", ToString[HoldForm[$$yAxeLabel]]], If[$$yAxeLabel === Null, "", ToString[HoldForm[$$zAxeLabel]]]}, FaceGrids->If[$$faceGrids === "Specified", fc, MSPToExpression[$$faceGrids]], ColorFunction->$$h, ImageSize->$$imageSize, PlotLabel-> If[$$plotLabel === Null, "", ToString[HoldForm[$$plotLabel]]], ViewPoint->If[NumberQ[$$view1] && NumberQ[$$view2] && NumberQ[$$view3], {$$view1,$$view2,$$view3},{1.3,-2.4,2.}], AspectRatio->If[$$aspectRatioFlag === "Specified", $$aspectRatio, MSPToExpression[$$aspectRatioFlag]], Lighting->$$lightFlag, Mesh->$$meshFlag (*, ClipFill->$$clipFill *) ]; If[Head[result] === Graphics3D, If[MSPValueQ[$$btnSubmit], MSPShow[result], If[MSPValueQ[$$btnLive], MSPLive3D[result]]]] ] %>

Save as: 

With file name:   " >

<%Mathlet MSPBlock[{$$fname, $$submitButton1}, c = If[$$fname === Null, "", ToString[HoldForm[$$fname]] ]; ftype = Switch[$$opt, "jpg", "JPEG", "tif", "TIFF", "eps", "EPSTIFF", "xbm", "XBitmap", "mps", "MPS", _ , $$opt]; If[ Head[result] === Graphics3D, MSPReturn[DisplayString[result, ftype], "image/"<>ftype , c<>"."<>$$opt] ] ] %>

General options

Plot range: active only in static mode
(All - all points are included, Automatic - outlying points are dropped)

X:  <%Mathlet MSPSetDefault[$$xPlotRange, "Automatic"] %> > Automatic   > All   > Specified   " >  < = x < =  " >

Y:  <%Mathlet MSPSetDefault[$$yPlotRange, "Automatic"] %> > Automatic   > All   > Specified   " >  < = y < =  " >

Z:  <%Mathlet MSPSetDefault[$$zPlotRange, "Automatic"] %> > Automatic   > All   > Specified   " >  < = z < =  " >

<%Mathlet MSPSetDefault[$$boxFlag, "True"] %> Boxed :   > True > False

Box ratios:  <%Mathlet MSPSetDefault[$$boxRatios, "Automatic"] %> > Automatic    > Specified    " > " > " >

AxesEdge :
    Specifies on which edges of the bounding box the axes should be drawn.
<%Mathlet MSPSetDefault[$$xAxeFlag, "Automatic"] %> <%Mathlet MSPSetDefault[$$xAxeValue, "{+1,+1}"] %>     X :   > Automatic > None > Specified :  
<%Mathlet MSPSetDefault[$$yAxeFlag, "Automatic"] %> <%Mathlet MSPSetDefault[$$yAxeValue, "{+1,+1}"] %>     Y :   > Automatic > None > Specified :  
    Z :   <%Mathlet MSPSetDefault[$$zAxeFlag, "Automatic"] %> <%Mathlet MSPSetDefault[$$zAxeValue, "{+1,+1}"] %> > Automatic > None > Specified :  

    axe1->axe2,  where axe1, axe2 = x, y, z,   states that the axe will be drawn between axe1 and axe2.
    The sign before axe1 and axe2 specifies whether the axe will be drawn on the edge of the box
    with a larger or smaller value of axe1 and axe2 respectively.


Axes label: active only in static mode

x label:  " >  y label:  " >  z label:  " > 

<%Mathlet MSPSetDefault[$$meshFlag, "True"] %> Mesh :   > True > False

<%Mathlet MSPSetDefault[$$lightFlag, "True"] %> Lighting :  active only in static mode   > True > False

Plot color :  <%Mathlet MSPSetDefault[$$h, "None"] %> > True > False

Image Size:  " >    specifies the absolute size of an image to render

Plot label:  active only in static mode   " >

Face grids: active only in static mode   <%Mathlet MSPSetDefault[$$faceGrids, "None"] %> > All    > None    > Specified:

> Right YZ plane    > Left YZ plane    > Back XZ plane    > Front XZ plane    > Up XY plane    > Down XY plane   

View point:  gives the position of the view point relative to the center of the three-dimensional box that contains the object being plotted. The view point is given in a special scaled coordinate system in which the longest side of the bounding box has length 1. The center of the bounding box is taken to have coordinates {0, 0, 0}.

x :  " > y :  " > z :  " >

Aspect ratio:  active only in static mode
<%Mathlet MSPSetDefault[$$aspectRatioFlag, "Automatic"] %> > Default > Automatic > Specified :  " >

Setting the AspectRatio option changes the whole shape of your plot. AspectRatio gives the ratio of height to width.
Its default value is the inverse of the Golden Ratio - supposedly the most pleasing shape for a rectangle.
Automatic determines the shape of the display area from the original coordinate system.



     
© 2004 webComputing,   Scientific Visualization