# How to render a cylinder?

**URL:** <https://discourse.julialang.org/t/how-to-render-a-cylinder/98063>\
**Category:** Visualization\
**Tags:** question, plotting, makie\
**Created:** [April 28, 2023, 9:51pm UTC](https://discourse.julialang.org/t/how-to-render-a-cylinder/98063 "2023-04-28T21:51:13Z")\
**Posts on this page:** 1\
**Showing post:** 14

<div class="post-metadata">

**Author:** ![juliohm](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/juliohm/32/215266_2.png) [@juliohm](https://discourse.julialang.org/u/juliohm)\
**Post date:** [May 4, 2023, 9:46pm UTC](https://discourse.julialang.org/t/how-to-render-a-cylinder/98063/14 "2023-05-04T21:46:31Z")

</div>

From the docs:

```julia
using Meshes, MeshViz

import GLMakie as Mke

c = Cylinder(1.0)

viz(c)

```

![image](https://global.discourse-cdn.com/julialang/original/3X/9/5/9574786cf83ba4c3acda83b57bbdfcc30d66ef5f.png)

Here is a collection of random cylinders:

```julia
cs = [Cylinder(1.0, Segment(rand(Point3, 2))) for i=1:3]

viz(cs, color=1:3)

```

![image](https://global.discourse-cdn.com/julialang/original/3X/c/6/c65b36072295889bdde1c086037f70df30623c88.png)

---

_[View the full topic](https://discourse.julialang.org/t/how-to-render-a-cylinder/98063)._
