I am writing some code to generate 2D polygonal creatures based on 2 arguments: number of edges and a seed. Using the seed and the iterative function, i generate a sequence of radius which defines the position of the corners of the polygon (rotating them around the "center" of the creature). Seed and number of edges will be part of the "genetic code" of the creature, small difference should result in small changes.
- So what i would need is something that takes and argument between 0 and 1 and returns a number between 0 and 1.
- AND for close seeds (i.e. 0.2399 and 0.2400) the output numbers should be close too (but not simply shifted)
- Lastly, a linear combination of seeds should give a linear combination of results(or at least something close to it)
Do you know any function like this? It does not have to be a super good pseudo random generator (point 3 would be nice but not essential)