Juggling motion in PowerApps #1

4509 단어 PhysicsPowerApps

Juggling challenge in PowerApps



@that_API_guy casted who can make juggling apps in PowerApps.
I have implmented such app including natural effects of gravity and air resistance.
Here, the detail of its physical modeling and implementation into PowerApps will be represented.

#PowerAppsJuggleChallenge 라는 것이 있었기 때문에 만들어 보았습니다. htps // t. 코 / ゔ ㅁ YXrSZ 피 c. 라고 r. 코 m / 8GWLF wJ W — 나가친 (@mofumofu_dance) 10월 19, 2018


Simplify the motion of juggled ball



In order to implement time development of juggled ball, first need to simplify a trajectory of ball.



In my app, trajectory of ball is devided into (mainly) two equation of motions.

1. Projectile with Air resistance and initial velocity

2. Simple circular motion, representing handling of ball





There are given analytic expression for ball trajectory and naturally include gravity and air resistance, and represent juggler's motion.



Motion of Projectile



For the detail of physical analysis, See Wikipedia .





Now, we can implement this motion into PowerApps.

First, insert circle icon and Timer control into canvas app(no need to set orientation to landscape).

Next, set X property and Y property of icon as




Image1.X

X0+ (Velocity_x/Friction)* (1-Exp(-1*Friction * Timer1.Value/1000))




Image1.Y

Y0-(Velocity_y/Friction)*(1+Gravity/(Friction*Velocity_y)) * (1-Exp(-1*Friction * Timer1.Value/1000)) + Gravity * Timer1.Value/1000/Friction



Note that minus sign prior to (Velocity_y/Friction) is due to special coordinate system (i.e., Y value becomes larger as it goes bottom of display).



Here, some global/context variables {X0, Y0, Velocity_x, Velocity_y, Friction, Gravity} are given by some text input controlls or directly set in OnVisible action (They are BASICALLY arbitrary parameter) .



<script async=""src="https://platform.twitter.com/widgets.js"/>

In this tweet, I have chosen parameters as {X0, Y0, Gravity} = {170, 500, 500}

Next Post: Explain Circular motion and restriction for parameters




좋은 웹페이지 즐겨찾기