ProjSimBlueEngine 1.1.0
dotnet add package ProjSimBlueEngine --version 1.1.0
NuGet\Install-Package ProjSimBlueEngine -Version 1.1.0
<PackageReference Include="ProjSimBlueEngine" Version="1.1.0" />
<PackageVersion Include="ProjSimBlueEngine" Version="1.1.0" />
<PackageReference Include="ProjSimBlueEngine" />
paket add ProjSimBlueEngine --version 1.1.0
#r "nuget: ProjSimBlueEngine, 1.1.0"
#:package ProjSimBlueEngine@1.1.0
#addin nuget:?package=ProjSimBlueEngine&version=1.1.0
#tool nuget:?package=ProjSimBlueEngine&version=1.1.0
Projictile Simulator Blue Engine
A .NET ballistics library providing closed-form analytical solutions for projectile motion under three drag models: no drag, linear drag, and quadratic drag. Designed for simulation, education, and engineering applications.
Installation
dotnet add package ProjSimBlueEngine
Or via the NuGet Package Manager in Visual Studio:
Install-Package ProjSimBlueEngine
Target framework: .NET 10.0
Physics Background
Coordinate System
The engine uses a standard 2D Cartesian coordinate system where X is horizontal and Y is vertical (positive upward). The projectile is launched from an initial position with a given speed and angle from the horizontal.
Drag Models
No Drag
The classical kinematic equations apply — gravity is the only acting force.
Linear Drag
Drag force is proportional to velocity. The X and Y motion equations decouple cleanly, allowing exact closed-form solutions for both position and velocity at any time t.
Quadratic Drag
Drag force is proportional to the square of speed. The ascending and descending phases are solved separately with distinct closed-form solutions. As time approaches infinity, vertical velocity converges to the terminal velocity.
Wind Model
A constant wind force at a given angle contributes constant acceleration components superimposed on the drag model equations.
API Reference
Constructors
No Drag / Linear Drag
Dim ball As New Ballistics(X0, Y0, Mass, b, V0, AngleDegrees)
Quadratic Drag
Dim ball As New QuadraticDragBallistics(X0, Y0, Mass, b, V0, AngleDegrees)
| Parameter | Type | Description |
|---|---|---|
X0 |
Double | Initial horizontal position (m) |
Y0 |
Double | Initial vertical position (m) |
Mass |
Double | Projectile mass (kg) |
b |
Double | Drag coefficient (kg/m for quadratic, kg/s for linear) |
V0 |
Double | Initial speed (m/s) |
AngleDegrees |
Double | Launch angle from horizontal (degrees) |
Methods
| Method | Returns | Description |
|---|---|---|
GetXPosition(t) |
Double | Horizontal position at time t (m) |
GetYPosition(t) |
Double | Vertical position at time t (m) |
GetVx(t) |
Double | Horizontal velocity at time t (m/s) |
GetVy(t) |
Double | Vertical velocity at time t (m/s) |
GetFlightTime() |
Double | Total time of flight until landing (s) |
GetMaxHeight() |
Double | Maximum vertical position reached (m) |
GetTerminalVelocity() |
Double | Terminal velocity (m/s) |
CalculatePeakTime() |
Double | Time at which vertical velocity reaches zero (s) |
Usage Examples
C#
using ProjSimBlueEngine;
var ball = new QuadraticDragBallistics(
x0: 0, y0: 0,
mass: 1.0,
b: 0.1,
v0: 12.0,
angleDegrees: 45.0
);
double flightTime = ball.GetFlightTime();
double dt = 0.01;
for (double t = 0; t <= flightTime; t += dt)
{
double x = ball.GetXPosition(t);
double y = ball.GetYPosition(t);
Console.WriteLine($"t={t:F2}s x={x:F3}m y={y:F3}m");
}
Console.WriteLine($"Max height: {ball.GetMaxHeight():F4} m");
Console.WriteLine($"Terminal velocity: {ball.GetTerminalVelocity():F4} m/s");
Console.WriteLine($"Flight time: {ball.GetFlightTime():F4} s");
VB.NET
Dim ball As New QuadraticDragBallistics(0, 0, 1.0, 0.1, 12.0, 45.0)
Dim flightTime As Double = ball.GetFlightTime()
Dim t As Double = 0
Do While t <= flightTime
Console.WriteLine($"x={ball.GetXPosition(t):F3} y={ball.GetYPosition(t):F3}")
t += 0.01
Loop
License
MIT License. See LICENSE for details.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Framework | net48 is compatible. net481 was computed. |
-
.NETFramework 4.8
- No dependencies.
-
net10.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
-NEW FEATURE: Collision detection is now available for the three models.
-Added support for .NET Framework 4.8 .