# Dynamic polygonal lines with animation

**URL:** <https://forum.defold.com/t/dynamic-polygonal-lines-with-animation/5649>\
**Category:** Questions\
**Created:** [February 26, 2017, 4:28pm UTC](https://forum.defold.com/t/dynamic-polygonal-lines-with-animation/5649 "2017-02-26T16:28:10Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Mathias\_Westerdahl](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/mathias_westerdahl/32/228_2.png) [@Mathias\_Westerdahl](https://forum.defold.com/u/Mathias_Westerdahl)\
**Post date:** [February 26, 2017, 9:48pm UTC](https://forum.defold.com/t/dynamic-polygonal-lines-with-animation/5649/2 "2017-02-26T21:48:57Z")

</div>

Hi @kevin.sallee!

One more thing I can think of is using a shader to draw the line (curve?)  
Shadertoy holds many examples, [here is one](https://www.shadertoy.com/view/Ml2SWw)

In Defold, you can currently set only a few shader constants (4, with 4 floats each), but that should be enough for your purpose of sending a few coordinates. All that’s needed is a sprite that is rotated, and sized to span the area which contains the lines.

Here is one [post](https://forum.defold.com/t/2d-light-implemetations/3636/5) which mentions this a little, and here is an [example](https://github.com/JCash/defoldexamples/tree/master/main/visibility) that demonstrates a very similar approach.

---

_[View the full topic](https://forum.defold.com/t/dynamic-polygonal-lines-with-animation/5649)._
