# Draw surfaces and lines in 3D?

**URL:** <https://root-forum.cern.ch/t/draw-surfaces-and-lines-in-3d/58164>\
**Category:** Newbie\
**Tags:** root\
**Created:** [February 14, 2024, 6:19am UTC](https://root-forum.cern.ch/t/draw-surfaces-and-lines-in-3d/58164 "2024-02-14T06:19:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Crisps](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/crisps/32/39101_2.png) [@Crisps](https://root-forum.cern.ch/u/Crisps)\
**Post date:** [February 14, 2024, 6:19am UTC](https://root-forum.cern.ch/t/draw-surfaces-and-lines-in-3d/58164/1 "2024-02-14T06:19:18Z")

</div>

Dear experts

I want to draw some cylindrical structure and a line passing through it, with a `TGraph2D` inside the structure. Maybe `TPolyLine3D` can draw the line in 3D, but I can not find how to draw a surface in 3D. Any advice?

---

<div class="post-metadata">

**Author:** ![couet](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/couet/32/12037_2.png) [@couet](https://root-forum.cern.ch/u/couet)\
**Post date:** [February 14, 2024, 2:46pm UTC](https://root-forum.cern.ch/t/draw-surfaces-and-lines-in-3d/58164/2 "2024-02-14T14:46:01Z")

</div>

To draw shapes you would need to use TGeo

---

<div class="post-metadata">

**Author:** ![Crisps](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/crisps/32/39101_2.png) [@Crisps](https://root-forum.cern.ch/u/Crisps)\
**Post date:** [February 15, 2024, 2:21am UTC](https://root-forum.cern.ch/t/draw-surfaces-and-lines-in-3d/58164/3 "2024-02-15T02:21:28Z")

</div>

Thank you, can I draw `TGraph2D` or some plots in such `TGeo` drawing?

---

<div class="post-metadata">

**Author:** ![couet](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/couet/32/12037_2.png) [@couet](https://root-forum.cern.ch/u/couet)\
**Post date:** [February 15, 2024, 8:11am UTC](https://root-forum.cern.ch/t/draw-surfaces-and-lines-in-3d/58164/4 "2024-02-15T08:11:49Z")

</div>

They won’t easily mix.  
Here is an example which show how to add an extra object on a surface plot.  
[https://root.cern/doc/master/annotation3d\_8C.html](https://root.cern/doc/master/annotation3d_8C.html)
