diagonal lines with jit.gl.sketch
Hi community,
I have created a little patch to draw some lines in a jit.window. I am using [jit.gl.sketch] with the command [lineto $1 $2].
The problem is:
If I use [pack] to get the x- and y-coordinates to [jit.gl.sketch], I can draw also diagonal lines. But a vertical line (Y) is not possible because of the right inlet to [pack]! I would have to change also X, but so Inever get a clear vertical line.
If I use [pak] I can draw also a proper vertical line (Y), but for a diagonal line I just get some kind of "zig-zag"...
Could anybody has a look on this patch to solve this problem?
I really a litle bit stucked at that point!
Thanks a lot!
Johannes
The problem is that for the diagonal you need the list sent every time with the same value for x and y, and you don't get that with pak. The problem is exaggerated when the control is moved more quickly, depending on the render rate. In the end, you need to use both pack (for diagonal) and pak (for Y only).
Here are some adjustments that help a little.
Tim
Hi Tim!
They really helped me!! Thank you very much! I get the lines I want now.
Greetings,
Johannes
bondo is your freind
//yac
Hey there,
sorry for my late answer but wasn't connected the last weeks...
Thanks for your help Tim and Yac!!!
I am going on with my project now.
Greetings,
Johannes