This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import matplotlib.pyplot as plt | |
from matplotlib import rcParams | |
from matplotlib.ticker import AutoMinorLocator, MultipleLocator | |
plt.rcParams.update({ | |
"text.usetex": True, | |
"font.family": "serif", | |
"font.size": 23, | |
"text.latex.preamble": "\n".join([ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import matplotlib.pyplot as plt | |
from matplotlib import rc, rcParams | |
lw=2.5 | |
rcParams['font.size'] = 26 | |
rc('axes', linewidth=1) | |
rc('xtick.major', size=7, width=lw/1.3) | |
rc('ytick.major', size=7, width=lw/1.3) | |
rc('xtick.minor', size=0, width=lw/2.5) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import matplotlib.pyplot as plt | |
from matplotlib import rc, rcParams | |
from matplotlib.ticker import FuncFormatter | |
from matplotlib.ticker import MultipleLocator | |
# Set parameters | |
m = 2 # kg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import matplotlib.pyplot as plt | |
from matplotlib import rc, rcParams | |
from matplotlib.ticker import FuncFormatter | |
from matplotlib.ticker import MultipleLocator | |
# Plot setup {{{ | |
lw = 2 | |
k=1.4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import matplotlib.pyplot as plt | |
from matplotlib import rc, rcParams | |
from scipy.integrate import solve_ivp | |
from matplotlib.ticker import FuncFormatter | |
from matplotlib.ticker import MultipleLocator | |
# Plot setup {{{ | |
lw = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import matplotlib.pyplot as plt | |
from matplotlib import rc, rcParams | |
from scipy.integrate import solve_ivp | |
from matplotlib.ticker import FuncFormatter | |
from matplotlib.ticker import MultipleLocator | |
# Plot setup {{{ | |
from matplotlib import rc, rcParams |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
from sympy import * | |
from scipy import interpolate | |
import matplotlib.pyplot as plt | |
from matplotlib import rc, rcParams | |
# Plot and save trajectories y(x) for fixed v0, k and varying | |
# angle α. | |
# Last line prints an angle corresponding to the maximum length |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
# Triginometry {{{ | |
def cos(x): return round( np.cos( np.radians(x) ), 10 ) | |
def sin(x): return round( np.sin( np.radians(x) ), 10 ) | |
def tg(x): return round( np.tan( np.radians(x) ), 10 ) | |
def arctg(x): return np.degrees( np.arctan(x) ) | |
def sins(x): return round( np.sin( np.radians(x) )**2, 10 ) | |
def asin(x): return np.degrees( np.arcsin(x) ) | |
#}}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
def cos(x): | |
return round( np.cos( np.radians(x) ), 10 ) | |
def sin(x): | |
return round( np.sin( np.radians(x) ), 10 ) | |
def asin(x): | |
return np.degrees( np.arcsin(x) ) | |
# Plot setup {{{ |
NewerOlder