Source worksheet: circles.mw

 

Some "Unit Circles" in different metrics... 

 

Select EditExecuteWorksheet to display results. 

 

`^`(real, n) can be equipped with many different metrics. Each of these yields the same topology, but their geometries are quite different from each other. 

Suppose that x = (x[1], x[2], () .. (), x[n]) and y = (y[1], y[2], () .. (), y[n]) belong to `^`(real, n). Then for p = 1, 2, () .. () we have is the p-metric for `^`(real, n). If you take the limit as proc (p) options operator, arrow; infinity end proc, you will get `and`(d[infinity](x, y) = limit(d[p](x, y), p = infinity), limit(d[p](x, y), p = infinity) = `*`(max[`and`(`<=`(1, i), `<=`(i, n))], `*`(abs(`+`(x[i], `-`(y[i]))))))  the ∞-metric. 

 

The first two of these metrics have special names. p = 1 is the taxi-cab metric (distances are sums of differences of coordinates - like having to travel down perpendicular streets). p = 2 is the familiar Euclidean metric (our usual distance formula). It turns out that the topologies generated by all of these metrics yield the same topology.  

 

In the sheet below I generate plots of the set the unit circle/sphere centered at the origin. The first pair of plots deals with `*`(`^`(real, 2)) and p = 1, 2, () .. (), 10, infinity. The second pair of plots deal with `*`(`^`(real, 3)) and p = 1, 2, () .. (), 10, infinity. 

 

> restart; with(plots):
 

 

Unit circles... 

 

> circle := p -> (abs(x)^p+abs(y)^p)^(1/p)=1: circle(p);
 

`^`(`+`(`^`(abs(x), p), `^`(abs(y), p)), `/`(1, `*`(p))) = 1 (1)
 

> for k from 1 to 10 do  cPlot[k] := implicitplot(circle(k),x=-1.1..1.1,y=-1.1..1.1,numpoints=5000,title=k): end do: cPlot[11] := implicitplot(max(abs(x),abs(y))=1,x=-1.1..1.1,y=-1.1..1.1,numpoints=5000,title=infinity):
 

> display(seq(cPlot[k],k=1..11),insequence=true);
 

Plot_2d
 

> display(seq(cPlot[k],k=1..11),title="1,2,...,10,infinity");
 

Plot_2d
 

 

Unit spheres... 

 

> sphere := p -> (abs(x)^p+abs(y)^p+abs(z)^p)^(1/p)=1:
sphere(p);
 

`^`(`+`(`^`(abs(x), p), `^`(abs(y), p), `^`(abs(z), p)), `/`(1, `*`(p))) = 1 (2)
 

> for k from 1 to 10 do
 sPlot[k] := implicitplot3d(sphere(k),x=-1.1..1.1,y=-1.1..1.1,z=-1.1..1.1,numpoints=15000,title=k,style=surface):
end do: sPlot[11] := implicitplot3d(sphere(1000),x=-1.1..1.1,y=-1.1..1.1,z=-1.1..1.1,numpoints=15000,title=infinity,style=surface):
 

> display(seq(sPlot[k],k=1..11),insequence=true);
 

Plot_2d
 

>