Upgrade LinearCellDemo and add a PythonicAPI version
Changes are:
- A better colour choice, making it easier to distingiush fromt and back surfaces (I hope).
- Enlarging the point ID numbers.
- Rewrote/upgraded the C++ and Python versions.
- Added an example for the new PythonicAPI - this example uses the vtkTextWidget and adds borders.
- Updated the documentation to help in identifying the back face.
Merge request reports
Activity
@cory.quammen please review
mentioned in merge request !358 (merged)
What do you think of this? It think the plane lets the viewer easily distinguish front from back. It came to me at 3AM last night: Default:
Edited by Andrew MacleanFYI Here is what the new PythonicAPI image looks like. The big difference is the use of vtkTextWidget making text resizing easy and the introduction of borders:
Edited by Andrew Macleanadded 1 commit
- 9f0a6773 - Upgraded to use a tile as a base to help users orient.
@amaclean thanks for posting these images. A couple thoughts on just the 2D snapshots (I realize the full 3D example is far better for understanding):
- I'm not sure which is the front face and which is the back face color just from looking at the picture. I think front face is a blueish color and backface is orangish, which makes me wonder why the tetrahedron, for example, looks all orange. We must be seeing only the backface and the front face on the sides closest to the camera are quite transparent? If that's the case, then why is the pentagonal prism blue on the side farthest from the camera instead of orange? I was hoping a different backface color this would make things clearer, but it has got me a bit more confused.
- I like the ground plane. I think it helps establish perspective, which can be useful in understanding the depth of many of the points in the image. If shadows were easier to do in VTK, I would suggest having a light source above to case a shadow on the plane for even more of a depth cue.
- The orientation of the tetrahedron has been changed. In these 2D snapshots, I find the orientation unclear. I think the previous orientation might have provided a better view.
- I think the coloring has a lot to do with the angle of the surfaces relative to the light source. ALso the serfaces are partially transparent so coloring will come through to the front surface.
- I might put the ground plane back only for the voxel, hexahedron and the two prisms.
- Tehrahedron orientation has been changed back.
Thanks, Andrew. I played around with the existing online demo (which is so super awesome, BTW!) to see if there was a better angle for the tetrahedron. I think this might be one:
The lighting on the bottom triangle is much darker, making that pesky line segment between points 0 and 2 look unambiguously in the back.
@cory.quammen, I don't see it. The shading is the same for the projected triangle on edge 0-1 as it is for the one on edge 3-2. The shading adds nothing to disambiguate the depth of nodes 1 and 2. What makes the difference in that picture is the fact that the #2 (closed) sphere is occluded by the triangles, making it impossible to be in the front. If those spheres were gone, the tet would remain ambiguous.
The shading adds nothing to disambiguate the depth of nodes 1 and 2.
Hmm, it might be my advantage of having seen this with 3D motion, but my brain creates a triangle from 0,1,2 and sees the sees the 0-2 line segment on that back face. I could also see a pyramid, but since this is labeled as a tet, I know it can't be that.
This is the ambiguity I see. (I removed the spheres and reconstructed the corners to remove the influence of the spheres.) Either of the two projected diagonals could be the one in front. The shading adds nothing to preference either interpretation.
Edited by Sean Ahern
I don't see anything in these screenshots that helps distinguish depth. I use the tetrahedron as the most difficult case. In all of these screenshots, both interpretations of the tet are valid.
I could see the introduction of the ground plane helping, but only if you cast the shadow of the cell down onto it. Otherwise, it adds nothing to the interpretation of depth for cases where the ground plane is unobscured (tet, wedge, pyramid).
I agree with @cory.quammen that the original tet orientation was better.
Edited by Sean Ahernadded 1 commit
- 5101c596 - Reverting: removing the tile as a base and using original orientations
- Resolved by Cory Quammen
If you do move it around with the 3D motion in WASM, it makes it a lot easier to resolve the tetra. As I said I will:
- Reintroduce the ground plane for some of the shapes.
- Change the interactor style to trackball camera - making it easier to manipulate the image.
- Reorient the tetra.
- Improve the C++ code a bit more.
I'll probably have something on Monday.
added 1 commit
- 426d177d - IMproving C++ and Python code. Need to fix tetra orientation
Ok, I think this is the best I can do:
- I have increased the size of the plinth.
- Rotated Tetra and Pyramid orientating them so that number on the point closest to you obscures the edge making it (I think) more obvious that this is the front.
What do you think?
Edited by Andrew MacleanI think I've got it!
I have:
- Changed the color scheme
- Re-oriented the Tetra - I think the ambiguity of lines and surfaces is much reduced.
- Put the wedge on a plinth and it is easier ti distinguish front and back surfaces. It actually looks like a wedge now!
- Line and Poly line are now lines.
Check out the images and, if you think it's Ok, I'll upload the modified code tomorrow.
I like it. I think the addition of the plinth underneath effectively orients the cell for the viewer. Nice job
Edited by Sean Ahern
added 1 commit
- efeeac29 - Updated coloring and orientation of some objects
+2
Thanks so much for your careful attention and thought on this, @amaclean! And thanks for your feedback, @ahernsean!
mentioned in commit 94f6a6e3