Effacer les filtres
Effacer les filtres

How is the streamline function implemented?

2 vues (au cours des 30 derniers jours)
巧云
巧云 le 11 Déc 2023
Commenté : 巧云 le 13 Déc 2023
Having already read this, I'm still not quite satisfied. I can understand Euler's method, but that doesn't quite provide an answer as to how exactly MATLAB is able to produce streamlines. Would anyone happen to know exactly how it is implemented? Thanks in advance!

Réponse acceptée

Walter Roberson
Walter Roberson le 11 Déc 2023
streamlines() is implemented by calling stream2() or stream3() to figure out where the lines go. Then it just draws the lines.
You can build the vertex list ahead of time by calling stream2() or stream3() yourself, which will return a cell array of vertex information; streamlines() passed that cell array will just draw the lines.
The question then becomes how stream2() or stream3() are implemented. stream2() turns out to be implemented by calling stream3() .
stream3() starts by doing some interpolation that I do not yet understand the meaning of; then it calls the mex routine stream3c() to do the bulk of the work. The algorithm for stream3() does not appear to be documented.
  1 commentaire
巧云
巧云 le 13 Déc 2023
Understood, thanks for the answer!

Connectez-vous pour commenter.

Plus de réponses (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by