Randomizing Images
Posted: Mon Oct 17, 2005 12:22 am
Is it possible to make randomized images? So for example you just fill an image with a load of dots but each time you render they are randomized and in a different place.
~A discussion of the program Context Free and the CFDG language~
https://www.contextfreeart.org/phpbb/
https://www.contextfreeart.org/phpbb/viewtopic.php?f=4&t=297
Code: Select all
startshape lotsadots
//each of these are different, but have the same name.
//these all have the same odds of being used for a call
//of lotsadots{}
rule lotsadots {
CIRCLE{}
lotsadots { x -1 y -3 }
}
rule lotsadots {
CIRCLE{}
lotsadots { x 1 y 2 }
}
rule lotsadots {
CIRCLE{}
lotsadots { x -2 y 3 }
}
rule lotsadots {
CIRCLE{}
lotsadots { x 1 y -2 }
}
//this is our end case aka base case, it
//will not make any more calls, ending
//the program
//the numbers at the top represent the
//odds of it being called
rule lotsadots .01 {
CIRCLE{}
}