# How to increase number of facets for cylinder plotting in Makie

**URL:** <https://discourse.julialang.org/t/how-to-increase-number-of-facets-for-cylinder-plotting-in-makie/120984>\
**Category:** General Usage\
**Tags:** makie, geometrybasics\
**Created:** [October 7, 2024, 1:43am UTC](https://discourse.julialang.org/t/how-to-increase-number-of-facets-for-cylinder-plotting-in-makie/120984 "2024-10-07T01:43:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![brianguenter](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/brianguenter/32/29519_2.png) [@brianguenter](https://discourse.julialang.org/u/brianguenter)\
**Post date:** [October 7, 2024, 1:43am UTC](https://discourse.julialang.org/t/how-to-increase-number-of-facets-for-cylinder-plotting-in-makie/120984/1 "2024-10-07T01:43:19Z")

</div>

I am plotting a cylinder in makie like so:

```julia
julia> cyl = GeometryBasics.Cylinder(GeometryBasics.Point(0.0,0.0,0.0),GeometryBasics.Point(0.0,1.0,0.0),.5)
Cylinder3{Float64}([0.0, 0.0, 0.0], [0.0, 1.0, 0.0], 0.5)

julia> mesh(cyl,transparency = false, overdraw = false, color = :cyan) 

```

 ![image](https://global.discourse-cdn.com/julialang/original/3X/2/6/26591bd018fb739d497895fcd75b325e85c381d1.jpeg)

This is coarsely faceted. How can I increase the number of facets that Makie plots? This is not an intrinsic property of the `GeometryBasics.cylinder` object. It is computed on the fly by the `faces` function, which I’m guessing Makie calls to get the mesh faces for the object.

But the `Makie.mesh` function doesn’t seem to have a keyword argument to control the number of faces to use when triangulating the cylinder.

I looked at the `GeometryBasics.mesh` function, thinking I could create a polygon mesh myself with a large number of faces. But this function doesn’t seem to have a keyword argument for controlling the number of faces either.

How can the number of faces used to plot these geometric primitives be increased?

---

<div class="post-metadata">

**Author:** ![baggepinnen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/baggepinnen/32/693_2.png) [@baggepinnen](https://discourse.julialang.org/u/baggepinnen)\
**Post date:** [October 7, 2024, 1:55am UTC](https://discourse.julialang.org/t/how-to-increase-number-of-facets-for-cylinder-plotting-in-makie/120984/2 "2024-10-07T01:55:42Z")

</div>

Thanks to @sdanisch, I learned this trick to accomplish this the other day

```julia
Makie.normal_mesh(Makie.Tesselation(Makie.GeometryBasics.Cylinder(p1, p2, radius), num_facets))

```
