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

How to create a perfect cube without the triangles as seen in documentation #3000

Closed
mohammedzamakhan opened this issue Sep 12, 2018 · 7 comments

Comments

@mohammedzamakhan
Copy link

https://plot.ly/javascript/3d-mesh/
screen shot 2018-09-12 at 11 52 53 am

I was trying to create a cube using the example in the documentation, but I do not want the triangles like in the example side which uses i, j, k

I want it to look like a cube but just without the sides having two differentiated triangles

@mohammedzamakhan
Copy link
Author

mohammedzamakhan commented Sep 25, 2018

@etpinard any help in this?

@etpinard
Copy link
Contributor

etpinard commented Oct 5, 2018

Here's perhaps an example better suited for your needs: https://rreusser.github.io/plotly-mock-viewer/#gl3d_cube using scatter3d and surfaceaxis.

Pro tip: please use https://community.plot.ly/c/plotly-js for questions of the likes in the future so that other users can benefits for them. Thank you

@etpinard etpinard closed this as completed Oct 5, 2018
@jayhaluska
Copy link

Had the some problem. My guess was that it had something to do with the orientation of the triangles.

I played around with the indices of the triangles and now they are gone. My new index values:

    i: [7, 0, 0, 0, 4, 4, 6, 1, 4, 0, 3, 6],
    j: [3, 4, 1, 2, 5, 6, 5, 2, 0, 1, 6, 3],
    k: [0, 7, 2, 3, 6, 7, 1, 6, 5, 5, 7, 2],

Maybe they example in the documentation can be changed to use these indices? I think most users expect a cube without artifacts.

@archmoj
Copy link
Contributor

archmoj commented Nov 20, 2019

Please refer to this demo.
cc: @emmanuelle it would be nice to have something similar in our python documentation.

@rben01
Copy link

rben01 commented Oct 1, 2020

This seems like a bug. Surely, by default, the luminosity of a triangle shouldn't depend on the orientation its vertices are specified in?

@archmoj
Copy link
Contributor

archmoj commented Oct 1, 2020

This seems like a bug. Surely, by default, the luminosity of a triangle shouldn't depend on the orientation its vertices are specified in?

@rben01 Have you seen flatshading: true and lighting.facenormalsepsilon: 0 options (both should be set) as illustrated in this demo?

@astroboylrx
Copy link

@archmoj the demo you mentioned is a single-color cube. Even with that settings in your comment, a cube with a non-uniform intensity still displays triangles.

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

No branches or pull requests

6 participants