jit.phys.world - Difficulty with Collision Data

kski's icon

Hey all,

I am experiencing difficulty parsing and efficiently getting data from my jitter system. I currently have 32 objects in a world and am trying to get the collision data out in a more manageable form (such as o dot). One difficulty that I am having is when I choose to output collision data my jitter program seems to drop frames (stutters) and becomes less fluid in drawing the animations. With fewer objects this does not occur however I am wondering if this has to do with available ram (and computer hardware) or if Max is the issue. (One last hypothesis of mine is that the slowdown is due to printing the dictionary data). My other difficulty has to do with how to parse the collision data as it is in Dictionary format. I am not too familiar with this however I have learned that goes something like this.

collisions -> dictionary, "object 1"_"object 2" -> dictionary, "position" "normal" "contacts" "duration" "impulse" "body1" "body2"

I am not sure how to parse this data without routing each individual permutation of collision objects (which will be 7 (for last dictionary parameters listed above) * 32 (# of objects) + 6 (# of walls of a cube) = 266 number of times I will have to utilize route). If someone has delt with these issues before I would greatly appreciate some feedback on how one might approach these problems.

Here is the portion of my patch that is giving me the most difficulty.

----------begin_max5_patcher----------
{
    "patcher" :     {
        "fileversion" : 1,
        "appversion" :         {
            "major" : 6,
            "minor" : 1,
            "revision" : 3,
            "architecture" : "x86"
        }
,
        "rect" : [ 401.0, 259.0, 865.0, 501.0 ],
        "bglocked" : 0,
        "openinpresentation" : 0,
        "default_fontsize" : 14.0,
        "default_fontface" : 0,
        "default_fontname" : "Helvetica Neue",
        "gridonopen" : 0,
        "gridsize" : [ 15.0, 15.0 ],
        "gridsnaponopen" : 0,
        "statusbarvisible" : 2,
        "toolbarvisible" : 1,
        "boxanimatetime" : 200,
        "imprint" : 0,
        "enablehscroll" : 1,
        "enablevscroll" : 1,
        "devicewidth" : 0.0,
        "description" : "",
        "digest" : "",
        "tags" : "",
        "boxes" : [             {
                "box" :                 {
                    "fontname" : "Helvetica Neue",
                    "fontsize" : 14.0,
                    "id" : "obj-9",
                    "maxclass" : "newobj",
                    "numinlets" : 1,
                    "numoutlets" : 2,
                    "outlettype" : [ "bang", "" ],
                    "patching_rect" : [ 322.0, 421.0, 128.0, 23.0 ],
                    "text" : "jit.window Window"
                }

            }
,             {
                "box" :                 {
                    "fontname" : "Helvetica Neue",
                    "fontsize" : 14.0,
                    "id" : "obj-8",
                    "maxclass" : "newobj",
                    "numinlets" : 1,
                    "numoutlets" : 1,
                    "outlettype" : [ "" ],
                    "patching_rect" : [ 373.0, 188.0, 83.0, 23.0 ],
                    "text" : "loadmess 1"
                }

            }
,             {
                "box" :                 {
                    "fontname" : "Helvetica Neue",
                    "fontsize" : 14.0,
                    "id" : "obj-89",
                    "maxclass" : "newobj",
                    "numinlets" : 1,
                    "numoutlets" : 0,
                    "patcher" :                     {
                        "fileversion" : 1,
                        "appversion" :                         {
                            "major" : 6,
                            "minor" : 1,
                            "revision" : 3,
                            "architecture" : "x86"
                        }
,
                        "rect" : [ 812.0, 174.0, 932.0, 792.0 ],
                        "bglocked" : 0,
                        "openinpresentation" : 0,
                        "default_fontsize" : 14.0,
                        "default_fontface" : 0,
                        "default_fontname" : "Helvetica Neue",
                        "gridonopen" : 0,
                        "gridsize" : [ 15.0, 15.0 ],
                        "gridsnaponopen" : 0,
                        "statusbarvisible" : 2,
                        "toolbarvisible" : 1,
                        "boxanimatetime" : 200,
                        "imprint" : 0,
                        "enablehscroll" : 1,
                        "enablevscroll" : 1,
                        "devicewidth" : 0.0,
                        "description" : "",
                        "digest" : "",
                        "tags" : "",
                        "visible" : 1,
                        "boxes" : [                             {
                                "box" :                                 {
                                    "fontname" : "Helvetica Neue",
                                    "fontsize" : 14.0,
                                    "id" : "obj-1",
                                    "maxclass" : "newobj",
                                    "numinlets" : 1,
                                    "numoutlets" : 0,
                                    "patching_rect" : [ 274.0, 130.0, 66.0, 23.0 ],
                                    "text" : "dict.print"
                                }

                            }
,                             {
                                "box" :                                 {
                                    "fontname" : "Helvetica Neue",
                                    "fontsize" : 14.0,
                                    "id" : "obj-30",
                                    "maxclass" : "message",
                                    "numinlets" : 2,
                                    "numoutlets" : 1,
                                    "outlettype" : [ "" ],
                                    "patching_rect" : [ 19.0, 553.0, 128.0, 21.0 ],
                                    "text" : "0."
                                }

                            }
,                             {
                                "box" :                                 {
                                    "fontname" : "Helvetica Neue",
                                    "fontsize" : 14.0,
                                    "id" : "obj-28",
                                    "maxclass" : "newobj",
                                    "numinlets" : 6,
                                    "numoutlets" : 6,
                                    "outlettype" : [ "", "", "", "", "", "" ],
                                    "patching_rect" : [ 50.0, 455.0, 310.0, 23.0 ],
                                    "text" : "route position normal contacts duration impulse"
                                }

                            }
,                             {
                                "box" :                                 {
                                    "fontname" : "Helvetica Neue",
                                    "fontsize" : 14.0,
                                    "id" : "obj-24",
                                    "maxclass" : "newobj",
                                    "numinlets" : 1,
                                    "numoutlets" : 1,
                                    "outlettype" : [ "" ],
                                    "patching_rect" : [ 344.666656, 394.0, 57.0, 23.0 ],
                                    "text" : "dict.iter"
                                }

                            }
,                             {
                                "box" :                                 {
                                    "fontname" : "Helvetica Neue",
                                    "fontsize" : 14.0,
                                    "id" : "obj-23",
                                    "maxclass" : "newobj",
                                    "numinlets" : 1,
                                    "numoutlets" : 1,
                                    "outlettype" : [ "" ],
                                    "patching_rect" : [ 327.333344, 371.0, 57.0, 23.0 ],
                                    "text" : "dict.iter"
                                }

                            }
,                             {
                                "box" :                                 {
                                    "fontname" : "Helvetica Neue",
                                    "fontsize" : 14.0,
                                    "id" : "obj-22",
                                    "maxclass" : "newobj",
                                    "numinlets" : 1,
                                    "numoutlets" : 1,
                                    "outlettype" : [ "" ],
                                    "patching_rect" : [ 310.0, 348.0, 57.0, 23.0 ],
                                    "text" : "dict.iter"
                                }

                            }
,                             {
                                "box" :                                 {
                                    "fontname" : "Helvetica Neue",
                                    "fontsize" : 14.0,
                                    "id" : "obj-21",
                                    "maxclass" : "newobj",
                                    "numinlets" : 1,
                                    "numoutlets" : 1,
                                    "outlettype" : [ "" ],
                                    "patching_rect" : [ 292.666656, 394.0, 57.0, 23.0 ],
                                    "text" : "dict.iter"
                                }

                            }
,                             {
                                "box" :                                 {
                                    "fontname" : "Helvetica Neue",
                                    "fontsize" : 14.0,
                                    "id" : "obj-20",
                                    "maxclass" : "newobj",
                                    "numinlets" : 1,
                                    "numoutlets" : 1,
                                    "outlettype" : [ "" ],
                                    "patching_rect" : [ 275.333344, 371.0, 57.0, 23.0 ],
                                    "text" : "dict.iter"
                                }

                            }
,                             {
                                "box" :                                 {
                                    "fontname" : "Helvetica Neue",
                                    "fontsize" : 14.0,
                                    "id" : "obj-19",
                                    "maxclass" : "newobj",
                                    "numinlets" : 1,
                                    "numoutlets" : 1,
                                    "outlettype" : [ "" ],
                                    "patching_rect" : [ 258.0, 348.0, 57.0, 23.0 ],
                                    "text" : "dict.iter"
                                }

                            }
,                             {
                                "box" :                                 {
                                    "fontname" : "Helvetica Neue",
                                    "fontsize" : 14.0,
                                    "id" : "obj-18",
                                    "maxclass" : "newobj",
                                    "numinlets" : 1,
                                    "numoutlets" : 1,
                                    "outlettype" : [ "" ],
                                    "patching_rect" : [ 240.666672, 394.0, 57.0, 23.0 ],
                                    "text" : "dict.iter"
                                }

                            }
,                             {
                                "box" :                                 {
                                    "fontname" : "Helvetica Neue",
                                    "fontsize" : 14.0,
                                    "id" : "obj-17",
                                    "maxclass" : "newobj",
                                    "numinlets" : 1,
                                    "numoutlets" : 1,
                                    "outlettype" : [ "" ],
                                    "patching_rect" : [ 223.333328, 371.0, 57.0, 23.0 ],
                                    "text" : "dict.iter"
                                }

                            }
,                             {
                                "box" :                                 {
                                    "fontname" : "Helvetica Neue",
                                    "fontsize" : 14.0,
                                    "id" : "obj-16",
                                    "maxclass" : "newobj",
                                    "numinlets" : 1,
                                    "numoutlets" : 1,
                                    "outlettype" : [ "" ],
                                    "patching_rect" : [ 206.0, 348.0, 57.0, 23.0 ],
                                    "text" : "dict.iter"
                                }

                            }
,                             {
                                "box" :                                 {
                                    "fontname" : "Helvetica Neue",
                                    "fontsize" : 14.0,
                                    "id" : "obj-15",
                                    "maxclass" : "newobj",
                                    "numinlets" : 1,
                                    "numoutlets" : 1,
                                    "outlettype" : [ "" ],
                                    "patching_rect" : [ 188.666672, 394.0, 57.0, 23.0 ],
                                    "text" : "dict.iter"
                                }

                            }
,                             {
                                "box" :                                 {
                                    "fontname" : "Helvetica Neue",
                                    "fontsize" : 14.0,
                                    "id" : "obj-14",
                                    "maxclass" : "newobj",
                                    "numinlets" : 1,
                                    "numoutlets" : 1,
                                    "outlettype" : [ "" ],
                                    "patching_rect" : [ 171.333328, 371.0, 57.0, 23.0 ],
                                    "text" : "dict.iter"
                                }

                            }
,                             {
                                "box" :                                 {
                                    "fontname" : "Helvetica Neue",
                                    "fontsize" : 14.0,
                                    "id" : "obj-13",
                                    "maxclass" : "newobj",
                                    "numinlets" : 1,
                                    "numoutlets" : 1,
                                    "outlettype" : [ "" ],
                                    "patching_rect" : [ 154.0, 348.0, 57.0, 23.0 ],
                                    "text" : "dict.iter"
                                }

                            }
,                             {
                                "box" :                                 {
                                    "fontname" : "Helvetica Neue",
                                    "fontsize" : 14.0,
                                    "id" : "obj-12",
                                    "maxclass" : "newobj",
                                    "numinlets" : 1,
                                    "numoutlets" : 1,
                                    "outlettype" : [ "" ],
                                    "patching_rect" : [ 136.666672, 394.0, 57.0, 23.0 ],
                                    "text" : "dict.iter"
                                }

                            }
,                             {
                                "box" :                                 {
                                    "fontname" : "Helvetica Neue",
                                    "fontsize" : 14.0,
                                    "id" : "obj-11",
                                    "maxclass" : "newobj",
                                    "numinlets" : 1,
                                    "numoutlets" : 1,
                                    "outlettype" : [ "" ],
                                    "patching_rect" : [ 119.333336, 371.0, 57.0, 23.0 ],
                                    "text" : "dict.iter"
                                }

                            }
,                             {
                                "box" :                                 {
                                    "fontname" : "Helvetica Neue",
                                    "fontsize" : 14.0,
                                    "id" : "obj-10",
                                    "maxclass" : "newobj",
                                    "numinlets" : 1,
                                    "numoutlets" : 1,
                                    "outlettype" : [ "" ],
                                    "patching_rect" : [ 102.0, 348.0, 57.0, 23.0 ],
                                    "text" : "dict.iter"
                                }

                            }
,                             {
                                "box" :                                 {
                                    "fontname" : "Helvetica Neue",
                                    "fontsize" : 14.0,
                                    "id" : "obj-9",
                                    "maxclass" : "newobj",
                                    "numinlets" : 1,
                                    "numoutlets" : 1,
                                    "outlettype" : [ "" ],
                                    "patching_rect" : [ 84.666664, 394.0, 57.0, 23.0 ],
                                    "text" : "dict.iter"
                                }

                            }
,                             {
                                "box" :                                 {
                                    "fontname" : "Helvetica Neue",
                                    "fontsize" : 14.0,
                                    "id" : "obj-8",
                                    "maxclass" : "newobj",
                                    "numinlets" : 1,
                                    "numoutlets" : 1,
                                    "outlettype" : [ "" ],
                                    "patching_rect" : [ 67.333336, 371.0, 57.0, 23.0 ],
                                    "text" : "dict.iter"
                                }

                            }
,                             {
                                "box" :                                 {
                                    "fontname" : "Helvetica Neue",
                                    "fontsize" : 14.0,
                                    "id" : "obj-7",
                                    "maxclass" : "newobj",
                                    "numinlets" : 1,
                                    "numoutlets" : 1,
                                    "outlettype" : [ "" ],
                                    "patching_rect" : [ 50.0, 348.0, 57.0, 23.0 ],
                                    "text" : "dict.iter"
                                }

                            }
,                             {
                                "box" :                                 {
                                    "fontname" : "Helvetica Neue",
                                    "fontsize" : 14.0,
                                    "id" : "obj-67",
                                    "linecount" : 2,
                                    "maxclass" : "newobj",
                                    "numinlets" : 10,
                                    "numoutlets" : 10,
                                    "outlettype" : [ "", "", "", "", "", "", "", "", "", "" ],
                                    "patching_rect" : [ 50.0, 162.0, 550.0, 39.0 ],
                                    "text" : "route u425000545_wallbody0 u425000545_wallbody1 u425000545_wallbody2 u425000545_wallbody3 u425000545_wallbody4 u425000545_wallbody5 etc etc etc...."
                                }

                            }
,                             {
                                "box" :                                 {
                                    "fontname" : "Helvetica Neue",
                                    "fontsize" : 14.0,
                                    "id" : "obj-66",
                                    "maxclass" : "newobj",
                                    "numinlets" : 1,
                                    "numoutlets" : 1,
                                    "outlettype" : [ "" ],
                                    "patching_rect" : [ 50.0, 131.5, 57.0, 23.0 ],
                                    "text" : "dict.iter"
                                }

                            }
,                             {
                                "box" :                                 {
                                    "fontname" : "Helvetica Neue",
                                    "fontsize" : 14.0,
                                    "id" : "obj-48",
                                    "maxclass" : "newobj",
                                    "numinlets" : 2,
                                    "numoutlets" : 2,
                                    "outlettype" : [ "", "" ],
                                    "patching_rect" : [ 50.0, 100.0, 104.0, 23.0 ],
                                    "text" : "route collisions"
                                }

                            }
,                             {
                                "box" :                                 {
                                    "comment" : "",
                                    "id" : "obj-88",
                                    "maxclass" : "inlet",
                                    "numinlets" : 0,
                                    "numoutlets" : 1,
                                    "outlettype" : [ "" ],
                                    "patching_rect" : [ 50.0, 40.0, 25.0, 25.0 ]
                                }

                            }
],
                        "lines" : [                             {
                                "patchline" :                                 {
                                    "destination" : [ "obj-30", 1 ],
                                    "disabled" : 0,
                                    "hidden" : 0,
                                    "source" : [ "obj-28", 4 ]
                                }

                            }
,                             {
                                "patchline" :                                 {
                                    "destination" : [ "obj-1", 0 ],
                                    "disabled" : 0,
                                    "hidden" : 0,
                                    "source" : [ "obj-48", 0 ]
                                }

                            }
,                             {
                                "patchline" :                                 {
                                    "destination" : [ "obj-67", 0 ],
                                    "disabled" : 0,
                                    "hidden" : 0,
                                    "source" : [ "obj-66", 0 ]
                                }

                            }
,                             {
                                "patchline" :                                 {
                                    "destination" : [ "obj-10", 0 ],
                                    "disabled" : 0,
                                    "hidden" : 0,
                                    "source" : [ "obj-67", 3 ]
                                }

                            }
,                             {
                                "patchline" :                                 {
                                    "destination" : [ "obj-11", 0 ],
                                    "disabled" : 0,
                                    "hidden" : 0,
                                    "source" : [ "obj-67", 4 ]
                                }

                            }
,                             {
                                "patchline" :                                 {
                                    "destination" : [ "obj-12", 0 ],
                                    "disabled" : 0,
                                    "hidden" : 0,
                                    "source" : [ "obj-67", 5 ]
                                }

                            }
,                             {
                                "patchline" :                                 {
                                    "destination" : [ "obj-13", 0 ],
                                    "disabled" : 0,
                                    "hidden" : 0,
                                    "source" : [ "obj-67", 6 ]
                                }

                            }
,                             {
                                "patchline" :                                 {
                                    "destination" : [ "obj-14", 0 ],
                                    "disabled" : 0,
                                    "hidden" : 0,
                                    "source" : [ "obj-67", 7 ]
                                }

                            }
,                             {
                                "patchline" :                                 {
                                    "destination" : [ "obj-15", 0 ],
                                    "disabled" : 0,
                                    "hidden" : 0,
                                    "source" : [ "obj-67", 8 ]
                                }

                            }
,                             {
                                "patchline" :                                 {
                                    "destination" : [ "obj-16", 0 ],
                                    "disabled" : 0,
                                    "hidden" : 0,
                                    "source" : [ "obj-67", 9 ]
                                }

                            }
,                             {
                                "patchline" :                                 {
                                    "destination" : [ "obj-7", 0 ],
                                    "disabled" : 0,
                                    "hidden" : 0,
                                    "source" : [ "obj-67", 0 ]
                                }

                            }
,                             {
                                "patchline" :                                 {
                                    "destination" : [ "obj-8", 0 ],
                                    "disabled" : 0,
                                    "hidden" : 0,
                                    "source" : [ "obj-67", 1 ]
                                }

                            }
,                             {
                                "patchline" :                                 {
                                    "destination" : [ "obj-9", 0 ],
                                    "disabled" : 0,
                                    "hidden" : 0,
                                    "source" : [ "obj-67", 2 ]
                                }

                            }
,                             {
                                "patchline" :                                 {
                                    "destination" : [ "obj-28", 0 ],
                                    "disabled" : 0,
                                    "hidden" : 0,
                                    "source" : [ "obj-7", 0 ]
                                }

                            }
,                             {
                                "patchline" :                                 {
                                    "destination" : [ "obj-48", 0 ],
                                    "disabled" : 0,
                                    "hidden" : 0,
                                    "source" : [ "obj-88", 0 ]
                                }

                            }
]
                    }
,
                    "patching_rect" : [ 362.0, 298.0, 105.0, 23.0 ],
                    "saved_object_attributes" :                     {
                        "default_fontface" : 0,
                        "default_fontname" : "Helvetica Neue",
                        "default_fontsize" : 14.0,
                        "description" : "",
                        "digest" : "",
                        "fontface" : 0,
                        "fontname" : "Helvetica Neue",
                        "fontsize" : 14.0,
                        "globalpatchername" : "",
                        "tags" : ""
                    }
,
                    "text" : "p CollisionData"
                }

            }
,             {
                "box" :                 {
                    "fontname" : "Helvetica Neue",
                    "fontsize" : 14.0,
                    "id" : "obj-42",
                    "maxclass" : "newobj",
                    "numinlets" : 0,
                    "numoutlets" : 0,
                    "patcher" :                     {
                        "fileversion" : 1,
                        "appversion" :                         {
                            "major" : 6,
                            "minor" : 1,
                            "revision" : 3,
                            "architecture" : "x86"
                        }
,
                        "rect" : [ 0.0, 0.0, 640.0, 480.0 ],
                        "bglocked" : 0,
                        "openinpresentation" : 0,
                        "default_fontsize" : 14.0,
                        "default_fontface" : 0,
                        "default_fontname" : "Helvetica Neue",
                        "gridonopen" : 0,
                        "gridsize" : [ 15.0, 15.0 ],
                        "gridsnaponopen" : 0,
                        "statusbarvisible" : 2,
                        "toolbarvisible" : 1,
                        "boxanimatetime" : 200,
                        "imprint" : 0,
                        "enablehscroll" : 1,
                        "enablevscroll" : 1,
                        "devicewidth" : 0.0,
                        "description" : "",
                        "digest" : "",
                        "tags" : "",
                        "boxes" : [                             {
                                "box" :                                 {
                                    "attr" : "shape",
                                    "fontname" : "Helvetica Neue",
                                    "fontsize" : 14.0,
                                    "id" : "obj-53",
                                    "maxclass" : "attrui",
                                    "numinlets" : 1,
                                    "numoutlets" : 1,
                                    "outlettype" : [ "" ],
                                    "patching_rect" : [ 50.0, 120.5, 189.5, 23.0 ]
                                }

                            }
,                             {
                                "box" :                                 {
                                    "attr" : "scale",
                                    "fontname" : "Helvetica Neue",
                                    "fontsize" : 14.0,
                                    "id" : "obj-63",
                                    "maxclass" : "attrui",
                                    "numinlets" : 1,
                                    "numoutlets" : 1,
                                    "outlettype" : [ "" ],
                                    "patching_rect" : [ 72.0, 100.0, 211.5, 23.0 ]
                                }

                            }
,                             {
                                "box" :                                 {
                                    "fontname" : "Helvetica Neue",
                                    "fontsize" : 14.0,
                                    "frozen_object_attributes" :                                     {
                                        "central_force" : -13.0,
                                        "scale" : [ 67.0, 39.0, 39.0 ],
                                        "shape" : "sphere"
                                    }
,
                                    "id" : "obj-52",
                                    "maxclass" : "newobj",
                                    "numinlets" : 1,
                                    "numoutlets" : 2,
                                    "outlettype" : [ "", "" ],
                                    "patching_rect" : [ 61.0, 184.5, 94.0, 23.0 ],
                                    "text" : "jit.phys.ghost"
                                }

                            }
,                             {
                                "box" :                                 {
                                    "attr" : "central_force",
                                    "fontname" : "Helvetica Neue",
                                    "fontsize" : 14.0,
                                    "id" : "obj-66",
                                    "maxclass" : "attrui",
                                    "numinlets" : 1,
                                    "numoutlets" : 1,
                                    "outlettype" : [ "" ],
                                    "patching_rect" : [ 61.0, 154.5, 160.5, 23.0 ]
                                }

                            }
],
                        "lines" : [                             {
                                "patchline" :                                 {
                                    "destination" : [ "obj-52", 0 ],
                                    "disabled" : 0,
                                    "hidden" : 0,
                                    "source" : [ "obj-53", 0 ]
                                }

                            }
,                             {
                                "patchline" :                                 {
                                    "destination" : [ "obj-52", 0 ],
                                    "disabled" : 0,
                                    "hidden" : 0,
                                    "source" : [ "obj-63", 0 ]
                                }

                            }
,                             {
                                "patchline" :                                 {
                                    "destination" : [ "obj-52", 0 ],
                                    "disabled" : 0,
                                    "hidden" : 0,
                                    "source" : [ "obj-66", 0 ]
                                }

                            }
]
                    }
,
                    "patching_rect" : [ 80.0, 401.5, 68.0, 23.0 ],
                    "saved_object_attributes" :                     {
                        "default_fontface" : 0,
                        "default_fontname" : "Helvetica Neue",
                        "default_fontsize" : 14.0,
                        "description" : "",
                        "digest" : "",
                        "fontface" : 0,
                        "fontname" : "Helvetica Neue",
                        "fontsize" : 14.0,
                        "globalpatchername" : "",
                        "tags" : ""
                    }
,
                    "text" : "p Ghost2"
                }

            }
,             {
                "box" :                 {
                    "fontname" : "Helvetica Neue",
                    "fontsize" : 14.0,
                    "id" : "obj-39",
                    "maxclass" : "newobj",
                    "numinlets" : 1,
                    "numoutlets" : 0,
                    "patcher" :                     {
                        "fileversion" : 1,
                        "appversion" :                         {
                            "major" : 6,
                            "minor" : 1,
                            "revision" : 3,
                            "architecture" : "x86"
                        }
,
                        "rect" : [ 0.0, 0.0, 640.0, 480.0 ],
                        "bglocked" : 0,
                        "openinpresentation" : 0,
                        "default_fontsize" : 14.0,
                        "default_fontface" : 0,
                        "default_fontname" : "Helvetica Neue",
                        "gridonopen" : 0,
                        "gridsize" : [ 15.0, 15.0 ],
                        "gridsnaponopen" : 0,
                        "statusbarvisible" : 2,
                        "toolbarvisible" : 1,
                        "boxanimatetime" : 200,
                        "imprint" : 0,
                        "enablehscroll" : 1,
                        "enablevscroll" : 1,
                        "devicewidth" : 0.0,
                        "description" : "",
                        "digest" : "",
                        "tags" : "",
                        "boxes" : [                             {
                                "box" :                                 {
                                    "fontname" : "Helvetica Neue",
                                    "fontsize" : 14.0,
                                    "frozen_object_attributes" :                                     {
                                        "scale" : [ 8.0, 8.0, 8.0 ],
                                        "shape" : "cube"
                                    }
,
                                    "id" : "obj-45",
                                    "maxclass" : "newobj",
                                    "numinlets" : 1,
                                    "numoutlets" : 2,
                                    "outlettype" : [ "", "" ],
                                    "patching_rect" : [ 50.0, 195.5, 94.0, 23.0 ],
                                    "text" : "jit.phys.ghost"
                                }

                            }
,                             {
                                "box" :                                 {
                                    "attr" : "shape",
                                    "fontname" : "Helvetica Neue",
                                    "fontsize" : 14.0,
                                    "id" : "obj-8",
                                    "maxclass" : "attrui",
                                    "numinlets" : 1,
                                    "numoutlets" : 1,
                                    "outlettype" : [ "" ],
                                    "patching_rect" : [ 50.0, 135.0, 189.5, 23.0 ]
                                }

                            }
,                             {
                                "box" :                                 {
                                    "attr" : "scale",
                                    "fontname" : "Helvetica Neue",
                                    "fontsize" : 14.0,
                                    "id" : "obj-17",
                                    "maxclass" : "attrui",
                                    "numinlets" : 1,
                                    "numoutlets" : 1,
                                    "outlettype" : [ "" ],
                                    "patching_rect" : [ 50.0, 100.0, 211.5, 23.0 ]
                                }

                            }
,                             {
                                "box" :                                 {
                                    "attr" : "force",
                                    "fontname" : "Helvetica Neue",
                                    "fontsize" : 14.0,
                                    "id" : "obj-42",
                                    "maxclass" : "attrui",
                                    "numinlets" : 1,
                                    "numoutlets" : 1,
                                    "outlettype" : [ "" ],
                                    "patching_rect" : [ 50.0, 165.0, 251.0, 23.0 ]
                                }

                            }
,                             {
                                "box" :                                 {
                                    "comment" : "",
                                    "id" : "obj-11",
                                    "maxclass" : "inlet",
                                    "numinlets" : 0,
                                    "numoutlets" : 1,
                                    "outlettype" : [ "" ],
                                    "patching_rect" : [ 50.0, 40.0, 25.0, 25.0 ]
                                }

                            }
],
                        "lines" : [                             {
                                "patchline" :                                 {
                                    "destination" : [ "obj-42", 0 ],
                                    "disabled" : 0,
                                    "hidden" : 0,
                                    "source" : [ "obj-11", 0 ]
                                }

                            }
,                             {
                                "patchline" :                                 {
                                    "destination" : [ "obj-45", 0 ],
                                    "disabled" : 0,
                                    "hidden" : 0,
                                    "source" : [ "obj-17", 0 ]
                                }

                            }
,                             {
                                "patchline" :                                 {
                                    "destination" : [ "obj-45", 0 ],
                                    "disabled" : 0,
                                    "hidden" : 0,
                                    "source" : [ "obj-42", 0 ]
                                }

                            }
,                             {
                                "patchline" :                                 {
                                    "destination" : [ "obj-45", 0 ],
                                    "disabled" : 0,
                                    "hidden" : 0,
                                    "source" : [ "obj-8", 0 ]
                                }

                            }
]
                    }
,
                    "patching_rect" : [ 80.0, 372.0, 68.0, 23.0 ],
                    "saved_object_attributes" :                     {
                        "default_fontface" : 0,
                        "default_fontname" : "Helvetica Neue",
                        "default_fontsize" : 14.0,
                        "description" : "",
                        "digest" : "",
                        "fontface" : 0,
                        "fontname" : "Helvetica Neue",
                        "fontsize" : 14.0,
                        "globalpatchername" : "",
                        "tags" : ""
                    }
,
                    "text" : "p Ghost1"
                }

            }
,             {
                "box" :                 {
                    "fontname" : "Helvetica Neue",
                    "fontsize" : 14.0,
                    "id" : "obj-85",
                    "maxclass" : "newobj",
                    "numinlets" : 2,
                    "numoutlets" : 2,
                    "outlettype" : [ "bang", "" ],
                    "patching_rect" : [ 670.5, 52.0, 55.0, 23.0 ],
                    "text" : "sel 114"
                }

            }
,             {
                "box" :                 {
                    "fontname" : "Helvetica Neue",
                    "fontsize" : 14.0,
                    "id" : "obj-82",
                    "maxclass" : "newobj",
                    "numinlets" : 0,
                    "numoutlets" : 4,
                    "outlettype" : [ "int", "int", "int", "int" ],
                    "patching_rect" : [ 670.5, 22.0, 59.5, 23.0 ],
                    "text" : "key"
                }

            }
,             {
                "box" :                 {
                    "fontname" : "Arial",
                    "fontsize" : 13.0,
                    "id" : "obj-69",
                    "maxclass" : "message",
                    "numinlets" : 2,
                    "numoutlets" : 1,
                    "outlettype" : [ "" ],
                    "patching_rect" : [ 268.0, 46.0, 40.0, 19.0 ],
                    "text" : "reset"
                }

            }
,             {
                "box" :                 {
                    "fontname" : "Arial",
                    "fontsize" : 13.0,
                    "id" : "obj-70",
                    "maxclass" : "newobj",
                    "numinlets" : 1,
                    "numoutlets" : 2,
                    "outlettype" : [ "", "" ],
                    "patching_rect" : [ 268.0, 76.0, 206.0, 21.0 ],
                    "text" : "jit.gl.handle @radius 3 @enable 0"
                }

            }
,             {
                "box" :                 {
                    "attr" : "enable",
                    "fontname" : "Arial",
                    "fontsize" : 13.0,
                    "id" : "obj-71",
                    "maxclass" : "attrui",
                    "numinlets" : 1,
                    "numoutlets" : 1,
                    "outlettype" : [ "" ],
                    "patching_rect" : [ 311.0, 46.0, 100.0, 21.0 ],
                    "text_width" : 66.0
                }

            }
,             {
                "box" :                 {
                    "fontname" : "Helvetica Neue",
                    "fontsize" : 14.0,
                    "id" : "obj-51",
                    "maxclass" : "newobj",
                    "numinlets" : 0,
                    "numoutlets" : 1,
                    "outlettype" : [ "" ],
                    "patcher" :                     {
                        "fileversion" : 1,
                        "appversion" :                         {
                            "major" : 6,
                            "minor" : 1,
                            "revision" : 3,
                            "architecture" : "x86"
                        }
,
                        "rect" : [ 25.0, 69.0, 640.0, 480.0 ],
                        "bglocked" : 0,
                        "openinpresentation" : 0,
                        "default_fontsize" : 14.0,
                        "default_fontface" : 0,
                        "default_fontname" : "Helvetica Neue",
                        "gridonopen" : 0,
                        "gridsize" : [ 15.0, 15.0 ],
                        "gridsnaponopen" : 0,
                        "statusbarvisible" : 2,
                        "toolbarvisible" : 1,
                        "boxanimatetime" : 200,
                        "imprint" : 0,
                        "enablehscroll" : 1,
                        "enablevscroll" : 1,
                        "devicewidth" : 0.0,
                        "description" : "",
                        "digest" : "",
                        "tags" : "",
                        "boxes" : [                             {
                                "box" :                                 {
                                    "fontname" : "Helvetica Neue",
                                    "fontsize" : 14.0,
                                    "id" : "obj-1",
                                    "maxclass" : "newobj",
                                    "numinlets" : 1,
                                    "numoutlets" : 1,
                                    "outlettype" : [ "bang" ],
                                    "patching_rect" : [ 50.0, 60.0, 69.0, 23.0 ],
                                    "text" : "loadbang"
                                }

                            }
,                             {
                                "box" :                                 {
                                    "fontname" : "Helvetica Neue",
                                    "fontsize" : 14.0,
                                    "id" : "obj-2",
                                    "maxclass" : "newobj",
                                    "numinlets" : 2,
                                    "numoutlets" : 1,
                                    "outlettype" : [ "float" ],
                                    "patching_rect" : [ 127.0, 239.0, 36.0, 23.0 ],
                                    "text" : "* -1."
                                }

                            }
,                             {
                                "box" :                                 {
                                    "fontname" : "Helvetica Neue",
                                    "fontsize" : 14.0,
                                    "id" : "obj-65",
                                    "maxclass" : "newobj",
                                    "numinlets" : 3,
                                    "numoutlets" : 1,
                                    "outlettype" : [ "" ],
                                    "patching_rect" : [ 50.0, 276.0, 96.0, 23.0 ],
                                    "text" : "pack 0. 25. 0."
                                }

                            }
,                             {
                                "box" :                                 {
                                    "fontname" : "Helvetica Neue",
                                    "fontsize" : 14.0,
                                    "id" : "obj-63",
                                    "maxclass" : "newobj",
                                    "numinlets" : 6,
                                    "numoutlets" : 1,
                                    "outlettype" : [ "" ],
                                    "patching_rect" : [ 50.0, 201.0, 155.0, 23.0 ],
                                    "text" : "scale -100 100 -10. 10."
                                }

                            }
,                             {
                                "box" :                                 {
                                    "id" : "obj-53",
                                    "maxclass" : "toggle",
                                    "numinlets" : 1,
                                    "numoutlets" : 1,
                                    "outlettype" : [ "int" ],
                                    "parameter_enable" : 0,
                                    "patching_rect" : [ 50.0, 100.0, 20.0, 20.0 ]
                                }

                            }
,                             {
                                "box" :                                 {
                                    "fontname" : "Helvetica Neue",
                                    "fontsize" : 14.0,
                                    "id" : "obj-49",
                                    "maxclass" : "newobj",
                                    "numinlets" : 2,
                                    "numoutlets" : 1,
                                    "outlettype" : [ "bang" ],
                                    "patching_rect" : [ 50.0, 128.0, 66.0, 23.0 ],
                                    "text" : "metro 33"
                                }

                            }
,                             {
                                "box" :                                 {
                                    "fontname" : "Helvetica Neue",
                                    "fontsize" : 14.0,
                                    "id" : "obj-39",
                                    "maxclass" : "newobj",
                                    "numinlets" : 5,
                                    "numoutlets" : 4,
                                    "outlettype" : [ "int", "", "", "int" ],
                                    "patching_rect" : [ 50.0, 166.0, 130.0, 23.0 ],
                                    "text" : "counter 2 -100 100"
                                }

                            }
,                             {
                                "box" :                                 {
                                    "comment" : "",
                                    "id" : "obj-50",
                                    "maxclass" : "outlet",
                                    "numinlets" : 1,
                                    "numoutlets" : 0,
                                    "patching_rect" : [ 50.0, 320.0, 25.0, 25.0 ]
                                }

                            }
],
                        "lines" : [                             {
                                "patchline" :                                 {
                                    "destination" : [ "obj-53", 0 ],
                                    "disabled" : 0,
                                    "hidden" : 0,
                                    "source" : [ "obj-1", 0 ]
                                }

                            }
,                             {
                                "patchline" :                                 {
                                    "destination" : [ "obj-65", 2 ],
                                    "disabled" : 0,
                                    "hidden" : 0,
                                    "source" : [ "obj-2", 0 ]
                                }

                            }
,                             {
                                "patchline" :                                 {
                                    "destination" : [ "obj-63", 0 ],
                                    "disabled" : 0,
                                    "hidden" : 0,
                                    "source" : [ "obj-39", 0 ]
                                }

                            }
,                             {
                                "patchline" :                                 {
                                    "destination" : [ "obj-39", 0 ],
                                    "disabled" : 0,
                                    "hidden" : 0,
                                    "source" : [ "obj-49", 0 ]
                                }

                            }
,                             {
                                "patchline" :                                 {
                                    "destination" : [ "obj-49", 0 ],
                                    "disabled" : 0,
                                    "hidden" : 0,
                                    "source" : [ "obj-53", 0 ]
                                }

                            }
,                             {
                                "patchline" :                                 {
                                    "destination" : [ "obj-2", 0 ],
                                    "disabled" : 0,
                                    "hidden" : 0,
                                    "source" : [ "obj-63", 0 ]
                                }

                            }
,                             {
                                "patchline" :                                 {
                                    "destination" : [ "obj-65", 0 ],
                                    "disabled" : 0,
                                    "hidden" : 0,
                                    "source" : [ "obj-63", 0 ]
                                }

                            }
,                             {
                                "patchline" :                                 {
                                    "destination" : [ "obj-50", 0 ],
                                    "disabled" : 0,
                                    "hidden" : 0,
                                    "source" : [ "obj-65", 0 ]
                                }

                            }
]
                    }
,
                    "patching_rect" : [ 80.0, 341.0, 65.0, 23.0 ],
                    "saved_object_attributes" :                     {
                        "default_fontface" : 0,
                        "default_fontname" : "Helvetica Neue",
                        "default_fontsize" : 14.0,
                        "description" : "",
                        "digest" : "",
                        "fontface" : 0,
                        "fontname" : "Helvetica Neue",
                        "fontsize" : 14.0,
                        "globalpatchername" : "",
                        "tags" : ""
                    }
,
                    "text" : "p Waiver"
                }

            }
,             {
                "box" :                 {
                    "fontname" : "Helvetica Neue",
                    "fontsize" : 14.0,
                    "id" : "obj-10",
                    "maxclass" : "newobj",
                    "numinlets" : 8,
                    "numoutlets" : 2,
                    "outlettype" : [ "", "" ],
                    "patching_rect" : [ 555.5, 257.0, 113.5, 23.0 ],
                    "text" : "jit.gl.material"
                }

            }
,             {
                "box" :                 {
                    "fontname" : "Helvetica Neue",
                    "fontsize" : 14.0,
                    "frozen_object_attributes" :                     {
                        "shape" : "cube"
                    }
,
                    "id" : "obj-6",
                    "maxclass" : "newobj",
                    "numinlets" : 1,
                    "numoutlets" : 2,
                    "outlettype" : [ "jit_matrix", "" ],
                    "patching_rect" : [ 529.5, 290.0, 102.0, 23.0 ],
                    "text" : "jit.gl.gridshape"
                }

            }
,             {
                "box" :                 {
                    "fontname" : "Helvetica Neue",
                    "fontsize" : 14.0,
                    "id" : "obj-1",
                    "linecount" : 3,
                    "maxclass" : "newobj",
                    "numinlets" : 2,
                    "numoutlets" : 2,
                    "outlettype" : [ "", "" ],
                    "patching_rect" : [ 529.5, 195.0, 151.0, 55.0 ],
                    "text" : "jit.gl.multiple 2 @glparams position rotate"
                }

            }
,             {
                "box" :                 {
                    "fontname" : "Helvetica Neue",
                    "fontsize" : 14.0,
                    "id" : "obj-28",
                    "maxclass" : "newobj",
                    "numinlets" : 1,
                    "numoutlets" : 1,
                    "outlettype" : [ "bang" ],
                    "patching_rect" : [ 529.5, 28.0, 69.0, 23.0 ],
                    "text" : "loadbang"
                }

            }
,             {
                "box" :                 {
                    "fontname" : "Helvetica Neue",
                    "fontsize" : 14.0,
                    "id" : "obj-27",
                    "maxclass" : "newobj",
                    "numinlets" : 1,
                    "numoutlets" : 2,
                    "outlettype" : [ "", "" ],
                    "patching_rect" : [ 80.0, 286.0, 225.0, 23.0 ],
                    "text" : "jit.phys.picker @pickmode surface"
                }

            }
,             {
                "box" :                 {
                    "id" : "obj-26",
                    "maxclass" : "button",
                    "numinlets" : 1,
                    "numoutlets" : 1,
                    "outlettype" : [ "bang" ],
                    "patching_rect" : [ 529.5, 70.0, 20.0, 20.0 ]
                }

            }
,             {
                "box" :                 {
                    "fontname" : "Helvetica Neue",
                    "fontsize" : 14.0,
                    "id" : "obj-22",
                    "maxclass" : "newobj",
                    "numinlets" : 1,
                    "numoutlets" : 2,
                    "outlettype" : [ "jit_matrix", "" ],
                    "patching_rect" : [ 529.5, 97.0, 136.0, 23.0 ],
                    "text" : "jit.noise 3 float32 32"
                }

            }
,             {
                "box" :                 {
                    "fontname" : "Helvetica Neue",
                    "fontsize" : 14.0,
                    "id" : "obj-21",
                    "maxclass" : "newobj",
                    "numinlets" : 1,
                    "numoutlets" : 3,
                    "outlettype" : [ "jit_matrix", "jit_matrix", "" ],
                    "patching_rect" : [ 529.5, 126.0, 284.0, 23.0 ],
                    "text" : "jit.phys.multiple 1 @physparams position"
                }

            }
,             {
                "box" :                 {
                    "fontname" : "Helvetica Neue",
                    "fontsize" : 14.0,
                    "id" : "obj-16",
                    "maxclass" : "newobj",
                    "numinlets" : 2,
                    "numoutlets" : 2,
                    "outlettype" : [ "", "" ],
                    "patching_rect" : [ 136.5, 47.0, 64.0, 23.0 ],
                    "text" : "zl.slice 1"
                }

            }
,             {
                "box" :                 {
                    "fontname" : "Helvetica Neue",
                    "fontsize" : 14.0,
                    "id" : "obj-15",
                    "maxclass" : "newobj",
                    "numinlets" : 1,
                    "numoutlets" : 1,
                    "outlettype" : [ "" ],
                    "patching_rect" : [ 136.5, 17.0, 157.0, 23.0 ],
                    "text" : "loadmess 1 15. 4.3. 32."
                }

            }
,             {
                "box" :                 {
                    "fontname" : "Helvetica Neue",
                    "fontsize" : 14.0,
                    "id" : "obj-13",
                    "maxclass" : "newobj",
                    "numinlets" : 1,
                    "numoutlets" : 1,
                    "outlettype" : [ "" ],
                    "patching_rect" : [ 51.0, 251.0, 101.0, 23.0 ],
                    "text" : "jit.gl.physdraw"
                }

            }
,             {
                "box" :                 {
                    "fontname" : "Helvetica Neue",
                    "fontsize" : 14.0,
                    "frozen_object_attributes" :                     {
                        "worldbox_scale" : [ 21.0, 21.0, 21.0 ]
                    }
,
                    "id" : "obj-12",
                    "maxclass" : "newobj",
                    "numinlets" : 1,
                    "numoutlets" : 2,
                    "outlettype" : [ "", "" ],
                    "patching_rect" : [ 287.0, 254.0, 94.0, 23.0 ],
                    "text" : "jit.phys.world"
                }

            }
,             {
                "box" :                 {
                    "id" : "obj-7",
                    "maxclass" : "toggle",
                    "numinlets" : 1,
                    "numoutlets" : 1,
                    "outlettype" : [ "int" ],
                    "parameter_enable" : 0,
                    "patching_rect" : [ 41.0, 47.0, 20.0, 20.0 ]
                }

            }
,             {
                "box" :                 {
                    "fontname" : "Helvetica Neue",
                    "fontsize" : 14.0,
                    "id" : "obj-5",
                    "maxclass" : "newobj",
                    "numinlets" : 2,
                    "numoutlets" : 1,
                    "outlettype" : [ "bang" ],
                    "patching_rect" : [ 41.0, 82.0, 75.0, 23.0 ],
                    "text" : "qmetro 33"
                }

            }
,             {
                "box" :                 {
                    "fontname" : "Helvetica Neue",
                    "fontsize" : 14.0,
                    "id" : "obj-4",
                    "maxclass" : "newobj",
                    "numinlets" : 1,
                    "numoutlets" : 0,
                    "patching_rect" : [ 70.0, 214.0, 82.0, 23.0 ],
                    "text" : "s prerender"
                }

            }
,             {
                "box" :                 {
                    "fontname" : "Helvetica Neue",
                    "fontsize" : 14.0,
                    "id" : "obj-3",
                    "maxclass" : "newobj",
                    "numinlets" : 1,
                    "numoutlets" : 3,
                    "outlettype" : [ "bang", "bang", "erase" ],
                    "patching_rect" : [ 41.0, 115.0, 77.0, 23.0 ],
                    "text" : "t b b erase"
                }

            }
,             {
                "box" :                 {
                    "fontname" : "Helvetica Neue",
                    "fontsize" : 14.0,
                    "id" : "obj-2",
                    "maxclass" : "newobj",
                    "numinlets" : 1,
                    "numoutlets" : 2,
                    "outlettype" : [ "bang", "" ],
                    "patching_rect" : [ 41.0, 181.0, 194.0, 23.0 ],
                    "text" : "jit.gl.render @drawto Window"
                }

            }
,             {
                "box" :                 {
                    "attr" : "camera",
                    "fontname" : "Helvetica Neue",
                    "fontsize" : 14.0,
                    "id" : "obj-14",
                    "maxclass" : "attrui",
                    "numinlets" : 1,
                    "numoutlets" : 1,
                    "outlettype" : [ "" ],
                    "patching_rect" : [ 181.5, 126.0, 224.0, 23.0 ]
                }

            }
,             {
                "box" :                 {
                    "attr" : "worldbox_scale",
                    "fontname" : "Helvetica Neue",
                    "fontsize" : 14.0,
                    "id" : "obj-43",
                    "maxclass" : "attrui",
                    "numinlets" : 1,
                    "numoutlets" : 1,
                    "outlettype" : [ "" ],
                    "patching_rect" : [ 296.0, 172.0, 198.0, 23.0 ]
                }

            }
,             {
                "box" :                 {
                    "attr" : "collision_mode",
                    "fontname" : "Helvetica Neue",
                    "fontsize" : 14.0,
                    "id" : "obj-46",
                    "maxclass" : "attrui",
                    "numinlets" : 1,
                    "numoutlets" : 1,
                    "outlettype" : [ "" ],
                    "patching_rect" : [ 268.0, 149.0, 189.5, 23.0 ]
                }

            }
,             {
                "box" :                 {
                    "attr" : "collisions",
                    "fontname" : "Helvetica Neue",
                    "fontsize" : 14.0,
                    "id" : "obj-47",
                    "maxclass" : "attrui",
                    "numinlets" : 1,
                    "numoutlets" : 1,
                    "outlettype" : [ "" ],
                    "patching_rect" : [ 362.0, 220.0, 150.0, 23.0 ]
                }

            }
],
        "lines" : [             {
                "patchline" :                 {
                    "destination" : [ "obj-6", 0 ],
                    "disabled" : 0,
                    "hidden" : 0,
                    "source" : [ "obj-1", 0 ]
                }

            }
,             {
                "patchline" :                 {
                    "destination" : [ "obj-6", 0 ],
                    "disabled" : 0,
                    "hidden" : 0,
                    "source" : [ "obj-10", 0 ]
                }

            }
,             {
                "patchline" :                 {
                    "destination" : [ "obj-2", 0 ],
                    "disabled" : 0,
                    "hidden" : 0,
                    "midpoints" : [ 296.5, 261.0, 253.5, 261.0, 253.5, 171.0, 50.5, 171.0 ],
                    "source" : [ "obj-12", 0 ]
                }

            }
,             {
                "patchline" :                 {
                    "destination" : [ "obj-89", 0 ],
                    "disabled" : 0,
                    "hidden" : 0,
                    "source" : [ "obj-12", 1 ]
                }

            }
,             {
                "patchline" :                 {
                    "destination" : [ "obj-2", 0 ],
                    "disabled" : 0,
                    "hidden" : 0,
                    "midpoints" : [ 191.0, 159.0, 50.5, 159.0 ],
                    "source" : [ "obj-14", 0 ]
                }

            }
,             {
                "patchline" :                 {
                    "destination" : [ "obj-16", 0 ],
                    "disabled" : 0,
                    "hidden" : 0,
                    "source" : [ "obj-15", 0 ]
                }

            }
,             {
                "patchline" :                 {
                    "destination" : [ "obj-14", 0 ],
                    "disabled" : 0,
                    "hidden" : 0,
                    "source" : [ "obj-16", 1 ]
                }

            }
,             {
                "patchline" :                 {
                    "destination" : [ "obj-7", 0 ],
                    "disabled" : 0,
                    "hidden" : 0,
                    "midpoints" : [ 146.0, 75.0, 98.25, 75.0, 98.25, 34.0, 50.5, 34.0 ],
                    "source" : [ "obj-16", 0 ]
                }

            }
,             {
                "patchline" :                 {
                    "destination" : [ "obj-1", 1 ],
                    "disabled" : 0,
                    "hidden" : 0,
                    "midpoints" : [ 671.5, 160.0, 671.0, 160.0 ],
                    "source" : [ "obj-21", 1 ]
                }

            }
,             {
                "patchline" :                 {
                    "destination" : [ "obj-1", 0 ],
                    "disabled" : 0,
                    "hidden" : 0,
                    "source" : [ "obj-21", 0 ]
                }

            }
,             {
                "patchline" :                 {
                    "destination" : [ "obj-21", 0 ],
                    "disabled" : 0,
                    "hidden" : 0,
                    "source" : [ "obj-22", 0 ]
                }

            }
,             {
                "patchline" :                 {
                    "destination" : [ "obj-22", 0 ],
                    "disabled" : 0,
                    "hidden" : 0,
                    "source" : [ "obj-26", 0 ]
                }

            }
,             {
                "patchline" :                 {
                    "destination" : [ "obj-26", 0 ],
                    "disabled" : 0,
                    "hidden" : 0,
                    "source" : [ "obj-28", 0 ]
                }

            }
,             {
                "patchline" :                 {
                    "destination" : [ "obj-2", 0 ],
                    "disabled" : 0,
                    "hidden" : 0,
                    "midpoints" : [ 108.5, 159.0, 50.5, 159.0 ],
                    "source" : [ "obj-3", 2 ]
                }

            }
,             {
                "patchline" :                 {
                    "destination" : [ "obj-2", 0 ],
                    "disabled" : 0,
                    "hidden" : 0,
                    "source" : [ "obj-3", 0 ]
                }

            }
,             {
                "patchline" :                 {
                    "destination" : [ "obj-4", 0 ],
                    "disabled" : 0,
                    "hidden" : 0,
                    "source" : [ "obj-3", 1 ]
                }

            }
,             {
                "patchline" :                 {
                    "destination" : [ "obj-12", 0 ],
                    "disabled" : 0,
                    "hidden" : 0,
                    "midpoints" : [ 305.5, 211.5, 296.5, 211.5 ],
                    "source" : [ "obj-43", 0 ]
                }

            }
,             {
                "patchline" :                 {
                    "destination" : [ "obj-12", 0 ],
                    "disabled" : 0,
                    "hidden" : 0,
                    "source" : [ "obj-46", 0 ]
                }

            }
,             {
                "patchline" :                 {
                    "destination" : [ "obj-12", 0 ],
                    "disabled" : 0,
                    "hidden" : 0,
                    "midpoints" : [ 371.5, 248.0, 296.5, 248.0 ],
                    "source" : [ "obj-47", 0 ]
                }

            }
,             {
                "patchline" :                 {
                    "destination" : [ "obj-3", 0 ],
                    "disabled" : 0,
                    "hidden" : 0,
                    "source" : [ "obj-5", 0 ]
                }

            }
,             {
                "patchline" :                 {
                    "destination" : [ "obj-39", 0 ],
                    "disabled" : 0,
                    "hidden" : 0,
                    "source" : [ "obj-51", 0 ]
                }

            }
,             {
                "patchline" :                 {
                    "destination" : [ "obj-70", 0 ],
                    "disabled" : 0,
                    "hidden" : 0,
                    "source" : [ "obj-69", 0 ]
                }

            }
,             {
                "patchline" :                 {
                    "destination" : [ "obj-5", 0 ],
                    "disabled" : 0,
                    "hidden" : 0,
                    "source" : [ "obj-7", 0 ]
                }

            }
,             {
                "patchline" :                 {
                    "destination" : [ "obj-2", 0 ],
                    "disabled" : 0,
                    "hidden" : 0,
                    "midpoints" : [ 277.5, 112.5, 50.5, 112.5 ],
                    "source" : [ "obj-70", 0 ]
                }

            }
,             {
                "patchline" :                 {
                    "destination" : [ "obj-70", 0 ],
                    "disabled" : 0,
                    "hidden" : 0,
                    "source" : [ "obj-71", 0 ]
                }

            }
,             {
                "patchline" :                 {
                    "destination" : [ "obj-47", 0 ],
                    "disabled" : 0,
                    "hidden" : 0,
                    "source" : [ "obj-8", 0 ]
                }

            }
,             {
                "patchline" :                 {
                    "destination" : [ "obj-85", 0 ],
                    "disabled" : 0,
                    "hidden" : 0,
                    "source" : [ "obj-82", 0 ]
                }

            }
,             {
                "patchline" :                 {
                    "destination" : [ "obj-26", 0 ],
                    "disabled" : 0,
                    "hidden" : 0,
                    "midpoints" : [ 680.0, 88.0, 608.5, 88.0, 608.5, 60.0, 539.0, 60.0 ],
                    "source" : [ "obj-85", 0 ]
                }

            }
],
        "dependency_cache" : [ ]
    }

}
-----------end_max5_patcher-----------

Rob Ramirez's icon

can you repost your patch using copy-compressed. it's not working uncompressed.

without seeing the patch, i can say that if you're using a dict.view or dict.print, it will greatly impact performance.

here's a little abstraction to help your detect collisions for specific named bodies.
if you need something more complex, javascript is a good solution.
in this case, check out the following example:
Max 6.1/examples/jitter-examples/render/physics/phys.world.collisions.js.maxpat

Max Patch
Copy patch and select New From Clipboard in Max.

--- save as "pdict-route" ---

Max Patch
Copy patch and select New From Clipboard in Max.

example usage:

kski's icon
Max Patch
Copy patch and select New From Clipboard in Max.

Ah naming bodies really helps to understand what data is being reported! Now that I understand what is being outputted I now want to route that data out in a more manageable way (using o dot). Here is my compressed code (hopefully this works better).

kski's icon

Also thanks for your example! I really appreciate you helping me out. I am a little confused how you parsed the data in pdict-route. If you could explain a little how you went about to making that sub-patch I would greatly appreciate it.

kski's icon

I feel like I have exhausted all my options on trying to get collision data out from a multi-object system. Trying to work with dict formatted data with more than 5 objects just gets ridiculous and taxing on the system as you try and access all the available data. As such, I have tasked myself to develop my own collision collecting system just biased off of 3d position data. If anyone has any suggestions on how to optimally get data out of multi-object systems from jit.phys.world please feel free to comment on this thread. Frankly, I'm kind of disappointed in the output formatting of the collision data and would love to see this better executed (o dot would be great).

If anyone would like to see my attempt at parsing the collision data take a look at the patch below. Please note that in order for the last sub patch to make sense you will need o dot externals from CNMAT (http://cnmat.berkeley.edu/downloads) Also note that since my system was a 32 body system I had to iterate this patch 32 times and change the o dot variables for each iteration. Lastly, I combined them all together into one o.message however the load to do so was too taxing on my system.

Max Patch
Copy patch and select New From Clipboard in Max.

Rob Ramirez's icon

first thing is to get rid of all those message boxes that you're sending the collision data into. not only will that greatly impact performance, but you will bloat the symbol table unnecessarily.

if have no idea what o.dot is or what you need the collision data to do, but as mentioned, if you want to manage multiple collisions javascript is probably your best bet.

the abstraction i posted uses regexp to match a specific named body, and if it finds a match will output the collision info. if you're interested in collisions with walls, make 6 instances, giving each one the specific wall-name as an argument (wallbody0 … wallbody5). each frame, if there's a collision it will output the data for each collision.

Max Patch
Copy patch and select New From Clipboard in Max.

without knowing what specifically you want to do with this data, i can't really offer more advice.

kski's icon

Wow! This works fantastic! I have only one big issue now. This works great if I don't have any "ghosts" (jit.phys.ghost) however when I do add them (they provide force fields to move the cubes around) the patch "pdict-route" is constantly responding. I am having difficulty not including these objects in the collision data or perhaps parsing them out of the final dict.iter? The objects that I wish to not include are named "SmallForce", "LargeForce", and "SphereForce." Any ideas how to change "pdict-route" to accommodate this? Thanks for your help, I really appreciate it.

kski's icon

Ah, I think I figured out how do achieve this. All I did was chain regexp "SmallForce", "LargeForce", and "SphereForce" together each connected by the "unmatched" outlet. I will leave an example here.

Max Patch
Copy patch and select New From Clipboard in Max.