-
Notifications
You must be signed in to change notification settings - Fork 0
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
Show points as spheres #56
base: main
Are you sure you want to change the base?
Conversation
new_v = np.concatenate([mesh.v, new_v]) | ||
|
||
new_f = np.zeros((0, 3), dtype=np.int64) | ||
for i, (a, b, c) in enumerate(mesh.f): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: vectorize
[ | ||
np.average(triangles[:, 0:2], axis=1), # Midpoint of AB. | ||
np.average(triangles[:, 1:3], axis=1), # Midpoint of BC. | ||
np.average(triangles[:, 0:3:2], axis=1), # Midpoint of AC. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Todo: avoid duplicating points for repeated edges
] | ||
) | ||
if project_to_unit_sphere: | ||
new_v = vg.normalize(new_v) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this. Normalize verts at the end, after repeated calls to subdivide().
TODO: