Juggling motion in PowerApps #1
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
X0+ (Velocity_x/Friction)* (1-Exp(-1*Friction * Timer1.Value/1000))
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"/>This is simulation for the effect of air resistance in #PowerApps 피 c. 라고 r. 코 m / 에 BDHT8S 쿠아
— 나가친 (@mofumofu_dance) 10월 20, 2018
In this tweet, I have chosen parameters as {X0, Y0, Gravity} = {170, 500, 500}
Next Post: Explain Circular motion and restriction for parameters
Reference
이 문제에 관하여(Juggling motion in PowerApps #1), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/h-nagao/items/0fc22b2b9e1723570d4f텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념 (Collection and Share based on the CC Protocol.)