├── LICENSE ├── PhysicsCalculator.java ├── README.md └── xyz.nisarga.PhysicsCalculator.aix /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Nisarga Adhikary 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /PhysicsCalculator.java: -------------------------------------------------------------------------------- 1 | package xyz.nisarga.PhysicsCalculator; 2 | 3 | // Author- Nisarga Adhikary (adhikarynisarga17@gmail.com) 4 | import com.google.appinventor.components.annotations.*; 5 | import com.google.appinventor.components.runtime.*; 6 | import com.google.appinventor.components.common.*; 7 | 8 | @DesignerComponent(version = 1, // Extension Version 9 | description = "PhysicsCalculator extension for MIT AI2 & it's distros by Nisarga Adhikary . ", 10 | category = ComponentCategory.EXTENSION, 11 | nonVisible = true, 12 | iconName = "images/extension.png") 13 | @SimpleObject(external = true) 14 | public class PhysicsCalculator extends AndroidNonvisibleComponent { 15 | 16 | public PhysicsCalculator(ComponentContainer container) { 17 | super(container.$form()); 18 | } 19 | 20 | @SimpleFunction(description = "Calculate Density") 21 | public int CalculateDensity (int mass, int volume) { 22 | return mass * 1/volume; 23 | 24 | } 25 | @SimpleFunction(description = "Calculate Volume") 26 | public int CalculateVolume (int mass, int density) { 27 | return mass * 1/density; 28 | 29 | } 30 | @SimpleFunction(description = "Calculate Mass") 31 | public int CalculateMass (int density, int volume) { 32 | return density * volume; 33 | 34 | } 35 | @SimpleFunction(description = "Calculate Speed") 36 | public int CalculateSpeed (int distance, int time) { 37 | return distance * 1/time; 38 | 39 | } 40 | @SimpleFunction(description = "Calculate Distance") 41 | public int CalculateDistance (int time, int speed) { 42 | return time * speed; 43 | 44 | } 45 | @SimpleFunction(description = "Calculate Acceleration") 46 | public int CalculateAcceleration (int InitialVelocity, int FinalVelocity, int Time) { 47 | return (FinalVelocity - InitialVelocity) * 1/Time; 48 | 49 | } 50 | @SimpleFunction(description = "CalculateRetardation") 51 | public int CalculateRetardation (int InitialVelocity, int FinalVelocity, int Time) { 52 | return (InitialVelocity - FinalVelocity) * 1/Time; 53 | 54 | } 55 | @SimpleFunction(description = "CalculateForce") 56 | public int CalculateForce (int mass, int acceleration) { 57 | return mass * acceleration; 58 | 59 | } 60 | @SimpleFunction(description = "CalculatePressure") 61 | public int CalculatePressure (int force, int area) { 62 | return force * 1/area; 63 | 64 | } 65 | @SimpleFunction(description = " Calculate Heat Absorbed By An Object ") 66 | public int CalculateHeatAbsorbed (int MassOfObject, int RelativeHeat, int ChangeOfTemperature) { 67 | return MassOfObject * RelativeHeat * ChangeOfTemperature; 68 | 69 | } 70 | @SimpleFunction(description = " Calculate Power ") 71 | public int CalculatePower (int Workdone, int time) { 72 | return Workdone * 1/time; 73 | 74 | } 75 | @SimpleFunction(description = " CalculateWorkdone ") 76 | public int CalculateWorkdone (int Force, int Displacement) { 77 | return Force * Displacement; 78 | 79 | } 80 | @SimpleFunction(description = " CalculateKineticEnergy ") 81 | public int CalculateKineticEnergy (int mass, int velocity) { 82 | return 1/2 * mass * velocity * velocity; 83 | 84 | } 85 | @SimpleFunction(description = " CalculateKineticEnergy ") 86 | public int CalculateGravitationalPotentialEnergy (int mass, int G, int height) { 87 | return mass * G * height; 88 | 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # PhysicsCalculator Extension 2 | PhysicsCalculator Extension which is built for MIT App Inventor 2 and also works fine with it's other distributions like Kodular, Niotron etc. This extension is a test extension originally built for learning purposes and it helps you solve equations and problems related to Physics easily with just one block. For support, documentation and other stuff please check [this](https://community.appinventor.mit.edu/t/free-open-source-physicscalculator-extension/26382). 3 | -------------------------------------------------------------------------------- /xyz.nisarga.PhysicsCalculator.aix: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ni5arga/PhysicsCalculator/3d5a102c963aa5a1fdc82c43509174fc69873566/xyz.nisarga.PhysicsCalculator.aix --------------------------------------------------------------------------------