diagonal lines with jit.gl.sketch

    Apr 03 2007 | 4:35 pm
    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

    • Apr 04 2007 | 5:22 am
      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.
    • Apr 04 2007 | 2:52 pm
      Hi Tim! They really helped me!! Thank you very much! I get the lines I want now. Greetings, Johannes
    • Apr 05 2007 | 8:02 am
      bondo is your freind
    • Apr 16 2007 | 10:34 am
      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