Lens coordinates on a circle

In this simple example, we use lens coordinates to parametrize a finite sample of a circle.

from dreimac import LensCoords, CircleMapUtils, PlotUtils, GeometryExamples, LensMapUtils
X = GeometryExamples.noisy_circle(500)
lc = LensCoords(X, n_landmarks=50)
coords = lc.get_coordinates(perc=0.9, complex_dim=2, cocycle_idx=0)
coords_R3 = LensMapUtils.lens_3D_to_disk_3D(coords, 3)
import matplotlib.pyplot as plt
import numpy as np
colors = CircleMapUtils.to_sinebow(np.array([np.arctan2(*x) for x in X]))

fig = plt.figure()
ax = plt.axes(projection='3d')
_ = ax.scatter3D(coords_R3[:,0], coords_R3[:,1], coords_R3[:,2], s=20, c=colors)