11.07.2015 Views

webMathematica™ Wolfram - Wolfram Research

webMathematica™ Wolfram - Wolfram Research

webMathematica™ Wolfram - Wolfram Research

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

webMathematica User Guide 109Live 3D PlottingConvexHull ComputationConvexHull ComputationNeeds["ComputationalGeometry`"]; ConvexHull[ {{1,5},{4,1},{10,2},{5,4}}]Notice how the evaluate tag uses Needs to load the package. An alternative, but less desirable,way to load a package is with Get. This is much less efficient since the package will be loadedeach time the page is loaded. When Needs is used, the package is only loaded the first time.An important detail is that one tag loads the package and another uses a function from thepackage. A tag that loads a package should not use functions that come from the package. Ifthis happens, a shadowing symbol is created, which will mask the function you wish to use.When a shadowing symbol is created, a warning message is issued; the text of messages canbe obtained with MSPGetMessages. It will also be displayed in the log files if verbose logging isenabled. The sections on Logging and The Kernel Monitor discuss verbose logging and log files.Sometimes, it is inconvenient to use two tags, and in this case you should use the fully qualifiedname for a function. This is shown in the following example.Needs["ComputationalGeometry`"];ComputationalGeometry`ConvexHull[ {{1,5},{4,1},{10,2},{5,4}}]

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!