Spline Contour

Spline Contour - Spline Contour - Mensajes

#1 Publicado: 12/9/2016 14:36:46
Jean Giraud

Jean Giraud

983 me gusta en 6.866 mensajes.

Grupo: User

This one works well for the given data set. Mesh finer at will and if needed,
bilinear ... not much use for bilinear, whereas "spline" is just something.

Jean

Spline Esplina Done.gif

Spline Esplina [AI2000].sm (23,66 KiB) descargado 1224 vez(es).
#2 Publicado: 12/9/2016 19:08:01
Jean Giraud

Jean Giraud

983 me gusta en 6.866 mensajes.

Grupo: User

... a faster version: one twin col extractor removed.
By same token, I wonder why the col extractor col(,,) is so slow ?

Jean

Spline Esplina [AI2000].sm (23,75 KiB) descargado 1249 vez(es).
#3 Publicado: 12/9/2016 21:59:52
Fridel Selitsky

Fridel Selitsky

520 me gusta en 451 mensajes.

Grupo: User

"By same token, I wonder why the col extractor col(,,) is so slow ?"

You can speed up calculation if o are using "eval":

Spline Esplina [AI2000] (1).sm (25,27 KiB) descargado 1232 vez(es).

#4 Publicado: 12/9/2016 23:07:59
Jean Giraud

Jean Giraud

983 me gusta en 6.866 mensajes.

Grupo: User

Thanks Ber7 for "speedy Gonzalez". In fact, the "uN"
conditional code is redundant in this dataset.
Here is the latest version, even faster.

Jean

Spline Esplina [AI2000].sm (23,66 KiB) descargado 1269 vez(es).
#5 Publicado: 13/9/2016 3:08:10
Fridel Selitsky

Fridel Selitsky

520 me gusta en 451 mensajes.

Grupo: User

Jean,calculation speed will be doubled, if we use the advice of Андрей
http://en.smath.info/forum/resource.ashx?a=14504&b=2

Spline Esplina [AI2000] 2.sm (20,98 KiB) descargado 1278 vez(es).
A 1 usuarios les gustó este mensaje
Davide Carpi 13/9/2016 11:45:00
#6 Publicado: 13/9/2016 7:58:11
Jean Giraud

Jean Giraud

983 me gusta en 6.866 mensajes.

Grupo: User

Thanks Ber7,
... now she is a bomb [2 sec] !

Spline Esplina [AI2000].sm (22,82 KiB) descargado 1290 vez(es).
A 2 usuarios les gustó este mensaje
sergio 13/9/2016 8:17:00, NDTM Amarasekera 13/9/2016 11:14:00
#7 Publicado: 13/9/2016 11:23:31
Andrey Ivashov

Andrey Ivashov

2.343 me gusta en 4.056 mensajes.

Grupo: Super Administrator

You forgot to specify first element of u vector.

By doing so you can speed up calculation even more:

curve_1.png

Regards.
A 2 usuarios les gustó este mensaje
Davide Carpi 13/9/2016 11:45:00, NDTM Amarasekera 13/9/2016 12:01:00
#8 Publicado: 13/9/2016 12:08:37
Jean Giraud

Jean Giraud

983 me gusta en 6.866 mensajes.

Grupo: User

Wrote

You forgot to specify first element of u vector.

By doing so you can speed up calculation even more:



Thanks Andrey, damned me !

While you are there, can you speed up "DeBoor" ?

Jean

Spline De Boor [Esplina].sm (47,76 KiB) descargado 1225 vez(es).

#9 Publicado: 13/9/2016 12:47:49
Andrey Ivashov

Andrey Ivashov

2.343 me gusta en 4.056 mensajes.

Grupo: Super Administrator

Done

Spline De Boor [Esplina]_mod.sm (47,37 KiB) descargado 1307 vez(es).

Timings:
  • 6.1 seconds by 0.97.5890
  • 2.3 seconds by 0.98.6096


Regards.
#10 Publicado: 13/9/2016 15:32:56
Jean Giraud

Jean Giraud

983 me gusta en 6.866 mensajes.

Grupo: User

Thanks Andrey,

... for the local definition of Sx(v), Sy(v).
Must be consistant with all upward local definitions.

Jean
#11 Publicado: 13/9/2016 15:53:06
Andrey Ivashov

Andrey Ivashov

2.343 me gusta en 4.056 mensajes.

Grupo: Super Administrator

You're welcome.

The main change was this:

curve_2.png

Actually I'm not sure why calculation of u is so complex... looks like it is just a copy of m.
#12 Publicado: 14/9/2016 0:51:51
Jean Giraud

Jean Giraud

983 me gusta en 6.866 mensajes.

Grupo: User

Quite right Andrey: 'u' is 'm', which 'm' is redundant.

I must have constructed N_(v,j) aroud 'u' from some source,
thus easier to check the coding. The attached work sheet
has been refactored with auxilliary explanations.
Can be used as model for DeBoor, pretty easy to adapt to
any project. Spline order is linear interpolation around
the polygon. Spline order 2 is "convex hull" per say.
They are about the only two types splines useful for
technical works [?]

Jean

Spline De Boor [Loop].sm (41,68 KiB) descargado 1280 vez(es).
  • Nuevos mensajes
  • Sin mensajes nuevos