Here is a method for the circle in 2D.
def CreateCircleArray(radius=1):
theta = np.linspace(0, 2*np.pi, 50)
x = radius * np.cos(theta)
y = radius * np.sin(theta)
return np.array([x, y]).T
def PlotArray(array):
ax = plt.subplot(111, aspect="equal")
ax.scatter(array[:, 0], array[:, 1], color="k")
plt.show()
PlotArray(CreateCircleArray())
Going to 3D is a case of extending the function to include the azimuthal angle allowing you to return x, y, z
and hence scatter plot in 3D.
Past that you will need to write a function that generates the Cartesian coordinates of the n-sphere. There is an SO post that is related but I am unsure how useful it will be.
For other shapes you will need to think about what coordinate system is appropriate, for instance defining a square in this way is difficult if its edges are parallel to the axis.
Good luck