Randomizing Images
Moderators: MtnViewJohn, chris, mtnviewmark
Randomizing Images
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.
-
- Posts: 17
- Joined: Sat Jun 11, 2005 5:44 am
- Location: Redwood City, CA
- Contact:
Yes, you can.
Have multiple versions of the same rule. Inside, make the offset for the cirlce different
example, with comments:
you can have something like 3 rules, two of them with .25 and one with .5 . the one with .5 as its randomness setting will be twice as likely to be called as one of the either two, or the odds of hitting it will be 50%
Theres a bit more, but thats the jist of it. unnumbered rules get divided up evenly, numbered rules get the rest
Have multiple versions of the same rule. Inside, make the offset for the cirlce different
example, with comments:
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{}
}
Theres a bit more, but thats the jist of it. unnumbered rules get divided up evenly, numbered rules get the rest