예제 #1
0
def plot_curvature(surface_name):
    """
    Code used to plot the curvature for a given surface
    """
    surf = Surface()
    surf.load(surface_name)
    surf.plot_curvature(30, 30)
예제 #2
0
def plot_surface(surface_name, cmap=None):
    """
    Code used to plot a given surface
    """
    surf = Surface()
    surf.load(surface_name)
    surf.plot(30, 30, cmap)
예제 #3
0
def plot_isophotes(surface_name,
                   L,
                   epsilon,
                   x_param=None,
                   y_param=None,
                   cmap='viridis'):
    """
    Code used to plot the isophotes to a given surface
    """
    surf = Surface()
    surf.load(surface_name)
    surf.plot_isophotes(L,
                        np.arange(0, 1.01, 0.1),
                        epsilon=epsilon,
                        x_param=x_param,
                        y_param=y_param,
                        cmap=cmap)
예제 #4
0
파일: patch9.py 프로젝트: cheery/essence
 def load(path):
     return Patch9(Surface.load(path))
예제 #5
0
파일: font.py 프로젝트: cheery/essence
 def load(path):
     return Font(
         Surface.load(os.path.join(path, 'bitmap.png')),
         json.load(open(os.path.join(path, 'metadata.json')))
     )