Skip to content

Instantly share code, notes, and snippets.

@Vercidium
Last active May 4, 2019 01:21
Show Gist options
  • Save Vercidium/b1d2a1dd3ec7faaf32294be4e6ac8c22 to your computer and use it in GitHub Desktop.
Save Vercidium/b1d2a1dd3ec7faaf32294be4e6ac8c22 to your computer and use it in GitHub Desktop.
Generating Galaxy Axis from Stars
var v = GetPoint();
// Add some variance to each star
v += NextV3(-0.5, 0.5);
// Shift stars vertically as they get closer to the center of the galaxy
var s = beamHeight / v.Magnitude;
v.Y = Next(-s, s);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment