# BackIn Easing function

**URL:** https://openrndr.discourse.group/t/backin-easing-function/608
**Category:** How to?
**Created:** [October 31, 2023, 9:15am UTC](https://openrndr.discourse.group/t/backin-easing-function/608 "2023-10-31T09:15:12Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![myreauks](https://avatars.discourse-cdn.com/v4/letter/m/fbc32d/32.png) [@myreauks](https://openrndr.discourse.group/u/myreauks)
#### Post date: [October 31, 2023, 9:15am UTC](https://openrndr.discourse.group/t/backin-easing-function/608/1 "2023-10-31T09:15:12Z")

</div>

Hi!

I noticed that there is a BackIn easing function in the source that is not made available in the easings-package. Is there a reason why it is omitted? How would I go about making it available to my program?

Best,  
Miro

---

<div class="post-metadata">

### Author: ![bluehut](https://yyz2.discourse-cdn.com/free1/user_avatar/openrndr.discourse.group/bluehut/32/675_2.png) [@bluehut](https://openrndr.discourse.group/u/bluehut)
#### Post date: [October 31, 2023, 12:34pm UTC](https://openrndr.discourse.group/t/backin-easing-function/608/2 "2023-10-31T12:34:04Z")

</div>

Hi  
I can’t answer your question directly but ORX has an easing package that will likely work for you.

> <https://github.com/openrndr/orx/tree/master/orx-easing>
>
> //github.com/openrndr/orx/tree/master/orx-easing

cheers  
Nigel

---

<div class="post-metadata">

### Author: ![myreauks](https://avatars.discourse-cdn.com/v4/letter/m/fbc32d/32.png) [@myreauks](https://openrndr.discourse.group/u/myreauks)
#### Post date: [October 31, 2023, 1:42pm UTC](https://openrndr.discourse.group/t/backin-easing-function/608/3 "2023-10-31T13:42:23Z")

</div>

Thanks for the tip! Those look perfect.  
However I have no idea how to use them with an animatable object…  
Any pointers?

---

<div class="post-metadata">

### Author: ![bluehut](https://yyz2.discourse-cdn.com/free1/user_avatar/openrndr.discourse.group/bluehut/32/675_2.png) [@bluehut](https://openrndr.discourse.group/u/bluehut)
#### Post date: [October 31, 2023, 5:43pm UTC](https://openrndr.discourse.group/t/backin-easing-function/608/4 "2023-10-31T17:43:51Z")

</div>

Your question has been repeated on Slack by @abe so you may get an answer there. If you are not tied to Animatable then you could animate old school.

```kotlin
import org.openrndr.application
import org.openrndr.color.ColorRGBa
import org.openrndr.extra.easing.*

fun main() {
    application {
        configure {
            width = 800
            height = 500
        }
        program {
            var x = 0.0
            var y = 0.0

            extend {
                x = frameCount * 2.0 % width
                y = easeBackIn(x, 50.0, height - 100.0, width.toDouble())
                drawer.fill = ColorRGBa.PINK
                drawer.stroke = null
                drawer.circle(x, y, 20.0)
            }
        }
    }
}

```

---

<div class="post-metadata">

### Author: ![abe](https://yyz2.discourse-cdn.com/free1/user_avatar/openrndr.discourse.group/abe/32/700_2.png) [@abe](https://openrndr.discourse.group/u/abe)
#### Post date: [October 31, 2023, 8:52pm UTC](https://openrndr.discourse.group/t/backin-easing-function/608/5 "2023-10-31T20:52:26Z")

</div>

Sometimes I’m the human bridge between Discourse and Slack XD

Eventually, the plan is to merge both Easing classes (the one in [openrndr](https://github.com/openrndr/openrndr/blob/master/openrndr-animatable/src/commonMain/kotlin/org/openrndr/animatable/easing/Easer.kt) and the one in [orx](https://github.com/openrndr/orx/tree/master/orx-easing)) but it hasn’t happened yet.

I’ll post again when I have more details.

Fun fact: I just realized today it’s my 4th anniversary in this forum 🎉 🍰

---

<div class="post-metadata">

### Author: ![myreauks](https://avatars.discourse-cdn.com/v4/letter/m/fbc32d/32.png) [@myreauks](https://openrndr.discourse.group/u/myreauks)
#### Post date: [November 1, 2023, 2:38pm UTC](https://openrndr.discourse.group/t/backin-easing-function/608/6 "2023-11-01T14:38:35Z")

</div>

Thanks for the help guys! I think for now bluehut’s solution will work just fine. Merging both Easing classes sounds very good!
