Hidden 11 yrs ago Post by Turtlicious
Raw
OP

Turtlicious

Banned Seen 7 yrs ago

This is a little rundown of how the unicorns are created. It's still based on the previous version of the unicorns, but the basic ideas have not changed.

Different and identical

The problem to make the unicorns distinct, but create the same one when the same hash is given, is actually the easiest one to solve: The hash is just a number (given in hex) that is used to seed the random number generator. Nothing more. If you don't know what that means: Just believe me, it's not a big deal. It just leads to the same random numbers being generated if the same hash is given.

The background

Random color for the sky (with a gradient), random color for the ground, random placement of the horizon, random size and position of the rainbow.

That's it. We keep the background for later.

The basic shape

The basic shape of the unicorn is made of spheres in 3d space. I have created these from the picture of a horse or pony or unicorn (I don't even remember anymore). Anyhow, it's just position and radius for simple spheres, and possibly additional connection information.

For example, the unicorn's face is the connection between the snout (sphere) and the head (sphere). The size of the spheres and the lengths and angles of some connections are chosen randomly, so sometimes we have a long cylindrical face, and sometimes a short and cone-shaped one.

Looks pretty weird, doesn't it? With some color, it starts to make a little sense:

The wavyness of the hair results from the connections not being drawn in straight lines, but following exponential curves with random exponents. The base colors are chosen randomly, with different lightness values for different parts (e.g. the snout sphere has the same hue and saturation as the head sphere, but a different lightness).

Three dimensions

Now we rotate the unicorn around the vertical and horizontal axis. The rotation angles are chosen randomly (although within a certain range; we don't want to see just the unicorns rear end). We also scale the unicorn by a random amount, so that sometimes we see the full animal, sometimes just the head. In this expample, it looks like this:


And behold …

Put the resulting unicorn onto our background, and we're done:
Hidden 11 yrs ago Post by mdk
Raw

mdk 3/4

Member Seen 6 yrs ago

it's technically not a random number. Post is invalid.
Hidden 11 yrs ago Post by Captain Jordan
Raw
Avatar of Captain Jordan

Captain Jordan My other rocket is a car

Member Seen 1 yr ago

mdk said
it's technically not a random number. Post is invalid.


No computer-generated number is ever truly random. However, you can make it uncertain to the point of near-randomness that it gets the job done.

Welcome to the real world where practice > theory.
Hidden 11 yrs ago Post by Awson
Raw
Avatar of Awson

Awson Waiting & Waiting

Member Seen 4 yrs ago

What if Mahz made our unicorns randomly generate from the combination of our usernames and passwords, allowing someone to decode our unicorns and steal our identities!
Hidden 11 yrs ago Post by Jorick
Raw
Avatar of Jorick

Jorick Magnificent Bastard

Member Seen 5 yrs ago

You could have just linked to the explanation page on the site instead of taking the time to copy it all and do the [b] and [img] tags.
Hidden 11 yrs ago Post by Sloth
Raw
Avatar of Sloth

Sloth The Potato Salad of People

Member Seen 2 mos ago

Awson said
What if Mahz made our unicorns randomly generate from the combination of our usernames and passwords, allowing someone to decode our unicorns and steal our identities!


That would make every unicorn unique in order to be properly decoded for the password.

Unless there's some very subtle color changes, I've seen people with duplicate 'corns.
Hidden 11 yrs ago Post by Captain Jordan
Raw
Avatar of Captain Jordan

Captain Jordan My other rocket is a car

Member Seen 1 yr ago

Sloth said
That would make every unicorn unique in order to be properly decoded for the password.Unless there's some very subtle color changes, I've seen people with duplicate 'corns.


Which makes sense, because if this is based on a hash table (probably based on user ID more than username/pass), then even unique identifiers can hash to the same number. Create a hash table of Social Security numbers and you'll likely find many that hash to the same place, unless your hash table is so big as to make it useless (the point is to be small and quick for easy searches).
Hidden 11 yrs ago Post by Awson
Raw
Avatar of Awson

Awson Waiting & Waiting

Member Seen 4 yrs ago

Show me two identical 'corns. I don't believe you.

AND I DON'T CARE IF 90% OF THEM ARE ALL GONE NOW
Hidden 11 yrs ago Post by Turtlicious
Raw
OP

Turtlicious

Banned Seen 7 yrs ago

Jorick said
You could have just linked to the explanation page on the site instead of taking the time to copy it all and do the [b] and [img] tags.


Yeah, but I like doing bbcode :I
Hidden 11 yrs ago Post by Captain Jordan
Raw
Avatar of Captain Jordan

Captain Jordan My other rocket is a car

Member Seen 1 yr ago

Turtlicious said
Yeah, but I like doing bbcode :I


From the cheatsheet: QQCode Cheatsheet (Note: It's much worse than BBCode)
Hidden 11 yrs ago Post by Jorick
Raw
Avatar of Jorick

Jorick Magnificent Bastard

Member Seen 5 yrs ago

Turtlicious said
Yeah, but I like doing bbcode :I


Gross. Get out.
Hidden 11 yrs ago Post by Turtlicious
Raw
OP

Turtlicious

Banned Seen 7 yrs ago

I like doing QQCode then.

:c
Hidden 11 yrs ago Post by Jorick
Raw
Avatar of Jorick

Jorick Magnificent Bastard

Member Seen 5 yrs ago

Turtlicious said
I like doing QQCode then.:c


Jorick said
Gross. Get out.


.
Hidden 11 yrs ago Post by Turtlicious
Raw
OP

Turtlicious

Banned Seen 7 yrs ago

Jorick said
.


if {
QQCode === Like
}

Then {
GetOut
}

if {
GetOut === False
}

???
Hidden 11 yrs ago Post by The Nexerus
Raw
Avatar of The Nexerus

The Nexerus Sui generis

Member Seen 2 yrs ago

Jorick said
You could have just linked to the explanation page on the site instead of taking the time to copy it all and do the [b] and [img] tags.


[2]
Hidden 11 yrs ago Post by natsumehack
Raw

natsumehack

Banned Offline since relaunch

What about when a male unicorn mounts a female one?

This is not how unicorns are made you liar.
Hidden 11 yrs ago Post by Turtlicious
Raw
OP

Turtlicious

Banned Seen 7 yrs ago

The Nexerus said
[2]


var 2 not found
↑ Top
© 2007-2024
BBCode Cheatsheet