fieldanimation.examples
package¶
fieldanimation.examples.app
¶
-
fieldanimation.examples.app.
ElectricField
(q, r0, x, y)[source]¶ Return the electric field vector E=(Ex, Ey) due to charge q at r0.
-
class
fieldanimation.examples.app.
GLApp
(title, width, height, options)[source]¶ Bases:
fieldanimation.examples.glfwBackend.glfwApp
-
__abstractmethods__
= frozenset({})¶
-
__init__
(title, width, height, options)[source]¶ Create a new glfwApp instance.
- Parameters
title (string) – window title
width (integer) – window width in pixels
height (integer) – window height in pixels
resizable (bool) – if True the window can be resized
-
makeGUI
(gui)[source]¶ Create the GUI context and GlfwRenderer
- Parameters
gui (bool) – if True create the GUI context and GlfwRenderer
-
onKeyboard
(window, key, scancode, action, mode)[source]¶ Process keybord input. This method is called automatically when the user interacts with the keyboard.
- Parameters
(class (window) – glfw.LP__GLFWwindow instance): window
key (integer) – the key that was pressed
scancode (integer) –
action (integer) – PRESS, RELEASE, REPEAT
mode (integer) – modifier
-
-
fieldanimation.examples.app.
createField
(eq='Spiral ccw', m=64, n=64)[source]¶ Equations are taken from http://reference.wolfram.com/language/ref/StreamPlot.html
- Parameters
eq (string) – equation name
m (integer) – number of rows
n (integer) – number of columns