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
Octahedron in dipy.core.triangle_subdivide has wrong faces #15
Comments
Sorry, I should make this more clear in the documentation. octahedron_triangles is the edges of the faces of the octahedron not the vertices of the octahedron, to get the vertices you must use octahedron_edges[octahedron_triangles, 0](octahedron_edges[octahedron_triangles, 1] will also work and the fact that both of these work is quite special and very important to how the function divide_all works). I realize this is confusing, but by doing it this way, we are able to use the divide_all algorithm to create a unique set of vertecies on the unit sphere. One of the reasons we might want our set of verticies to be unique in so we can run electrostatic repulsion on them. Bago |
Who will this have affected? Ian On 5 November 2011 21:35, Eleftherios Garyfallidis
|
Ian you can see who changed things in a file using the command git blame It seems that the name was misleading that is all :-) Bago I saw that you closed the issue but would it be okay to change that name into something that is more explanatory or at least add a comment? |
Neat! Ian On 6 November 2011 11:05, Eleftherios Garyfallidis
|
Just FYI, this is from the documentation for create_unit_sphere, but I can also add comment where the octahedron is defined to avoid further confusion.
On a related note, are you guys using the icosahedron that's currently in this module? If I remember correctly from when I looked at this, I believe it is not possible to use an icosahedron with the current divide_all function, has someone found a way to do so? Bago |
Cool, yes please comment also the octahedron, perhaps you should also check the icosahedron. If someone shouldn't use it then it shouldn't be there. GGT!!! :-) |
... and pushed |
Added the last pull request to the gh change-log and fixed a typo.
This are the correct vertices and faces of the octahedron
octahedron_vertices = np.array( [
[ 1.0, 0.0, 0.0], # 0
[-1.0, 0.0, 0.0], # 1
[ 0.0, 1.0, 0.0], # 2
[ 0.0,-1.0, 0.0], # 3
[ 0.0, 0.0, 1.0], # 4
[ 0.0, 0.0,-1.0] # 5
],dtype=np.float32)
octahedron_triangles = np.array( [
[ 0, 2, 4],
[ 2, 5, 0],
[ 1, 4, 2],
[ 1, 2, 5],
[ 3, 4, 0],
[ 3, 0, 5],
[ 3, 1, 4],
[ 1, 3, 5]
], dtype=np.uint32)
Best wishes,
Eleftherios
The text was updated successfully, but these errors were encountered: