Announcement

Collapse
No announcement yet.

drawing random circles

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • cat82
    replied


    great, that worked a treat. see daft things like forgetting intergers are signed is just my lack of experiance.

    thanks a lot.

    Leave a comment:


  • ESPsupport
    replied


    You will end up with -ve numbers like that. Try

    gfx_Circle(ABS(RAND()%160), ABS(RAND()%128), ABS(RAND()%32), CYAN);

    Leave a comment:


  • cat82
    started a topic drawing random circles

    drawing random circles

    Hi folks,

    I have written this practice code:

    repeat gfx_Circle(RAND()%160, RAND()%128, RAND()%32, CYAN); pause(3000); gfx_Cls();forever

    the idea is to draw a circle of random position and radius within the limits of the screen (hence 160 and 120).

    With the text as it is it doesn't always print a circle (or at least it isn't visible on the screen) and sometimes it only prints out 4 dots at the points of a compus.

    Can anyone tell me what is wrong with the code and explain why this doesn't work? I am very new to programming so I appologise now if I ask lots of stupid questions.
Working...
X