{ "patcher" : { "fileversion" : 1, "appversion" : { "major" : 7, "minor" : 0, "revision" : 1, "architecture" : "x86", "modernui" : 1 } , "rect" : [ 448.0, 249.0, 857.0, 606.0 ], "bgcolor" : [ 0.721569, 0.737255, 0.85098, 1.0 ], "editing_bgcolor" : [ 0.721569, 0.737255, 0.85098, 1.0 ], "bglocked" : 0, "openinpresentation" : 0, "default_fontsize" : 12.0, "default_fontface" : 0, "default_fontname" : "Arial", "gridonopen" : 1, "gridsize" : [ 15.0, 15.0 ], "gridsnaponopen" : 1, "objectsnaponopen" : 1, "statusbarvisible" : 2, "toolbarvisible" : 1, "lefttoolbarpinned" : 0, "toptoolbarpinned" : 0, "righttoolbarpinned" : 0, "bottomtoolbarpinned" : 0, "toolbars_unpinned_last_save" : 0, "tallnewobj" : 0, "boxanimatetime" : 200, "enablehscroll" : 1, "enablevscroll" : 1, "devicewidth" : 0.0, "description" : "", "digest" : "", "tags" : "", "style" : "", "subpatcher_template" : "IceCubeTray", "boxes" : [ { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-22", "linecount" : 4, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 300.0, 489.0, 272.0, 60.0 ], "style" : "", "text" : "Instead of using setpixel to make dots, we are plotting small ovals with paintoval. So we have to calculate left, top, right, and bottom edges of each" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-20", "linecount" : 2, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 390.0, 214.0, 180.0, 33.0 ], "style" : "", "text" : "We draw a red circle before calculating the points" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-13", "maxclass" : "newobj", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "int" ], "patching_rect" : [ 139.0, 450.0, 32.5, 22.0 ], "style" : "", "text" : "+ 7" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-12", "maxclass" : "newobj", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "int" ], "patching_rect" : [ 103.0, 450.0, 32.5, 22.0 ], "style" : "", "text" : "+ 7" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-11", "linecount" : 2, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 300.0, 440.0, 271.0, 33.0 ], "style" : "", "text" : "The poltocar object converts polar coordinates to Cartesian ones" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-7", "linecount" : 4, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 300.0, 285.0, 273.0, 60.0 ], "style" : "", "text" : "The expr object allows us to enter a complex mathematical operation in one object, rather than connecting a number of more primitive objects together. The $i notation indicates an integer." } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-58", "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 100.0, 316.5, 73.0, 20.0 ], "style" : "", "text" : "Radius 90" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-55", "linecount" : 3, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 300.0, 362.0, 271.0, 47.0 ], "style" : "", "text" : "This expression converts the number of points to an angle in radians, then multiplies by the uzi counter value to place each at the correct angle." } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-53", "maxclass" : "newobj", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 88.0, 353.5, 195.0, 22.0 ], "style" : "", "text" : "expr $i1*((360./$i2)/180.)*acos(-1.)" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-14", "linecount" : 2, "maxclass" : "message", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 56.5, 526.0, 174.0, 35.0 ], "style" : "", "text" : ";\rlcd paintoval $1 $2 $3 $4 0 0 0" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-32", "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 150.0, 420.0, 97.0, 20.0 ], "style" : "", "text" : "Offset to center" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-30", "maxclass" : "newobj", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "int" ], "patching_rect" : [ 103.0, 420.0, 34.0, 22.0 ], "style" : "", "text" : "+ 97" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-29", "maxclass" : "newobj", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "int" ], "patching_rect" : [ 57.0, 420.0, 34.0, 22.0 ], "style" : "", "text" : "+ 97" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-25", "maxclass" : "newobj", "numinlets" : 4, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 56.5, 489.0, 76.0, 22.0 ], "style" : "", "text" : "pack 0 0 0 0" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-51", "maxclass" : "newobj", "numinlets" : 2, "numoutlets" : 2, "outlettype" : [ "float", "float" ], "patching_rect" : [ 57.0, 390.0, 53.0, 22.0 ], "style" : "", "text" : "poltocar" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-50", "maxclass" : "newobj", "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "int", "int" ], "patching_rect" : [ 57.0, 316.5, 37.0, 22.0 ], "style" : "", "text" : "t 90 i" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-19", "maxclass" : "newobj", "numinlets" : 1, "numoutlets" : 4, "outlettype" : [ "bang", "int", "int", "bang" ], "patching_rect" : [ 30.0, 225.0, 59.5, 22.0 ], "style" : "", "text" : "t b i i b" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-18", "linecount" : 2, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 141.0, 156.0, 55.0, 33.0 ], "style" : "", "text" : "Number of points" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-16", "maxclass" : "newobj", "numinlets" : 2, "numoutlets" : 3, "outlettype" : [ "bang", "bang", "int" ], "patching_rect" : [ 30.0, 285.0, 46.0, 22.0 ], "style" : "", "text" : "uzi" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-15", "maxclass" : "number", "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "", "bang" ], "parameter_enable" : 0, "patching_rect" : [ 30.0, 189.0, 50.0, 22.0 ], "style" : "" } } , { "box" : { "id" : "obj-10", "maxclass" : "slider", "min" : 3.0, "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "" ], "parameter_enable" : 0, "patching_rect" : [ 30.0, 156.0, 102.0, 20.0 ], "size" : 357.0, "style" : "" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-9", "linecount" : 2, "maxclass" : "message", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 141.0, 214.0, 237.0, 35.0 ], "style" : "", "text" : ";\rlcd clear, frameoval 10 10 190 190 255 0 0" } } , { "box" : { "id" : "obj-5", "maxclass" : "lcd", "numinlets" : 1, "numoutlets" : 4, "outlettype" : [ "list", "list", "int", "" ], "patching_rect" : [ 600.0, 135.0, 200.0, 200.0 ] } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-1", "maxclass" : "newobj", "numinlets" : 0, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 600.0, 90.0, 33.0, 22.0 ], "style" : "", "text" : "r lcd" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-4", "linecount" : 3, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 30.0, 90.0, 540.0, 47.0 ], "style" : "", "text" : "We've seen that some things are relatively easy to draw with the Lcd object, whereas others take more work. Here we use trigonometry to figure out how to place a number of points on the circumference of a circle." } } , { "box" : { "bubble" : 1, "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-2", "linecount" : 3, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 15.0, 15.0, 315.0, 51.0 ], "style" : "", "text" : "Patch 7-045. Points on a Circle\nWilliam J Turkel\nhttp://williamjturkel.net/code/#programming" } } , { "box" : { "angle" : 0.0, "bgcolor" : [ 1.0, 1.0, 1.0, 0.0 ], "border" : 1, "id" : "obj-3", "maxclass" : "panel", "mode" : 0, "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 15.0, 75.0, 810.0, 495.0 ], "proportion" : 0.39, "rounded" : 20, "style" : "" } } ], "lines" : [ { "patchline" : { "destination" : [ "obj-5", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-1", 0 ] } } , { "patchline" : { "destination" : [ "obj-15", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-10", 0 ] } } , { "patchline" : { "destination" : [ "obj-25", 2 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-12", 0 ] } } , { "patchline" : { "destination" : [ "obj-25", 3 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-13", 0 ] } } , { "patchline" : { "destination" : [ "obj-19", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-15", 0 ] } } , { "patchline" : { "destination" : [ "obj-50", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-16", 2 ] } } , { "patchline" : { "destination" : [ "obj-16", 1 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-19", 1 ] } } , { "patchline" : { "destination" : [ "obj-16", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-19", 0 ] } } , { "patchline" : { "destination" : [ "obj-53", 1 ], "disabled" : 0, "hidden" : 0, "midpoints" : [ 66.5, 257.0, 273.5, 257.0 ], "source" : [ "obj-19", 2 ] } } , { "patchline" : { "destination" : [ "obj-9", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-19", 3 ] } } , { "patchline" : { "destination" : [ "obj-14", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-25", 0 ] } } , { "patchline" : { "destination" : [ "obj-12", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-29", 0 ] } } , { "patchline" : { "destination" : [ "obj-25", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-29", 0 ] } } , { "patchline" : { "destination" : [ "obj-13", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-30", 0 ] } } , { "patchline" : { "destination" : [ "obj-25", 1 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-30", 0 ] } } , { "patchline" : { "destination" : [ "obj-51", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-50", 0 ] } } , { "patchline" : { "destination" : [ "obj-53", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-50", 1 ] } } , { "patchline" : { "destination" : [ "obj-29", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-51", 0 ] } } , { "patchline" : { "destination" : [ "obj-30", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-51", 1 ] } } , { "patchline" : { "destination" : [ "obj-51", 1 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-53", 0 ] } } ], "dependency_cache" : [ ], "embedsnapshot" : 0, "default_bgcolor" : [ 0.207843, 0.215686, 0.278431, 1.0 ], "color" : [ 0.901961, 0.901961, 0.901961, 1.0 ], "elementcolor" : [ 0.376471, 0.407843, 0.619608, 1.0 ], "accentcolor" : [ 0.552941, 0.588235, 0.85098, 1.0 ], "selectioncolor" : [ 0.552941, 0.588235, 0.85098, 1.0 ], "textcolor" : [ 0.090196, 0.07451, 0.07451, 1.0 ], "textcolor_inverse" : [ 0.721569, 0.737255, 0.85098, 1.0 ], "patchlinecolor" : [ 0.207843, 0.215686, 0.278431, 0.9 ], "bgfillcolor_type" : "gradient", "bgfillcolor_color1" : [ 0.376471, 0.407843, 0.619608, 1.0 ], "bgfillcolor_color2" : [ 0.376471, 0.407843, 0.619608, 1.0 ], "bgfillcolor_color" : [ 0.290196, 0.309804, 0.301961, 1.0 ], "bgfillcolor_angle" : 270.0, "bgfillcolor_proportion" : 0.39 } }