How to draw a curve in 3d space with WEBGL

Greetings all.

Reading a thread here: https://github.com/processing/p5.js/issues/1402 it seems curveVertex() isn't implemented in webgl, or wasn't as at May 2016.

So, is there any other way I can draw a curve, given a series of vertices in 3d space?

Regards.

Tagged:

Answers

  • Answer ✓

    It says in that link that curve () and bezier () are both implemented. Will they do?

  • rghrgh
    edited February 2017

    Thanks Koogs. Although the documentation for curve

    https://p5js.org/reference/#/p5/curve

    makes no mention of it, the 3D implementation, taking 12 parameters

    curve(x1,y1,z1,x2,y2,z2,x3,y3,z3,x4,y4,z4)

    does indeed seem to work.... sometimes!

    If it worked consistently, I could stitch something together from that, but I think that for some parameter values it works, for others it does not.

    Guess that's why it's not documented.

    Although it can do 2D stuff, I've concluded that for 3D work, p5 isn't the library to use.

    Cheers.

Sign In or Register to comment.