Pre-amble OK, I'm fairly new to Mathematica. I've covered things like integration, partial differentiation, and plotting basic graphs. I'm now moving into Metric Spaces. I've had a search around for a guide/handout/book for plotting open/closed balls and spheres without any success. I have managed very basic plots with the help or one or two posts here - thanks for that - but here are some examples of what I'm hoping to be able to do.
Question Using Mathematica Desktop, how can I plot open Bd((0,0),1), closed Bd[(0,0),1] balls and spheres Sd((0,0),1) for metrics such as:
d((x1,x2),(y1,y2)) = |y1 - x1| + 3|y2 - x2|
d((x1,x2),(y1,y2)) = 4|y1 - x1| + d0(x2,y2)
If you've covered metric spaces, you'll know that an open ball doesn't include the points at the outermost edges (hence it should have a dotted line); a closed ball includes the points at the outermost edges (hence a solid line); and a sphere is just the points at the outermost edges. These are not just drawing a Ball or Sphere using {x,y,z}.
This post has some good information on plotting open balls but I'd appreciate some help with how to define the metrics shown above then plotting the associated balls. Plotting open balls for the given metric spaces
Thanks for any help you can give
RegionPlotorContourPlot. For open balls, just set the style of the boundary lines toNone. $\endgroup$f = Function[{x, y}, 4 Abs[Indexed[x, 1] - Indexed[y, 1]] + Unitize[Indexed[x, 2] - Indexed[y, 2]]], wouldn't it? The balls are indeed not easy to plot. For radius $<1$, the closed balls are horizontal line segments; you could draw the with theLineprimitive. For radius $\geq 1$ the closed ball would be the region between two vertical lines, the lines included. You could use the primitiveRectangleto visualize thoses. $\endgroup$