# The most efficient way to draw curved polyline from two point datasets

**URL:** <https://community.cesium.com/t/the-most-efficient-way-to-draw-curved-polyline-from-two-point-datasets/27055>\
**Category:** CesiumJS\
**Created:** [September 28, 2023, 11:08pm UTC](https://community.cesium.com/t/the-most-efficient-way-to-draw-curved-polyline-from-two-point-datasets/27055 "2023-09-28T23:08:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Federico\_Marcantogni](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/federico_marcantogni/32/12874_2.png) [@Federico\_Marcantogni](https://community.cesium.com/u/Federico_Marcantogni)\
**Post date:** [September 28, 2023, 11:08pm UTC](https://community.cesium.com/t/the-most-efficient-way-to-draw-curved-polyline-from-two-point-datasets/27055/1 "2023-09-28T23:08:52Z")

</div>

Need to plot hundreds of polylines or arcs where the centre of the polyline is raised and smoothly curved.

This example is close, though it seems time-dependent whereas my polylines have only static information and no need for time: [CZML Polyline - Cesium Sandcastle](https://sandcastle.cesium.com/?src=CZML%20Polyline.html)

So what is the most efficient way to draw smoothly bent lines with the centerpoint raised between the start and end of the line?

many thanks

---

<div class="post-metadata">

**Author:** ![Federico\_Marcantogni](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/federico_marcantogni/32/12874_2.png) [@Federico\_Marcantogni](https://community.cesium.com/u/Federico_Marcantogni)\
**Post date:** [September 29, 2023, 5:21am UTC](https://community.cesium.com/t/the-most-efficient-way-to-draw-curved-polyline-from-two-point-datasets/27055/2 "2023-09-29T05:21:48Z")

</div>

The result should look like the link below, however, I fear that the interpolation algorithm used in that example will likely use a lot of memory if hundreds of lines are drawn together with many other entities - hence my quest for the most efficient way to do this also without the time dependency

[Hello World - Cesium Sandcastle](https://sandcastle.cesium.com/index.html#c=pVZbc+I2FP4rGl7WNI6AJdlkgc2UYXc76WQDE5j0hZmOsA+grix5JBlCO/nvPZIv2GQ7aVo/gHTu5zufZO+YJjsOe9DkE5GwJxMwPEvoo5cF7yK/nSh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qI5TZOwTT7xHrc5nV2orbI2MPQi4WcqfeZIqbUmmRUBpxwIeOZyM6ayy6DtYGhnj/Ead0mEU8x3h8adl6+RTbtkikWDGoGadCU/jZetm1EH7hptQLOZyM92BFuzgTLa9m7tcSCkddXD70ssqJVZMVxH/Bg)

---

<div class="post-metadata">

**Author:** ![Federico\_Marcantogni](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/federico_marcantogni/32/12874_2.png) [@Federico\_Marcantogni](https://community.cesium.com/u/Federico_Marcantogni)\
**Post date:** [September 29, 2023, 1:51pm UTC](https://community.cesium.com/t/the-most-efficient-way-to-draw-curved-polyline-from-two-point-datasets/27055/3 "2023-09-29T13:51:12Z")

</div>

I think I have sorted it out starting from the example above 🙂  
Here is the sandcastle: [Cesium Sandcastle](https://sandcastle.cesium.com/#c=rVZtT+M4EP4rFl82OUra8rIHtKBD7J6OEysQVHvSqV9MMm2sc+zIdul2Ef/9xk6cOKHsLeiqqK097/M8HieVQhvyyGANipwRAWtyCZqtiuSr24vmO6lbX0phKBOg5jvxZC7m4pEqIlbFA6ibxYVKNVrvT6ptbagy11Lg1t54dNTZpQZ3D06SXxsn2siyVj45Tg4nwa5T3j9pN0sFNMO9cWOtYAEKRAozVgBK6uz/XHFGxSdqIFkoWVxpefxxNI4+7I9G4z33zEajU/f8/SGu3Rcse9ULzbJ7SKXIdNQJOSCHB+h0ELauNYviOKjnHc6PPx7+h/O5WEhFIhuDofPRBH+mHWQmZHeXxeRpLgh+hkNyiV00QCgmpShb5maPI7KkpCZPKiXrrVSyBGU2XVrc06LkkN1KzQyT4rZWimwq3tIh7TXagi9xF/9RceAw+QRLBaAjz5ZBw5ABOfLufBKuRS50v0OdYN0sZPmGJBwJB553P07BgznoBKnQqHv8OxMZMTlYUpWSCUPkwq19z127B4SiWiEfgTAT9L4i+kUhV8Iegagm/pBEnSO3R8ZxTH5BxPcCnf2wCxj+1oXvdEAuFS1zlroeNC2JmlKXYL5SvoKoPhKxd+ndJVyKJ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