Skip to content
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

prepared a more meaningful example of tvtk usage in Mayavi #974

Merged
merged 4 commits into from
Nov 11, 2021

Conversation

marekyggdrasil
Copy link
Contributor

Hi all!

I have been struggling with tvtk usage in Mayavi, detail on why are provided in this question (which is answered now).

I figured a more meaningful example could be useful. The previous scene was:

snapshot0

And now it is:

snapshot1

I believe it is better because:

  1. This example teaches how to place glyphs in different orientation.
  2. Teaches how to render a cylinder and adjust its resolution.
  3. Cylinder is more visually meaningful than a sphere because of lack of spherical symmetry - orientation matters.
  4. It is more visually meaningful if glyphs have different colours, it makes it provides a one more criterion helping to associate them with objects in the code.

If you need some more adjustments let me know and if you are not interested in it just close the PR. Thanks!

@marekyggdrasil
Copy link
Contributor Author

I realised I was specifying the glyph's position by shifting its center... It is fixed now.

snapshot

@codecov-io
Copy link

Codecov Report

Merging #974 (4bf9284) into master (9c12863) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #974   +/-   ##
=======================================
  Coverage   49.83%   49.83%           
=======================================
  Files         263      263           
  Lines       23927    23927           
  Branches     3259     3259           
=======================================
  Hits        11924    11924           
  Misses      11220    11220           
  Partials      783      783           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9c12863...d4020dd. Read the comment docs.

Copy link
Member

@prabhuramachandran prabhuramachandran left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, looks good, please make the minor change I suggest and I will merge this.

examples/mayavi/mlab/tvtk_in_mayavi.py Outdated Show resolved Hide resolved
@prabhuramachandran
Copy link
Member

@marekyggdrasil -- please also rebase to current master. Thank you.

@marekyggdrasil
Copy link
Contributor Author

@prabhuramachandran thanks for reviewing! I wrapped the lines to match the requested linting style and also merged the most recent master. No conflicts!

Copy link
Member

@prabhuramachandran prabhuramachandran left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks.

@prabhuramachandran prabhuramachandran merged commit f2579df into enthought:master Nov 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants