[ { "name": "Temperature converter", "description": "Example of simple formula, just unit conversion", "input": [ {"name": "Input", "unit": "Kelvin" } ], "output": {"name": "Output", "unit": "Kelvin" }, "d4rtCode": "Output = Input;", "tags": ["converter", "temperature" ] }, // Free fall distance (vertical) { "name": "Free Fall Distance", "description": r""" Calculates vertical displacement under constant gravity $$h = \\frac{1}{2}gt^2$$ Where: - $g$: Gravitational acceleration ($9.81\\ \\mathrm{m/s^2}$ on Earth) - $t$: Time in free fall (seconds) ![Free Fall Diagram](https://altcalculator.com/wp-content/uploads/2023/08/Free-Fall.png)""", "input": [ {"name": "t", "unit": "second"}, // Time in seconds {"name": "g", "unit": "meters per second"} // Gravitational acceleration ], "output": {"name": "h", "unit": "meter"}, // Height in meters "d4rtCode": "h = 0.5 * g * pow(t, 2);", "tags": ["physics", "kinematics"] }, // Newton's Law of Universal Gravitation { "name": "Gravitational Force", "description": r''' Newton's law of universal gravitation \(F = G\\frac{m_1m_2}{r^2}\) Where: - $G$: Gravitational constant ($6.674\\times 10^{-11}\\ \\mathrm{N\\cdot m^2/kg^2}$) - $m_1, m_2$: Masses of two objects - $r$: Distance between centers of masses ![Gravitation](https://upload.wikimedia.org/wikipedia/commons/thumb/3/33/NewtonsLawOfUniversalGravitation.svg/1200px-NewtonsLawOfUniversalGravitation.svg.png)''', "input": [ {"name": "m1", "unit": "kilogram"}, // Mass 1 {"name": "m2", "unit": "kilogram"}, // Mass 2 {"name": "r", "unit": "meter"} // Distance between masses ], "output": {"name": "F", "unit": "newton"}, // Force in newtons "d4rtCode": "F = (6.67430e-11 * m1 * m2) / pow(r, 2);", "tags": ["physics", "astronomy", "gravity"] }, // Kinetic Energy { "name": "Kinetic Energy", "description": r''' Energy possessed by a moving object $$KE = \\frac{1}{2}mv^2$$ Where: - $m$: Mass of object - $v$: Velocity of object ![Kinetic Energy](https://upload.wikimedia.org/wikipedia/commons/thumb/4/44/Kinetic_energy.svg/1200px-Kinetic_energy.svg.png)''', "input": [ {"name": "m", "unit": "kilogram"}, // Mass {"name": "v", "unit": "meters per second"} // Velocity ], "output": {"name": "KE", "unit": "joule"}, // Energy in joules "d4rtCode": "KE = 0.5 * m * pow(v, 2);", "tags": ["physics", "energy", "mechanics"] }, // Projectile Motion Range { "name": "Projectile Range", "description": r"""Calculates horizontal distance of projectile motion $$R = \\frac{v^2 \\sin(2\\theta)}{g}$$ Where: - $v$: Initial velocity - $\\theta$: Launch angle - $g$: Gravitational acceleration ![Projectile Motion](https://upload.wikimedia.org/wikipedia/commons/thumb/5/52/Projectile_motion_diagram.png/800px-Projectile_motion_diagram.png)""", "input": [ {"name": "v", "unit": "meters per second"}, // Initial velocity {"name": "a", "unit": "degree"} // Launch angle ], "output": {"name": "R", "unit": "meter"}, // Horizontal distance "d4rtCode": """ var radians = a * (pi / 180); R = (pow(v, 2) * sin(2 * radians)) / 9.80665; """, "tags": ["physics", "kinematics", "projectile"] }, { "name": "Newton's Second Law", "description": r''' Force equals mass times acceleration $$F = m \\cdot a$$ Where: - $m$: Mass of object ($\\mathrm{kg}$) - $a$: Acceleration ($\\mathrm{m/s^2}$) ![Newton's Second Law](https://upload.wikimedia.org/wikipedia/commons/thumb/7/73/Newtonslawsofmotion.jpg/800px-Newtonslawsofmotion.jpg)''', "input": [ {"name": "m", "unit": "kilogram"}, // Mass {"name": "a", "unit": "meters per square second"} // Acceleration ], "output": {"name": "F", "unit": "newton"}, // Force in newtons "d4rtCode": "F = m * a;", "tags": ["physics", "mechanics", "newton"] }, // Apgar Score { "name": "Apgar Score", "description": "Newborn health assessment scoring system\n\nScores 0-2 for:\n1. Heart rate\n2. Breathing\n3. Muscle tone\n4. Reflexes\n5. Skin color\nTotal score 0-10", "input": [ {"name": "HeartRate", "unit": "integer"}, {"name": "Breathing", "unit": "integer"}, {"name": "MuscleTone", "unit": "integer"}, {"name": "Reflexes", "unit": "integer"}, {"name": "SkinColor", "unit": "integer"} ], "output": {"name": "Result", "unit": "Apgar score"}, "d4rtCode": """ var total = HeartRate + Breathing + MuscleTone + Reflexes + SkinColor; var interpretation = switch (total) { >= 7 => 'Normal', 4-6 => 'Requires attention', _ => 'Emergency care needed' }; Result = 'Score: \$total - \$interpretation'; """, "tags": ["medical", "pediatrics", "assessment"] } ]