OK, let's create a simple closed curve
C0 = ContourPlot[x^2/4 + y^2/9 == 1, {x, -5, 5}, {y, -5, 5}];
and let's plot the corresponding points
data = C0[[1, 1]];
S0 = ListPlot[{data}]
Now I want to be able to create a new list, data2
containing N
points of the curve. These N
points should not be random but have equal distances from each other. Any suggestions?
Two important notes:
(1). The above ellipse is just a simple scenario. The real data file corresponds to a closed curve with unknown implicit function. So, the suggested solution should not take into account the particular function. Only data
is known.
(2). If we assume that data
contains N0
points (on our example N0 = 200
) the solution should also work for N > N0
.
A good starting point would be to find a solution in our example when N = 100
and when N = 300
, taking always into account the two above-mentioned important notes.
Many thanks in advance.
EDIT
Using @gpap approach for N = 100
the output is the following
Aw we can see the points are not equally spaced.