Loading...
Logo
Processing Forum
Hi,

Just starting a new sketch, something very simple and i don't understand what's going on.

Here's The code:

Copy code
  1. int numIte = 4;
  2. float offset;

  3. void setup() {
  4.   size(200, 200);
  5.   smooth();
  6.   noStroke();
  7.   background(255);
  8.   noLoop();
  9.   offset = width/numIte;
  10. }
  11. void draw() {
  12.   for (int i=0; i < numIte; i++) {
  13.     noStroke();
  14.     ellipse(offset*i, height/2, 25, 25);
  15.     //println("i :" + i + ", " +(offset)*i);
  16.   }
  17. }
Actually, on my screen i only see 3 red ellipse. The one that sould be located at (0, height/2) isn't draw ?
My current machine is very limited (only 8mo video memory on board, yeah i know...) so i had that kind of strange trouble before.

So is it me, the machine or a processing bug ?
Regards,
O.

Replies(3)

i dont see any ellipse as you miss fill().
but when you add it. i see 4 ellipses :)
i dont see any ellipse as you miss fill().
but when you add it. i see 4 ellipses :)

Ah yes sorry that was a bad copy paste, i deleted the fill by accident, and i got the answer now, that's definitively me that needs more coffee. Thx cedric, sorry for the dumb question
np... maybe less coffee,more sleep? ;)