-
Notifications
You must be signed in to change notification settings - Fork 100
ENH: Plot with vertex normals #78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
LGTM :) |
I figured if we went through the pains of optimizing the heck out of the normal calculations and of figuring out how to put them in Mayavi, we might as well :) Even if it's likely to be moot in the next 6-12 months assuming |
Oh, fantastic! |
Maybe some tests for the computation code? |
Sure, I could add those tomorrow. |
really cool ! |
@mwaskom test added, takes 8 sec on my system unfortunately. |
Does it have to run on the whole surface? Or could you select a subset of the mesh |
I could select a subset of the mesh, just a minute. |
Also probably worth testing the fast cross product against the numpy.cross, just to be safe. |
@mwaskom https://github.com/nipy/PySurfer/pull/78/files#diff-65435034261db5909578ccc0cfe6a83fR19 |
Okay, made the test (much) faster by saying there were only 100 triangles. Should be ready for review / merge. |
In the new version, the faster cross product code doesn't actually get exercised as there are only 100 triangles right? In either case, probably better to have a dedicated test just so it's more obvious what's going on if it starts failing. |
Explicit |
Makes the surfaces much smoother. Although the effect is more striking when zoomed in, it can even be seen zoomed-out when comparing old and new:

OLD:
NEW:

I used the optimized code from mne-python to do the normal calculations.