How is the streamline function implemented?

6 次查看(过去 30 天)
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!

采纳的回答

Walter Roberson
Walter Roberson 2023-12-11
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.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Vector Fields 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by