jit.gl.sketch drawing starting point

Sep 5, 2012 at 1:33pm

jit.gl.sketch drawing starting point

Hello !
I’m new here :)
I’ve been playing with max/msp in the past but it has been a long time that i haven’t work with it and i’m still a bit of a noob.
So i’m on new project at the moment and i’m trying to draw several lines with jit.gl.sketch. It works as a kind of heart monitor. I managed to draw the lines but i can’t find how to reset the starting point.(i guess it has something to do with moveto…)


– Pasted Max Patch, click to expand. –


Sep 5, 2012 at 3:36pm

moveto will reposition the drawing position to the location you provide. It will do it with no change in the rendered image.
I’m unsure what you mean by “reset”.
What you can do is start your commands wiith “moveto 3 3 3″ and then “lineto 5 5 5″. This would create a line from 3,3,3 to 5,5,5 and nothing else.

Sep 6, 2012 at 2:38pm

Thank your answer
By reset, i mean when the last line reaches the end of the screen, moving the start point to the left edge of the screen. I’ve got the dynamic drawing part working. When the counter reaches 1 (right edge), it send the reset command the jit.gl.sketch to erase the screen and then starts a new line.
The thing is that each time it is drawing a horizontal line from the right edge to the left edge. I tried to send a moveto -1. 0. 0. command before send the reset message but it is not working.
It’m sorry if i’m not very clear, if you can take a look at my patch it may be clearer ;)

Sep 6, 2012 at 7:37pm

the trick seems to be in the order of sending messages,if you store the first position for the “moveto”, it ‘ll work.

– Pasted Max Patch, click to expand. –
Sep 13, 2012 at 3:36pm

Hi matmat,
Thanks this is perfect ! Sorry for the late reply, is there a notification system on the forum ? (haven’t seen it in my account)

Sep 13, 2012 at 4:10pm

check your account settings. there’s some options for email notifications there.


You must be logged in to reply to this topic.