# How to generate a sphere and cylinder?

**URL:** https://forum.techsoft3d.com/t/how-to-generate-a-sphere-and-cylinder/1996
**Category:** HOOPS Visualize Web
**Created:** [May 9, 2023, 6:28am UTC](https://forum.techsoft3d.com/t/how-to-generate-a-sphere-and-cylinder/1996 "2023-05-09T06:28:15Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![619944680](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.techsoft3d.com/619944680/32/516_2.png) [@619944680](https://forum.techsoft3d.com/u/619944680)
#### Post date: [May 9, 2023, 6:28am UTC](https://forum.techsoft3d.com/t/how-to-generate-a-sphere-and-cylinder/1996/1 "2023-05-09T06:28:15Z")

</div>

How to generate a sphere and cylinder, and modify the length, width, and height parameters of the generated sphere or cylinder?

---

<div class="post-metadata">

### Author: ![gabriel.peragine](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.techsoft3d.com/gabriel.peragine/32/1535_2.png) [@gabriel.peragine](https://forum.techsoft3d.com/u/gabriel.peragine)
#### Post date: [May 9, 2023, 4:29pm UTC](https://forum.techsoft3d.com/t/how-to-generate-a-sphere-and-cylinder/1996/2 "2023-05-09T16:29:43Z")

</div>

Here are the basic functions:  
[Sphere](https://docs.techsoft3d.com/communicator/latest/api_ref/viewing/modules/Communicator.Util.html?highlight=cylinder%20create#Communicator.Util.Communicator.Util.generateSphereMeshData)  
[Cylinder](https://docs.techsoft3d.com/communicator/latest/api_ref/viewing/modules/Communicator.Util.html?highlight=cylinder%20create#generateconecylindermeshdata)

That said your best bet is probably using the matrix approach to size the geometry as @guido explains [here](https://forum.techsoft3d.com/t/how-can-i-resize-of-a-node/1976/2) for a similar question.
