I have an exam in vector analysis soon, and it happens quite often we're supposed to parametrize the surface of as solid. Is there a way to get maple to plot the solid so it's simpler to visualize the current situation?
Suppose for example that E is the solid defined by x^2+y^2+z^2=< 4*a^2 and x^2+y^2=>a^2 with a some constant and =< means less than or equal to and => means greater than or equal to. Suppose S is the boundary-surface of E. How do I plot S in the easiest way? It's for use for an exam so time is precious.
implicitplot3d
Take a look at the help files for implicitplot3d and see if that will do what you are looking for.
>?implicitplot3d
>restart:
>a:=4:
>with(plots):
>implicitplot3d(x^2+y^2+z^2>=a^2, x=-4..4, y=-4..4,z=-4..4);
After it plots, you can click on the plot and rotate it. You can change the "a" value and see what happens and alter the range values for x,y, and z as well.
Regards,
Georgios Kokovidis
Dräger Medical
Spherical coordinates
Maybe you know this (if so, just disregard this post), but whenever you see something like
x^2 + y^2 + z^2you should think of spherical coordinates(r,theta,phi), in which the Cartesian coordinates(x,y,z)may be parametrized asThey have the pleasant property
> simplify(x(r,theta,phi)^2 + y(r,theta,phi)^2 + z(r,theta,phi)^2); 2 rfrom which it follows that the surface
Sof the example you give can be parametrized asThanks for the comments. I
Thanks for the comments.
I will take a look at he implicitplot3d and see if it's any help.
I know about spherical coordinates, but thank you anyway :) I usually find it more convenient to change to cylindrical coordinates though. You always have trouble describing points on the z-axis in spherical coordinates, though I admit it has it uses from time to time.
Hmm it seems I somehow
Hmm it seems I somehow messed up my original post. Maybe it was because I tried to use the symbols "less than or equal to" (seems the forum messed that up). As I read it again now I can see I wasn't specific enough. The problem is I usually have 2 constraints:
x^2+y^2+z^2 (less than or equal to) 4a^2 and x^2+y^2 (greater than or equal to) a^2. (it is a sphere with a cylindrical hole through it). Any way to easily plot the surface of this solid?
EDIT: Ok it seems the forum doesn't like me typing "less than or equal to" symbols
Less than strikes again
In order to avoid that the browser interpretes < and > as the beginning and end of an HTML-tag, write them as < and >.
Ah yes, that seems to solve
Ah yes, that seems to solve the problem. Thank you
Sphere with cylindrical hole
Parametrize the sphere, using spherical coordinates:
Parametrize the cylinder, using cylindrical coordinates:
Plot them as follows, using some specific, but otherwise arbitrary, value for
a:Same solution, using plot3d,coords
Here is the same solution using the builtin coordinate support in plot3d:
Note that my usage of theta and phi are different from those used in the previous post. In my experience, it is much more common to use theta for the angle with the postive x-axis and phi for the angle with the positive z-axis.
Doug
Common for whom?
It seems that what is common is not common. In particular, your current convention is quite uncommon for me.
It is not clear for me either, which is the divide.
After this article in Wikipedia, that is the northamerican (ie US) convention, and the rest of the world uses the other one.
On the other hand, Robert Israel in this thread argues that:
.
I cannot say about mathematicians, but in regards to physicists I have the same impression (textbooks and papers that I can check right now seem to show that).
Illuminating links
Thanks for those illuminating links.
Spherical coordinates
Thanks for making me aware of that important simplification, which, I suppose, I would have known myself if only I would learn to carefully read the associated help pages.
However, your choice of
thetaandphidisagrees with the choice made in Maple itself, see?spherical_coordinates.Maple is largely inconsistent
Maple is largely inconsistent in this regard. Consider just a few examples:
in ?coords:
in ?VectorCalculus,Coordinates:
in ?plot3d[coords]
in ?Physics:-Vectors:
plus ?Physics:-Vectors:-ChangeBasis:
in ?SphericalY
in ?definition,sphericalcoordinates
For me, user friendliness means consistency throughout the whole system, much more than fancy GUI toys.
Seconded
I also prefer consistency throughout the system above any nifty GUI's, especially if some of these GUI's make original behaviour noisy. Here, of course, I refer to the introduction of the 2D math notation which, if I have not fundamentally misunderstood something, relies heavily on XML coding, the result, unfortunately, being that something as trivial as tabbing, compare my earlier complaints, does not work consistently anymore.