Issue while using Bezier() function on MAC OSX Mavericks (processing 2.0)

Hi,

I am trying to use the bezier() function and I get this error.

"vertex() with x, y, and z coordinates can only be used with a renderer that supports 3D, such as P3D or OPENGL. Use a version without a z-coordinate instead. bezierVertex() with x, y, and z coordinates can only be used with a renderer that supports 3D, such as P3D or OPENGL. Use a version without a z-coordinate instead."

My code looks like this,

 void setup() 
        {
         size(640, 360);
          smooth();
          frameRate(30);
        }
void draw()
{
 background(255);
 drawRiverBoundary2();
}


void drawRiverBoundary2(){
  smooth();
  noFill();
  stroke(255, 102, 0);
  bezier(100,180,180,180,280,210,400,210,420,210,420,210);
}

Is this a known issue? I could find anything on github or even in the forum. Please help me fix this.

I followed the documentation here, http://processing.org/reference/bezier_.html .

Answers

  • Fixed it by making following changes,

        void setup() 
        {
    **    size(640, 360,P3D);
          smooth();
          frameRate(30);
        }
    
        void draw()
        {
         background(255);
         drawRiverBoundary2();
        }
    
    
        void drawRiverBoundary2(){
          smooth();
          noFill();
          stroke(255, 102, 0);
          // changed the arguments to match definition on the bezier function page
    **      bezier(100,180,180,180,280,210,400,210,420,210,420,210); 
        }
    
Sign In or Register to comment.