creating curves with control-points


    Sep 06 2007 | 11:33 pm
    Hi forum!
    I am quite curious, if there would be an object in Max/Jitter to create curves with control-points. In fact I was searching already a long time, but didn't get, what I wanted. My goal would be to define as many control-points is I need. Then the "object" should create a curve between these points. For example: I define a start point (x,y or maybe also z), then the next point, and another, and so on... What I already found: --> cubiccurve-example.pat (jitter-examples/java): a great thing, but only 4 control-points. I am not well trained in Java on "mxj" :( , so I am not able to add some more control-points... and also antialiasing doesn't work here, don't know why... --> js_jitterspline-example.pat (jitter-examples/render): this would be THE thing I need! I can create as many control-points as I need. Unfortunately, all points in this example are created by "random". Again the problem with my not existing knowledge in JavaScript :(( --> bspline (taken from the externals on http://www.jasch.ch): this is a very interesting object, but I don't understand, how to put some more control-points into it! I got an example from the forum under: https://cycling74.com/forums/index.php?t=msg&goto=113922&rid=5269&S=668f46a5697fcc4a9418021c8f9cd257&srch=curves#msg_113922 but I want to define the points with "Number-Boxes" and not with a "Function". The other problem here is, that the curves are drawn into a LCD-object, so rendering doesn't work, I think...
    It would be great, if somebody knows an object in Max/Jitter, which can create such curves with control-points without Java or JavaScript. Maybe the "bspline-object" is what I need, but I didn't solve my problems to put some more points to the curve and the rendering into a "jit.window" with the help-file! I hope that somebody could give me a useful hint or idea how to solve my "curve-problem"!!! Thanks already, Johannes

    • Sep 07 2007 | 4:39 pm
      Hello there!
      I also posted this reply in the MAX/MSP-Forum under the Theme "max lacks a curve drawing tool with an intuitive GUI?!?", because the subject is also curve-drawing...
      Well, I spent quite a time on the "bspline"-object and finally I come forward but "step-bystep" (in fact, very small steps ;) ). I could reach to mix the two patches together now! Well, nearly... The bspline is rendered now in a "jit.window", and I can also put more control-points into the curve, by changing the "jit.matrix". I cannot just jet give the control-points the x/y-coordinates, but I will work on it (I think the solution is in creating a control-matrix, or so...). But here the problem for the moment: I can't visualize the control-points in the "jit.window"! The control-lines between the points are visible, but not the points. I have already a smoking head because of this problem... Here my patch:
      Can somebody help me here, please? Maybe for better understanding: in the "bspline.help"-file the points are visible, but just in an LCD-object! Thx a lot, Johannes
    • Sep 09 2007 | 9:15 pm
      Well like I said: "step-by-step" I caome forward... Here is the new patch:
      I can visualize ONE control-point now in the jit.window. But why only the last one? I wanted to see all 12 control-points in the window! I don't understand why, because the list sends the coordinates of all points but jit.gl.sketch only puts the last point out.. Some ideas how to correct this bug? Thanks, Johannes
    • Sep 10 2007 | 3:45 pm
      Again me! Well, I really worked on a solution for that problem, but I don't come forward!!!! Is it really not possible, when I send a list of x/y-coordinates to jit.gl.sketch to draw a circle at every position in the list? I don't understand that... Just any news on this topic would be helpful! Thanks, Johannes
    • Sep 10 2007 | 4:18 pm
      Hi Johannes, Sorry, I haven't really been following this thread, but I might suggest that you check the Jitter Recipes for some of the answers, if you haven't already. https://cycling74.com/story/2006/2/14/161736/108
      Pay special attention to ElapseGraph and TwineBall. Let us know what you come up with.
      Best, Andrew B.
    • Sep 10 2007 | 4:30 pm
      its difficult to tell what could be going wrong, the patch is quite layered which makes it time consuming to follow your programming. its a shot in the dark, but i suspect they might be getting erased before they are drawn...
      perhaps you could simplify the patch.
      j
    • Sep 10 2007 | 6:21 pm
      I don't have time to figure out why this is nescessary, but adding a bang in your message in side of your draw_control_2 patcher makes it work (position $1 $2, circle 0.02, bang)
      On 9/10/07 9:30 AM, "justin" wrote:
      > > its difficult to tell what could be going wrong, the patch is quite layered > which makes it time consuming to follow your programming. its a shot in the > dark, but i suspect they might be getting erased before they are drawn... > > perhaps you could simplify the patch. > > j
    • Sep 11 2007 | 1:08 pm
    • Sep 11 2007 | 2:02 pm
      Bonsoir!
      Ok, here the patch a little bit "sweeped-out"...
      Thanks again for your help! I will go on changing the patch now. The goal is to create the curve with coordinates given by a webcam... We will see, if it works! I will go on posting!! Wish you all the best and till later!!! ;) Johannes