Iβm excited to share my new extension, ScienceUtils! This extension provides a wide range of scientific calculations and functions to help with various scientific and physics problems.
Key Features
Conversions:
- Radians to Degrees
- Degrees to Radians
- Celsius to Fahrenheit
- Fahrenheit to Celsius
- Celsius to Kelvin
- Kelvin to Celsius
- Fahrenheit to Kelvin
- Kelvin to Fahrenheit
Geometric Calculations:
- Area of a Circle
- Circumference of a Circle
- Area of a Rectangle
- Area of a Triangle
- Volume and Surface Area of 3D Shapes (Cone, Sphere, Cylinder, Pyramid, Wedge, etc.)
- Area of a Parallelogram, Trapezoid, and Ellipse
- Distance Between Two Points (2D and 3D)
Physics Calculations:
- Gravitational Force
- Escape Velocity
- Period of a Pendulum
- Force of Friction
- Pressure, Kinetic Energy, Potential Energy, Work Done, Power, Acceleration, Momentum, Impulse
- Centripetal Force
- Orbital Period of a Satellite
- Lorentz Factor, Time Dilation, Length Contraction in Special Relativity
- Angle of Incidence and Refraction in Optics
- Photon Energy, Frequency, and Wavelength Calculations
Blocks Overview
Function | Parameters | Description |
---|---|---|
RadiansToDegrees |
radians (double) |
Convert radians to degrees |
DegreesToRadians |
degrees (double) |
Convert degrees to radians |
CelsiusToFahrenheit |
celsius (double) |
Convert Celsius to Fahrenheit |
FahrenheitToCelsius |
fahrenheit (double) |
Convert Fahrenheit to Celsius |
CelsiusToKelvin |
celsius (double) |
Convert Celsius to Kelvin |
KelvinToCelsius |
kelvin (double) |
Convert Kelvin to Celsius |
FahrenheitToKelvin |
fahrenheit (double) |
Convert Fahrenheit to Kelvin |
KelvinToFahrenheit |
kelvin (double) |
Convert Kelvin to Fahrenheit |
AreaOfCircle |
radius (double) |
Calculate the area of a circle |
CircumferenceOfCircle |
radius (double) |
Calculate the circumference of a circle |
AreaOfRectangle |
length , width (double) |
Calculate the area of a rectangle |
AreaOfTriangle |
base , height (double) |
Calculate the area of a triangle |
VolumeOfCone |
radius , height (double) |
Calculate the volume of a cone |
SurfaceAreaOfSphere |
radius (double) |
Calculate the surface area of a sphere |
VolumeOfSphere |
radius (double) |
Calculate the volume of a sphere |
SurfaceAreaOfCylinder |
radius , height (double) |
Calculate the surface area of a cylinder |
VolumeOfCylinder |
radius , height (double) |
Calculate the volume of a cylinder |
AreaOfTrapezoid |
base1 , base2 , height (double) |
Calculate the area of a trapezoid |
AreaOfEllipse |
majorAxis , minorAxis (double) |
Calculate the area of an ellipse |
VolumeOfPyramid |
baseArea , height (double) |
Calculate the volume of a pyramid |
SurfaceAreaOfCone |
radius , slantHeight (double) |
Calculate the surface area of a cone |
AreaOfParallelogram |
base , height (double) |
Calculate the area of a parallelogram |
VolumeOfTetrahedron |
edgeLength (double) |
Calculate the volume of a tetrahedron |
SurfaceAreaOfParallelepiped |
length , width , height (double) |
Calculate the surface area of a parallelepiped |
AreaOfRegularPolygon |
sideLength , numberOfSides (double, int) |
Calculate the area of a regular polygon |
SurfaceAreaOfTorus |
majorRadius , minorRadius (double) |
Calculate the surface area of a torus |
VolumeOfFrustum |
radius1 , radius2 , height (double) |
Calculate the volume of a frustum |
LateralSurfaceAreaOfCone |
radius , slantHeight (double) |
Calculate the lateral surface area of a cone |
VolumeOfWedge |
length , width , height (double) |
Calculate the volume of a wedge |
SurfaceAreaOfWedge |
length , width , height (double) |
Calculate the surface area of a wedge |
AreaOfSector |
radius , angleInDegrees (double) |
Calculate the area of a sector |
LateralSurfaceAreaOfCylinder |
radius , height (double) |
Calculate the lateral surface area of a cylinder |
VolumeOfRectangularPrism |
length , width , height (double) |
Calculate the volume of a rectangular prism |
LateralSurfaceAreaOfPyramid |
basePerimeter , slantHeight (double) |
Calculate the lateral surface area of a pyramid |
DistanceBetweenPoints2D |
x1 , y1 , x2 , y2 (double) |
Calculate the distance between two points in 2D |
DistanceBetweenPoints3D |
x1 , y1 , z1 , x2 , y2 , z2 (double) |
Calculate the distance between two points in 3D |
Density |
mass , volume (double) |
Calculate the density of an object |
GravitationalForce |
mass1 , mass2 , distance (double) |
Calculate the gravitational force between two masses |
EscapeVelocity |
mass , radius (double) |
Calculate the escape velocity from a celestial body |
PeriodOfPendulum |
length , gravity (double) |
Calculate the period of a pendulum |
ForceOfFriction |
normalForce , coefficientOfFriction (double) |
Calculate the force of friction |
Pressure |
force , area (double) |
Calculate the pressure exerted by a force |
KineticEnergy |
mass , velocity (double) |
Calculate the kinetic energy of an object |
PotentialEnergy |
mass , height , gravity (double) |
Calculate the potential energy of an object |
WorkDone |
force , distance (double) |
Calculate the work done by a force |
Power |
workDone , time (double) |
Calculate the power generated by work done |
Acceleration |
initialVelocity , finalVelocity , time (double) |
Calculate the acceleration of an object |
Momentum |
mass , velocity (double) |
Calculate the momentum of an object |
Impulse |
force , time (double) |
Calculate the impulse applied to an object |
CentripetalForce |
mass , velocity , radius (double) |
Calculate the centripetal force acting on an object |
OrbitalPeriod |
semiMajorAxis , mass (double) |
Calculate the period of a satellite orbiting a body |
LorentzFactor |
velocity , speedOfLight (double) |
Calculate the Lorentz factor for an object moving at a given velocity |
TimeDilation |
properTime , velocity , speedOfLight (double) |
Calculate time dilation in special relativity |
LengthContraction |
properLength , velocity , speedOfLight (double) |
Calculate length contraction in special relativity |
AngleOfIncidence |
angleOfRefraction , refractiveIndex1 , refractiveIndex2 (double) |
Calculate the angle of incidence based on Snellβs Law |
AngleOfRefraction |
angleOfIncidence , refractiveIndex1 , refractiveIndex2 (double) |
Calculate the angle of refraction based on Snellβs Law |
PhotonEnergy |
frequency , wavelength (double) |
Calculate the energy of a photon |
PhotonFrequency |
energy , wavelength (double) |
Calculate the frequency of a photon |
PhotonWavelength |
energy , frequency (double) |
Calculate the wavelength of a photon |
Technical Details
- Temporary Name: ScienceUtils is just a placeholder. Please suggest a better name if you have any ideas!
- No Imports Used: This extension is built using only basic Java functions for calculations, such as
Math.toDegrees()
,Math.sqrt()
, andMath.pow()
. - Formulas: All calculations are based on researched formulas. Suggestions for improvements and bug reports are welcome!
Feel free to try it out and let me know your feedback. Iβm eager to hear your thoughts and ideas!
Download the Extension: ScienceUtils.aix (13.3 KB)