Skip to content

Add Cone primitive #257

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

Merged
merged 9 commits into from
May 6, 2025
Merged

Add Cone primitive #257

merged 9 commits into from
May 6, 2025

Conversation

ffreyer
Copy link
Collaborator

@ffreyer ffreyer commented Apr 16, 2025

I want to remove the mesh generation code in Makie that's used for arrows and add replacements as GeometryPrimitives here. This is coupled with MakieOrg/Makie.jl#4925.

Currently this just adds Cone() with the idea of simplifying the arrow components to full, closed meshes.

Comment on lines +74 to +77
# tip - this is undefined / should be all ring angles at once
# for rendering it is useful to define this as Vec3f(0), because tip normal
# has no useful value to contribute to the interpolated fragment normal
ns[end-1] = Vec3f(0)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fixes seams on the mesh. The left mesh uses triangles where the tip vertex is duplicated for each triangle with a different normal (average of bottom normals). The right uses one (0,0,0) vertex at the tip:
image
You get the same seams with quads instead of triangles and even if you give the tip a finite radius, i.e. with a conical frustum. (?)

@ffreyer ffreyer mentioned this pull request May 1, 2025
23 tasks
@ffreyer ffreyer marked this pull request as ready for review May 5, 2025 12:48
@ffreyer ffreyer merged commit 4606dc9 into master May 6, 2025
14 checks passed
@ffreyer ffreyer deleted the ff/arrows branch May 6, 2025 14:45
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.

2 participants