This file contains hidden or 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 | |
| import matplotlib.patches as patches | |
| x = np.linspace(0, 1, 100) | |
| y = np.sin(4*np.pi*x) | |
| # Big plot | |
| ax = plt.subplot(111) | |
| plt.plot(x, y, "k", zorder=3, alpha=0.4) |
This file has been truncated, but you can view the full file.
This file contains hidden or 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
| /* | |
| Programmatically define a mesh for a region enclosed by a curve | |
| given in parametric for for polar coordinates. | |
| Author: Nicolas Guarin-Zapata | |
| Date: October, 2018 | |
| */ | |
| size = 0.05; | |
| npts = 50; |
This file contains hidden or 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
| #!/usr/bin/env python3 | |
| # -*- coding: utf-8 -*- | |
| """ | |
| Minimize the best approximation to points that lie over | |
| a straight line with outliers for L^p norm. | |
| @author: Nicolas-Guarin-Zapata | |
| """ | |
| import numpy as np | |
| import matplotlib.pyplot as plt |
This file contains hidden or 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 vtkInterface | |
| from vtkInterface import examples | |
| # Load Grid | |
| grid = vtkInterface.UnstructuredGrid(examples.hexbeamfile) | |
| # scalar demo | |
| plobj = vtkInterface.PlotClass() | |
| plobj.AddMesh(grid, scalars=grid.points[:, 2], colormap='viridis') | |
| plobj.AddScalarBar() |
This file contains hidden or 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
| from __future__ import division, print_function | |
| import numpy as np | |
| from scipy.optimize import fsolve | |
| def fun(X): | |
| x, y, z = X | |
| return [x**2 + y + z - 1, | |
| x + y**2 + z - 1, | |
| x + y + z**2 - 1] |
This file contains hidden or 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
| # -*- coding: utf-8 -*- | |
| """ | |
| Create a 3D lattice of points for some lattice parameters | |
| @author: Nicolas Guarin-Zapata | |
| """ | |
| from __future__ import division, print_function | |
| import numpy as np | |
| from numpy import sin, cos, sqrt |
This file contains hidden or 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
| #!/usr/bin/env python2 | |
| # -*- coding: utf-8 -*- | |
| """ | |
| Dimensional reduction using non-linear methods present in scikit-learn | |
| Based on an example by Jake Vanderplas | |
| """ | |
| from time import time | |
| import matplotlib.pyplot as plt |
This file contains hidden or 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
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| import sys | |
| from PyQt5.QtWidgets import (QMainWindow, QApplication, QDockWidget, QWidget, | |
| QGridLayout, QSlider) | |
| from PyQt5.QtCore import Qt | |
| import numpy |
This file contains hidden or 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
| CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC | |
| C C | |
| C Compute the values for the Bessel function of the first kind C | |
| C and order 0 in the interval [XA,XB] with N points. C | |
| C C | |
| CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC | |
| C C | |
| C AUTHOR: NICOLAS GUARIN Z. C | |
| C GRUPO DE MECANICA APLICADA- UNIVERSIDAD EAFIT C | |
| C LAST MOD: 25 JULY 2012 C |