Thinning up a pointList with distance-criterion?
I have a solution of 2-dim ODE and constructed points in phase-space with:
p=First(numericalIntegral1, Length(numericalIntegral1))
f=First(numericalIntegral2, Length(numericalIntegral2))
pf=Zip((y(aa), y(bb)), aa, p, bb, f)
pf has about 1000 points, some of these are very dense (direction-field is "low" there) some are not. To apply the Spline-method to the pointlist pf is out of question, so I have to thin up "pf" so that the points have almost the same distance to each other.
The algorithm I thought of (only a proposal - any other algorithm is appreciated)
1) Use pf[1] as reference point R
2) Search all the points of "pf" with distance (R,pf[i])>d and distance(R,pf[i_m])=Minimum
(a kind of supremum: smallest upper bound in pf)
3) Remove all points from "pf" with distance (R,pf[i])<=d
4) Use pf[i_m] as R now and goto 2)
until pf is {}
But I do not see how to implement this in Geogebra-Script.
Any idea? Thank you for thinking about it!
Please post your .ggb file
yo uso otro procedimiento que se me ocurrió y que creo que GG lo aguanta bien y que es más facil de controlar y claro en la vista algebraica
creo que el comando funcion está infrautilizado
OK - a good idea to use the freehand tool - I did not even know that it exists. It's not an algorithm - but why not use my own brain? Saves a lot of thinking.
Thanx mathmagic
One solution more.
Based on a transformed Pathparameter (transformed from vertex to length)
@rami
1) That is precisely what I was looking for
2) "One solution more" - you are loving understatement! This solution is ingenious in my point of view and
3) to understand why it is working I shall have to do a lot of brain-work. The idea of a "density-norm" is fantastic clever.
Thank you that you thought about it - at the end it is my problem not yours - thanx
Sorry, a bug:
The last segment (from end to start) is not included in the length.
Correction: new object "Len" and use in "DensityNorm".
si deseas un conjunto de puntos, no equidistantes, sino en tiempos regulares puedes añadir la instruccion Sequence(e(t), t, t_0, t_f,0.3) en mi archivo
ahí se observa en que periodos de tiempos son más estables las poblaciones
freehand is the type of object in geogebra. I only build the function(begin,end, values of y coords of points in numericalintegral) look at help of function() command
https://wiki.geogebra.org/e...
first epigraph
@mathmagic&rami
Thank you folks - I have learned a lot - keywords "PathParameter" and how to use it with Polyline, "freehand-tool" in context with "Function-command" and more!
Thank you!
Comments have been locked on this page!