jit.gl.sketch stroked path - how to replicate code?

evsc's icon

Hello,

I am using jit.gl.sketch's inbuild stroked-path drawing function (beginstroke, strokeparam, strokepoint, etc.). For prototyping and comparison purposes, i would like to replicate the same functionality with processing. Can anyone point me in a direction for how the code works?

It's doesn't seem to be simple bezier or curve code, as the stroke doesn't actually go through the defined stroke points. Maybe the bezier points are half way between the defined points. Not sure. But before i start prototyping on wild guesses, i thought i'd ask here ...

Thanks,
Eva

Rob Ramirez's icon

perhaps this site will help explain how the points are related to the curve:
http://techblog.appnexus.com/2011/an-animated-bezier-curve-demo/

for what it's worth, the jit.gl.path object does draw the curve through all specified points.

evsc's icon

merci Rob. looks like i'll need to dig deeper into higher-order bezier code.

not on max6 yet, so i can't use jit.gl.path. but it looks pretty fabulous.