# Calling a function within an animation

**URL:** <https://community.plotly.com/t/calling-a-function-within-an-animation/37703>\
**Category:** 📊 Plotly Python\
**Created:** [April 13, 2020, 2:52pm UTC](https://community.plotly.com/t/calling-a-function-within-an-animation/37703 "2020-04-13T14:52:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![JJT](https://avatars.discourse-cdn.com/v4/letter/j/3da27b/32.png) [@JJT](https://community.plotly.com/u/JJT)\
**Post date:** [April 13, 2020, 2:53pm UTC](https://community.plotly.com/t/calling-a-function-within-an-animation/37703/1 "2020-04-13T14:53:00Z")

</div>

Hi,

I have been trying to use matplotlib and stumbled on plotly as an easier alternative.  
I’ve come across this demo: [https://plotly.com/python/animations/](https://plotly.com/python/animations/) - Moving Frenet Frame Along a Planar Curve in particular.

For all these animations the points are calculated before hand. Is it possible to call a function and calculate the points on the go, in real time? If someone could point to the right resource, I’d be very grateful.

Many thanks.
