Last active
May 4, 2019 02:38
-
-
Save Vercidium/9cddb4e92638ac33720468ce8a10530e to your computer and use it in GitHub Desktop.
Multiple Arm Layers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Create multiple layers | |
for (int o = 0; o < layers; o++) | |
{ | |
// Create the arms | |
for (int i = 0; i < 100000; i++) | |
{ | |
Vector3 position = GetPoint(); | |
position.Y -= heightMagnitude * Math.Sin(position.Magnitude * heightFrequency); | |
// Colour and store each point | |
... | |
} | |
// Randomise the height magnitude for the next layer | |
// so that each layer follows a different path | |
heightMagnitude *= random.NextDouble(); | |
// 50% chance that the next layer will be flipped vertically | |
if (random.NextDouble() > 0.5) | |
heightMagnitude *= -1; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment