Plotting a Spiked Sphere

190 Views Asked by At

My goal is to plot a 3D spiked sphere similar to

enter image description here

I would like to realise this hypersurface in $\mathbb{R}^3$ as $$\{f(z)z : z \in S^2\},$$ where $f \in C^\infty(S^2)$ is a suitable smooth radial function on the sphere $S^2$. Has someone an idea how to do this? Of course one can do such spikes individually, but this gets quite messy. I tried something similar to here, but this does not really work. The spikes do not have to be as regular as in the picture above. Some randomness of sizes would be nice as well as the location.

Update: Thanks to the nice suggestion of @achillehui, I could generate the following plot

spiked sphere

2

There are 2 best solutions below

0
On

Although it uses slightly different coordinates than what you are looking for, the following is based off an example in Wolfram reference’s ParametricPlot3d:

$$(\sin(u)\sin(v)+a\,f(u,v),\cos(u)\sin(v)+b\,g(u,v),\cos(v)+c\,h(u,v))$$

where $a,b,c\approx 0$ and $f,g,h$ look “spiky” or “rough”. It works since a sphere is $(\sin(u)\sin(v),\cos(u)\sin(v),\cos(v))$ and adding $a\,f(u,v),b\,g(u,v),c\,h(u,v)$ styles the surface. Using $a=b=0.05,f=\tan(20v),g=\tan(20u),h=0$ gives:

enter image description here

Alternatively, $a=b=c=-0.05,f=g=h=\sin(20u)\cos(20 v)$ gives:

enter image description here

0
On

Notice most points are surrounded by six other points, but every so often one is surrounded by five. Those are the twelve vertices of an icosohedron.
Between three of those vertices are fifteen points arranged in a triangle.
Once you have the set of points, the height f(u,v) is a function of the distance to the closest point.