www.jb-electronics.de » Programmieren » Maple » Vektorfelder
Vektorfelder sind Funktionen, bei denen ein Ortsvektor auf einen Vektor abgebildet wird. Anders ausgedrückt: Jedem Ort im Raum wird ein Vektor zugeordnet.
Es ist relativ schwer, sich gegebene Vektorfelder graphisch vorzustellen. Doch zum Glück schafft Maple da Abhilfe: Der fieldplot- bzw. fieldplot3d-Befehl.
fieldplot kann benutzt werden, um ein zweidimensionales Vektorfeld zu zeichnen. Betrachten wir folgendes Beispiel:
Dann definieren wir unser zweidimensionales Vektorfeld:
Das plotten wir nun in Maple wiefolgt:
Der erste Parameter gibt das Vektorfeld an (Argumente nicht vergessen!), der zweite und dritte Parameter geben die Grenzen des darzustellenden Intervalls an. Hier ist das Ergebnis zu sehen:
Anscheinend sorgen die trigonometrischen Terme (sin, cos) für Wirbel im Feld.
Das Maple-Skript gibt es hier zum Download: fieldplot.mw (17 KB).
fieldplot3d muss hingegen benutzt werden, wenn dreidimensionale Vektorfelder gezeichnet werden sollen. Wieder ein Beispiel:
Dann definieren wir unser nun dreidimensionales Vektorfeld:
Das plotten wir nun in Maple analog zum zweidimensionalen Fall, allerdings jetzt unter Verwendung des fieldplot3d-Befehls, und unter Angabe eines dreidimensionalen Intervalls:
Zudem lassen wir uns noch eine Box darum anzeigen für bessere Übersichtlichkeit:
Dieses kann auch mit der Maus gedreht werden, sodass mensch sich einen guten Eindruck von den Beschaffenheiten des Feldes machen kann:
Besonders interessant ist diese Ansicht:
Es lassen sich auf einmal Symmetrien erkennen, die beim Betrachten der mathematischen Beschreibung des Feldes gar nicht so sehr auffallen. Insgesamt ist der fieldplot-Befehl also sehr praktisch.
Das Maple-Skript gibt es hier zum Download: fieldplot3d.mw (17 KB).
Anwendungen dieses Befehls sind zum Beispiel in der Physik die Auswertung und Analyse von Strömungsfeldern.
www.jb-electronics.de » Programming » Maple » Vector Fields
Vector fields are functions that assign a vector to a vector, meaning that every position in space is assigned a vector.
Imagining a given vector field graphically is rather hard. Luckily, Maple provides the commands fieldplot and fieldplot3d.
fieldplot can be used to plot a two-dimensional vector field. Let us take a look at this example:
Define the two-dimensional vector field:
And now plot it as follows:
The first parameter specifies the vector field to be plotted (don't forget the arguments!), the second and third specify the interval to be plotted. YOu can see the result here:
Apparently, the trigonometric terms (sin, cos) are causing the field to be rather curly.
The whole Maple script can be downloaded here: fieldplot.mw (17 KB).
fieldplot3d has to be used if three-dimensional fields are to be plotted. Another example:
Define the three-dimensional vector field:
This field can be plotted similar to the two-dimensional field. The fieldplot3d command has to be used, and the to-dimensional interval becomes a three-dimensional interval:
Additionally, we draw a box around the field, this gives us a better overview:
This image can be turned and rotated with the mouse in order to get a better impression of the field:
This view is rather interesting:
Suddenly, symmetries appear that have not been clearly visible by just looking at the mathematical formula. This makes the fieldplot comands incredibly useful.
The whole Maple script can be downloaded here: fieldplot3d.mw (17 KB).
For instance, the fieldplot commands can be applied in phycics when analysing flow fields.