Skip to content

Commit 4d4b560

Browse files
committed
add comment on nvertices choice
1 parent 85a8169 commit 4d4b560

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/primitives/Cone.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ radius(c::Cone) = c.radius
2121
height(c::Cone) = norm(c.tip - c.origin)
2222
direction(c::Cone) = (c.tip .- c.origin) ./ height(c)
2323

24+
# Note:
25+
# nvertices is matched with Cylinder, where each end has half the vertices. That
26+
# results in less than nvertices for Cone, but allows a Cylinder and a Cone to
27+
# be seamless matched with the same `nvertices`
28+
2429
function coordinates(c::Cone{T}, nvertices=30) where {T}
2530
nvertices += isodd(nvertices)
2631
nhalf = div(nvertices, 2)

0 commit comments

Comments
 (0)