Computer Science Canada Need Help |
Author: | CyCLoBoT [ Fri Feb 14, 2003 11:38 am ] | ||
Post subject: | Need Help | ||
I would like to draw random circles in this 10x10 box. Any suggestions on how I can do that?
|
Author: | Tony [ Fri Feb 14, 2003 3:17 pm ] |
Post subject: | |
you can use randint(x,1,10) and randint(y,1,10) to randomly select a box to draw in... then you multiply each value by your box width (i assume 30) and add boarder size... thats the center of the circle you have to draw. |
Author: | CyCLoBoT [ Sat Feb 15, 2003 3:16 am ] |
Post subject: | |
I tried it but was unable to draw the circles. If anyone can try to code it, I would really appreciate it. |
Author: | Tony [ Sat Feb 15, 2003 8:02 am ] |
Post subject: | |
umm... did you try drawfilloval(x,y,xRadius,yRadius,color) ? your xRadius and yRadius are 15 and you randomly select x and y using randint() |
Author: | CyCLoBoT [ Sat Feb 15, 2003 3:37 pm ] |
Post subject: | |
The thing is that I want to in a way that everytime the user runs the program it draws 5 circles randomly in any one of the squares of 10x10 grid. |
Author: | Tony [ Sat Feb 15, 2003 4:31 pm ] |
Post subject: | |
so randomly select a square and draw a circle in there... I fail to see what you need help with. Please be more specific |
Author: | CyCLoBoT [ Sun Feb 16, 2003 1:55 am ] |
Post subject: | |
I have drawn the 10x10 boxes with lines. So how do I know which box to randomly select and put a circle in that particular box. |
Author: | Izzy [ Sun Feb 16, 2003 2:25 am ] | ||
Post subject: | |||
Here'yar
- Izzy *Edited to add programmers comments (sorry forgot)* *Edited again... lol. wrong programmers comment meathod (used ' instead of %) gimme a break i've been using other languages * |
Author: | Tony [ Sun Feb 16, 2003 5:58 am ] |
Post subject: | |
mmm.... VB if anyone sees me using // for comments, thats from C++ |
Author: | CyCLoBoT [ Mon Feb 17, 2003 1:43 am ] |
Post subject: | |
thank you all for your help. I really appreciate it |