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

LatheGeometry: Change index order. #23291

Merged
merged 1 commit into from
Jan 21, 2022
Merged

LatheGeometry: Change index order. #23291

merged 1 commit into from
Jan 21, 2022

Conversation

Chrissie-AI
Copy link
Contributor

@Chrissie-AI Chrissie-AI commented Jan 21, 2022

LatheGeometry() produces bands of quads, each of which are further subdivided into an upper-right (blue) and a lower-left(green) triangle. The two triangles which are the result of quad subdivision, although different in shape and size, share common properties: Both comprise a horizontal edge, a slanted edge and a (shared) diagonal edge. The vertices of each triangle are specified in a CCW orientation.

To facilitate further processing in an i.e. custom shader, it would be advantageous, if 1st and 2nd index always specify the horizontal edge, and 1st and 3rd vertex always specify the slanted edge. This is currently not the case.

My proposed change involves a cyclical CCW rotation by one position of the indices of the upper-right triangle, in order to match the order already specified in the lower-left triangle. ==> b, c, d becomes c, d, b
Note that the one-letter vertex "names" in the sketch match the variable names in source code.

quad

LatheGeometry() produces bands of quads, each of which are further subdivided into an upper-right (blue) and a lower-left(green) triangle. The two triangles which are the result of quad subdivision, although different in shape and size, share common properties: Both comprise a horizontal edge, a slanted edge and a (shared) diagonal edge. The vertices of each triangle are specified in a CCW orientation.

To facilitate further processing in an i.e. custom shader, it would be advantageous, if 1st and 2nd index always specify the horizontal edge, and 1st and 3rd vertex always specify the slanted edge. This is currently not the case.

My proposed change involves a cyclical CCW rotation by one position of the indices of the upper-right triangle, in order to match the order already specified in the lower-left triangle.  ==>  b, c, d   becomes c, d, b
Note that the one-letter vertex "names" in the sketch match the variable names in source code.
@Chrissie-AI Chrissie-AI changed the base branch from master to dev January 21, 2022 12:11
@Mugen87 Mugen87 changed the title Change Index Generation in LatheGeometry() LatheGeometry: Change index order. Jan 21, 2022
@mrdoob mrdoob added this to the r137 milestone Jan 21, 2022
@mrdoob mrdoob merged commit 6456390 into mrdoob:dev Jan 21, 2022
@mrdoob
Copy link
Owner

mrdoob commented Jan 21, 2022

Thanks!

@Chrissie-AI
Copy link
Contributor Author

Chrissie-AI commented Jan 22, 2022 via email

@Mugen87
Copy link
Collaborator

Mugen87 commented Jan 22, 2022

Yes.

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