File Exchange

image thumbnail

Plot Superquadratic Surfaces

version 1.0.0.0 (502 KB) by DGM
This is a pair of functions for plotting general superellipsoids and supertoroids

8 Downloads

Updated 09 Jun 2018

View License

Much like SPHERE(), ELLIPSOID(), or SUPERQUAD(), these functions calculate and return the matrices required to plot a general superellipsoid or supertoroid using MESH() or SURF().
.
Unlike SUPERQUAD(), SUPERELLIPSOID() calculates the general form
with fully independent axis orders. i.e.:
.
((X-Cx) / Rx)^Px + ((Y-Cy) / Ry)^Py + ((Z-Cz) / Rz)^Pz = 1
.
For convenience, both functions accept parameters as vectors or as scalars with implicit expansion.
As with the built-in functions, the number of points can be set.
The default value for N is 50.
.
If no outputs are specified, a new surf plot will be created.
Display axes can be specified if the first argument is an axes handle.
.
A demo file is included (demo file uses subplot_tight from the FEX)

Comments and Ratings (2)

DGM

My apologies, for the omission and my lateness. At the time I'd uploaded this, I was in the habit of excluding FEX dependencies. The function is available here:
https://www.mathworks.com/matlabcentral/fileexchange/30884-controllable-tight-subplot

thanks for yout code.! umm.. there's a missing function named "subplot_tight", however. Could you also provide this function?

Updates

1.0.0.0

added FEX dependency and link to the archive

1.0.0.0

Made dependency note

1.0.0.0

updated description layout

1.0.0.0

updated description

MATLAB Release Compatibility
Created with R2009b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Acknowledgements

Inspired by: Controllable tight subplot