Stargen.Net
1.0.0.1
dotnet add package Stargen.Net --version 1.0.0.1
NuGet\Install-Package Stargen.Net -Version 1.0.0.1
<PackageReference Include="Stargen.Net" Version="1.0.0.1" />
<PackageVersion Include="Stargen.Net" Version="1.0.0.1" />
<PackageReference Include="Stargen.Net" />
paket add Stargen.Net --version 1.0.0.1
#r "nuget: Stargen.Net, 1.0.0.1"
#:package Stargen.Net@1.0.0.1
#addin nuget:?package=Stargen.Net&version=1.0.0.1
#tool nuget:?package=Stargen.Net&version=1.0.0.1
Stargen.Net
Stargen.Net is a rewrite of StarformNET but with significant stuff mostly copy/pasted or renamed. I tried to make the whole thing more modern by removing most of the artifacts from the C port (e.g. cross referenced static classes, fields instead of properties etc.). I also modernized the output classes to use UnitsNet for all values, as the values used in the original where the units Dole used for the accrete simulation.
How to use
The most basic use is this:
var system = SystemGenerator.GenerateSystem();
this will generate a random stellar system with a random seed.
To more finely control the generation parameters you can use
var system = SystemGenerator.GenerateSystem(new Generation.GenerationOptions()
{
DustDensityCoefficient = 0.0015,
CloudEccentricity = 0.25,
GasDustRatio = 50,
Alpha = 5,
N = 3,
InnerDustLimit = 0,
Seed = 1337
});
All properties have some more or less detailed instructions in what they do. If you want to go deeper, I referenced Dole's names for these values.
These values are the default values used (aside from the seed).
When generation 10.000 systems with this seed (1337) you get:
- 2310 habitable planets (~23% of systems)
- 204 earthlike planets (~2% of systems)
- 29282 planets with moons
Why?
I'm creating a game where I was in need of a somewhat fast and somewhat realistic star system generator. I tried using the original accrete but parsable outputs were lacking and I could not use the HTML output. I stumbled upon StarformNET, but it's last update was 7 years ago and was also written for .NET Framework, so it lacked some of the more "modern" .NET stuff. Initially I only ported it to .NET Standard but soon realized that I had more ideas to improve it.
What it is and what it isn't
The original Accrete simulation is from 1970, so the sciency stuff is propably mostly out of date. So this library does NOT create completely realistic star systems. It does however create plausible systems - and that's what I needed and why I did this rewrite.
I make no guarantees that the whole accrete simulation is perfectly implemented but I tried to cross reference Stephen H. Doles Paper Formation of Planetary Systems by Aggregation: A Computer Simulation as much as possible, although the original StarformNET did this too. I updated some values and tried to comment most of the simulation parameters so you can understand what each of them does.
Credits
As previously stated, most of the actual simulation stuff was copied from StarformNET, I just made minor adjustments and fixes. As so I will also copy the credits of StarformNET:
Starform.NET's core is a direct port of Jim Burrows' StarGen. The original readme and credits from that version are included in this repository as StarGen-ReadMe.txt and StarGen-Credits.txt. The StarGen-Credits.txt file contains a more complete history of all of the authors who have contributed to Accrete/Starform/StarGen as well as a bibliography for the papers and books used to design it.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. 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 Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.1 is compatible. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.1
- UnitsNet (>= 5.75.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.