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
# Ported from: http://www.mathworks.com/matlabcentral/fileexchange/29702-generate-maximally-perceptually-distinct-colors | |
import sys | |
import numpy as np | |
from vispy import scene | |
from vispy.color import ColorArray | |
from vispy.color.color_array import _rgb_to_lab | |
def distinguishable_colors(ncolors, bg=[0, 0, 0]): | |
n_grid = 30 |
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
#!/usr/bin/python | |
import sys | |
import numpy as np | |
import mne | |
from mne.preprocessing import ICA | |
argc = len(sys.argv) | |
# lists of data sources |
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
This file is here to name the Gist. |
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 sys | |
import numpy as np | |
from vispy import app, gloo, visuals | |
from vispy.visuals import transforms | |
N = 100 | |
n = 10 | |
width = 800 | |
height = 600 |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
""" | |
This example is a prototype demonstrating normal mapping | |
by comparison between a reference mesh and its flatten | |
version. | |
""" | |
import numpy as np | |
from vispy import app, gloo |
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
This file is here to name the Gist. |
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
# https://github.com/pyvista/pyvista/issues/137 | |
import vtk | |
sphere = vtk.vtkSphereSource() | |
sphere.SetCenter(0, 0, 0) | |
sphere.SetRadius(1) | |
sphere.Update() | |
elevation = vtk.vtkElevationFilter() | |
elevation.SetInputData(sphere.GetOutput()) |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import vtk | |
def sphere(center, radius=1.0, color='Gray', metallic=0.5, roughness=1.0): | |
colors = vtk.vtkNamedColors() | |
cx, cy, cz = center |
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 pyvista as pv | |
import vtk | |
def foo(bar): | |
pass | |
def disable_tube(slider): | |
tr = slider.GetEventTranslator() |
OlderNewer