Trajectories3D
Trajectory3D
Bases: trajectory
Trajectory3D
Class dedicated to compute and represent trajectories in 2D.
Methods
- thermalize : Adds thermalization steps and random initial position.
- initial_position : Adds a trajectory with the given initial position.
- plot : Prepares the plots and computes the values. Returns the axis and the figure.
- add_slider : Adds a
Slider
for thedF
function. - _prepare_plot : Prepares the plots.
- _scatter_start_point : Scatter all the start points.
- _scatter_trajectory : Scatter all the trajectories.
- _plot_lines : Plots the lines of all the trajectories.
- _create_sliders_plot : Creates the sliders plot.
Source code in phaseportrait/Trajectories3D.py
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 |
|
__init__(dF, *, Range=None, dF_args={}, n_points=10000, runge_kutta_step=0.01, runge_kutta_freq=1, **kargs)
Creates an instance of Trajectory3D
Parameters:
Name | Type | Description | Default |
---|---|---|---|
dF |
callable)
|
A |
required |
Range |
list, optional)
|
Ranges of the axis in the main plot, by default None |
None
|
dF_args |
dict, optional)
|
If necesary, must contain the kargs for the |
{}
|
n_points |
int, optional)
|
Maximum number of points to be calculated and represented, by default 10000 |
10000
|
runge_kutta_step |
float, optional)
|
Step of 'time' in the Runge-Kutta method, by default 0.01 |
0.01
|
runge_kutta_freq |
int, optional)
|
Number of times |
1
|
xlabel |
str, optional)
|
x label of the plot, by default 'X' |
required |
ylabel |
str, optional)
|
y label of the plot, by default 'Y' |
required |
zlabel |
str, optional)
|
z label of the plot, by default 'Z' |
required |
Source code in phaseportrait/Trajectories3D.py
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
|