# Rect Animation (Android)

**URL:** https://discourse.processing.org/t/rect-animation-android/30809
**Category:** Processing for Android
**Created:** [June 20, 2021, 12:12am UTC](https://discourse.processing.org/t/rect-animation-android/30809 "2021-06-20T00:12:00Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Rogo](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/rogo/32/12349_2.png) [@Rogo](https://discourse.processing.org/u/Rogo)
#### Post date: [June 20, 2021, 12:12am UTC](https://discourse.processing.org/t/rect-animation-android/30809/1 "2021-06-20T00:12:00Z")

</div>

can i do a rect (); animate like that? I tried it for 3 hours but it doesn’t quite work

![Screen_Recording_20210620-020817_One UI Home](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/0/0b61569f66b36d46d5ad599eeb8ab6d1d4c0e4eb.gif)

---

<div class="post-metadata">

### Author: ![Rogo](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/rogo/32/12349_2.png) [@Rogo](https://discourse.processing.org/u/Rogo)
#### Post date: [June 20, 2021, 12:16am UTC](https://discourse.processing.org/t/rect-animation-android/30809/2 "2021-06-20T00:16:06Z")

</div>

I need this without lags

![Screen_Recording_20210620-021403_APDE](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/6/6572347c4691a130cec32009ab9275f1526a2515.gif)

and instead of the right I wanted to take an image like this:

 ![skin](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/5/575207296e3c867aefe43d0724f5956c77ca80eb.jpeg)

---

<div class="post-metadata">

### Author: ![paulgoux](https://avatars.discourse-cdn.com/v4/letter/p/b9bd4f/32.png) [@paulgoux](https://discourse.processing.org/u/paulgoux)
#### Post date: [June 20, 2021, 9:54am UTC](https://discourse.processing.org/t/rect-animation-android/30809/3 "2021-06-20T09:54:23Z")

</div>

I think what you are trying to achieve is oscilating motion.

Please see

[![](https://img.youtube.com/vi/JLAc9hMtcxk/maxresdefault.jpg "3.6 Graphing Sine Wave - Nature of Code") ](https://www.youtube.com/watch?v=JLAc9hMtcxk)

[![](https://img.youtube.com/vi/NBWMtlbbOag/maxresdefault.jpg "Coding Challenge #159: Simple Pendulum Simulation") ](https://www.youtube.com/watch?v=NBWMtlbbOag)
