We are about to switch to a new forum software. Until then we have removed the registration on this forum.
i'm trying to build a system which starts begins with an ellipse in the centre of the page, and from that a number of lines grow in different directions. once each line is complete, an ellipse would form and the thing would grow large. i have attempted this a few times and quit in a rage. if anyone could show me how to loop lines growing in randomly set directions, so i can learn what is going on, that would be awesome.
i apologise for my lack of capitalisation, my keyboard is broken...
cheers.
Answers
You can change screen origin coordinates from (0,0) to center of screen w/ ->
translate(width>>1, height>>1);
. 8-Xfor random directions just pick a random angle between 0 and TWO_PI and then the direction is just length * cos(angle) in the x, length * sin(angle) in the y.
Something like this: [code edited] thanks koogs
logical error in line 37?
Ops, corrected. thanks. As the width and height were the same, I missed it.
You posted in Questions about Code, but didn't show any code!
Please, read the Category descriptions. Thanks. (Moved.)
not reading the replys so far
this stores the winning possibilities as String
and takes this apart and uses it as index for the field
it counts the fields per row and if it's == 3, he won
from http://www.openprocessing.org/sketch/29501
A much shorter and efficient alternative to snippet integerFromChar(): 3:-O
P.S.: Oops. After refreshing, seen koogs' got same solution already! :O)