Bug 752 : bezierVertex YZ Plane fill problem
Last modified: 2008-08-15 18:51




Status:
RESOLVED
Resolution:
INVALID -
Priority:
P2
Severity:
normal

 

Reporter:
pKlopping
Assigned To:
fry

Attachment Type Created Size Actions

Description:   Opened: 2008-03-29 12:01
I have a program that creates three shapes using bezier vertices. The first
is on teh XY plane, the second is on the XZ plane, and the third is on the
YZ plane. The first two fill properly, while the third won't fill at all.

I'm using version 0135 Beta on Mac OS X Leopard

Here's the code that I use for the third shape

//RightFace
beginShape();
vertex(120,10,-110);
vertex(120,10,-10);
vertex(120,110,-10);
vertex(120,110,-35);
bezierVertex(120,110,-35, 120,35,-35, 120,35,-110);
vertex(120,35,-110);
vertex(120,10,-110);
endShape();

and here's a link to the applet
http://au70server.dyn-o-saur.com/BezierBroke/applet/
with the full code at
http://au70server.dyn-o-saur.com/BezierBroke/applet/BezierBroke.pde
Additional Comment #1 From fry 2008-04-04 19:26
odd, thought we had this fixed with bug #547. i'll have to check into it.
Additional Comment #2 From fry 2008-08-15 18:51
On a closer look, the sequence of commands is not correct.

In these two lines:
vertex(120,110,-35);
bezierVertex(120,110,-35, 120,35,-35, 120,35,-110);
you shouldn't double up the (120,110,-35) point by including it again in
bezierVertex.

You should also never double points at the end, use endShape(CLOSE) instead.

So this is closer to what you're trying to do:

beginShape();
vertex(120,10,-110);
vertex(120,10,-10);
vertex(120,110,-10);
vertex(120,110,-35);
bezierVertex(120,35,-35, 120,35,-35, 120,35,-110);
endShape(CLOSE);

But the bottom line is that you can't really do arbitrary geometry like
this in 3D space unless you make it mathematically exactly coplanar--which
you won't get with bezierVertex().

Which is a long way of saying that to do this, you should be drawing a flat
shape, but first using the rotate function to move it into place.