diff options
59 files changed, 3072 insertions, 46 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..bcbcc7e --- /dev/null +++ b/.gitignore @@ -0,0 +1,39 @@ +# Compiled source # +################### +*.com +*.class +*.dll +*.exe +*.o +*.so +*.d +*.app + +# Packages # +############ +# it's better to unpack these files and commit the raw source +# git has its own built in compression methods +*.7z +*.dmg +*.gz +*.iso +*.jar +*.rar +*.tar +*.zip + +# Logs and databases # +###################### +*.log +*.sql +*.sqlite + +# OS generated files # +###################### +.DS_Store +.DS_Store? +._* +.Spotlight-V100 +.Trashes +ehthumbs.db +Thumbs.db diff --git a/drawing/bin/data/bars.svg b/drawing/bin/data/bars.svg new file mode 100644 index 0000000..75513ce --- /dev/null +++ b/drawing/bin/data/bars.svg @@ -0,0 +1,150 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + version="1.1" + id="svg3718" + xml:space="preserve" + width="1200" + height="900" + viewBox="0 0 1200 899.99996" + sodipodi:docname="bars.svg" + inkscape:version="0.91 r13725"><metadata + id="metadata3724"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title /></cc:Work></rdf:RDF></metadata><defs + id="defs3722"><clipPath + clipPathUnits="userSpaceOnUse" + id="clipPath3796"><path + d="m 0,0 11344.252,0 0,8509.606 -11344.252,0 z" + id="path3794" + inkscape:connector-curvature="0" /></clipPath><clipPath + clipPathUnits="userSpaceOnUse" + id="clipPath3820"><path + d="m 0,0 11344.252,0 0,8509.606 -11344.252,0 z" + id="path3818" + inkscape:connector-curvature="0" /></clipPath><clipPath + clipPathUnits="userSpaceOnUse" + id="clipPath3848"><path + d="m 0,0 11344.252,0 0,8509.606 -11344.252,0 z" + id="path3846" + inkscape:connector-curvature="0" /></clipPath></defs><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1920" + inkscape:window-height="1140" + id="namedview3720" + showgrid="false" + showguides="false" + inkscape:zoom="0.64916666" + inkscape:cx="612.49033" + inkscape:cy="440.28878" + inkscape:window-x="0" + inkscape:window-y="31" + inkscape:window-maximized="1" + inkscape:current-layer="g3726" /><g + id="g3726" + inkscape:groupmode="layer" + inkscape:label="LS_PVCBanner_Dublin_NEW" + transform="matrix(1.3333333,0,0,-1.3333333,0,899.99954)"><g + id="g3810" + transform="matrix(0.07932836,0,0,0.07932836,32.306768,556.21906)" + style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-opacity:1" /><g + id="g3814" + style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-opacity:1" + transform="matrix(0.07932836,0,0,0.07932836,1.8508681,-0.03354016)"><g + id="g3816" + clip-path="url(#clipPath3820)" + style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-opacity:1"><g + id="g3822" + transform="translate(3179.8359,2193.6797)" + style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-opacity:1" /><g + id="g3826" + transform="translate(4008.4219,1497.582)" + style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-opacity:1" /></g></g><g + id="g3830" + transform="matrix(0.07932836,0,0,0.07932836,403.6304,556.21906)" + style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-opacity:1" /><g + id="g3834" + transform="matrix(0.07932836,0,0,0.07932836,750.61884,556.21906)" + style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-opacity:1" /><g + id="g3838" + transform="matrix(0.07932836,0,0,0.07932836,589.6808,556.21906)" + style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-opacity:1" /><path + inkscape:connector-curvature="0" + id="rect13407" + style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.24066198;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="m 29.120331,786.87933 6.259338,0 0,-898.75933 -6.259338,0 z" /><path + d="m 29.120331,786.87933 6.259338,0 0,-898.75933 -6.259338,0 z" + style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.24066198;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + id="use13595" + inkscape:connector-curvature="0" /><path + d="m 89.120332,786.87933 6.259338,0 0,-898.75933 -6.259338,0 z" + style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.24066198;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + id="use13599" + inkscape:connector-curvature="0" /><path + d="m 149.12033,786.87933 6.25934,0 0,-898.75933 -6.25934,0 z" + style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.24066198;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + id="use13603" + inkscape:connector-curvature="0" /><path + d="m 209.12033,786.87933 6.25934,0 0,-898.75933 -6.25934,0 z" + style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.24066198;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + id="use13607" + inkscape:connector-curvature="0" /><path + d="m 269.12034,786.87933 6.25934,0 0,-898.75933 -6.25934,0 z" + style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.24066198;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + id="use13611" + inkscape:connector-curvature="0" /><path + d="m 329.12034,786.87933 6.25934,0 0,-898.75933 -6.25934,0 z" + style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.24066198;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + id="use13615" + inkscape:connector-curvature="0" /><path + d="m 389.12034,786.87933 6.25934,0 0,-898.75933 -6.25934,0 z" + style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.24066198;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + id="use13619" + inkscape:connector-curvature="0" /><path + d="m 449.12034,786.87933 6.25934,0 0,-898.75933 -6.25934,0 z" + style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.24066198;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + id="use13623" + inkscape:connector-curvature="0" /><path + d="m 509.12034,786.87933 6.25934,0 0,-898.75933 -6.25934,0 z" + style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.24066198;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + id="use13627" + inkscape:connector-curvature="0" /><path + d="m 569.12034,786.87933 6.25934,0 0,-898.75933 -6.25934,0 z" + style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.24066198;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + id="use13631" + inkscape:connector-curvature="0" /><path + d="m 629.12034,786.87933 6.25934,0 0,-898.75933 -6.25934,0 z" + style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.24066198;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + id="use13635" + inkscape:connector-curvature="0" /><path + d="m 689.12034,786.87933 6.25934,0 0,-898.75933 -6.25934,0 z" + style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.24066198;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + id="use13639" + inkscape:connector-curvature="0" /><path + d="m 749.12035,786.87933 6.25934,0 0,-898.75933 -6.25934,0 z" + style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.24066198;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + id="use13643" + inkscape:connector-curvature="0" /><path + d="m 809.12035,786.87933 6.25934,0 0,-898.75933 -6.25934,0 z" + style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.24066198;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + id="use13647" + inkscape:connector-curvature="0" /><path + d="m 869.12035,786.87933 6.25934,0 0,-898.75933 -6.25934,0 z" + style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.24066198;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + id="use13651" + inkscape:connector-curvature="0" /></g></svg>
\ No newline at end of file diff --git a/drawing/bin/data/circles.svg b/drawing/bin/data/circles.svg new file mode 100644 index 0000000..4f5ae15 --- /dev/null +++ b/drawing/bin/data/circles.svg @@ -0,0 +1,170 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + version="1.1" + id="svg3718" + xml:space="preserve" + width="1200" + height="900" + viewBox="0 0 1200 899.99996" + sodipodi:docname="circles.svg" + inkscape:version="0.91 r13725"><metadata + id="metadata3724"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs + id="defs3722"><clipPath + clipPathUnits="userSpaceOnUse" + id="clipPath3796"><path + d="m 0,0 11344.252,0 0,8509.606 -11344.252,0 z" + id="path3794" + inkscape:connector-curvature="0" /></clipPath><clipPath + clipPathUnits="userSpaceOnUse" + id="clipPath3820"><path + d="m 0,0 11344.252,0 0,8509.606 -11344.252,0 z" + id="path3818" + inkscape:connector-curvature="0" /></clipPath><clipPath + clipPathUnits="userSpaceOnUse" + id="clipPath3848"><path + d="m 0,0 11344.252,0 0,8509.606 -11344.252,0 z" + id="path3846" + inkscape:connector-curvature="0" /></clipPath></defs><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1920" + inkscape:window-height="1140" + id="namedview3720" + showgrid="false" + showguides="false" + inkscape:zoom="0.64916666" + inkscape:cx="612.49033" + inkscape:cy="440.28878" + inkscape:window-x="0" + inkscape:window-y="31" + inkscape:window-maximized="1" + inkscape:current-layer="g3726" /><g + id="g3726" + inkscape:groupmode="layer" + inkscape:label="LS_PVCBanner_Dublin_NEW" + transform="matrix(1.3333333,0,0,-1.3333333,0,899.99954)"><g + id="g3810" + transform="matrix(0.07932836,0,0,0.07932836,32.306768,556.21906)" + style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-opacity:1" /><g + id="g3814" + style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-opacity:1" + transform="matrix(0.07932836,0,0,0.07932836,1.8508681,-0.03354016)"><g + id="g3816" + clip-path="url(#clipPath3820)" + style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-opacity:1"><g + id="g3822" + transform="translate(3179.8359,2193.6797)" + style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-opacity:1" /><g + id="g3826" + transform="translate(4008.4219,1497.582)" + style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-opacity:1" /></g></g><g + id="g3830" + transform="matrix(0.07932836,0,0,0.07932836,403.6304,556.21906)" + style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-opacity:1" /><g + id="g3834" + transform="matrix(0.07932836,0,0,0.07932836,750.61884,556.21906)" + style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-opacity:1" /><g + id="g3838" + transform="matrix(0.07932836,0,0,0.07932836,589.6808,556.21906)" + style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-opacity:1" /><circle + style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.81199992;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + id="path4186" + cx="177.92043" + cy="-255.32704" + r="63.543007" + transform="scale(1,-1)" /><circle + style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.81199992;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + id="path4188" + cx="239.15277" + cy="-530.29498" + r="36.970478" + transform="scale(1,-1)" /><circle + style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.81199992;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + id="path4190" + cx="486.39279" + cy="-420.53882" + r="82.028244" + transform="scale(1,-1)" /><circle + style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.81199992;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + id="path4186-3" + cx="406.6752" + cy="-211.42459" + r="63.543007" + transform="scale(1,-1)" /><circle + style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.81199992;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + id="path4188-6" + cx="668.93457" + cy="-391.65567" + r="36.970478" + transform="scale(1,-1)" /><circle + style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.81199992;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + id="path4190-7" + cx="674.71118" + cy="-182.54141" + r="82.028244" + transform="scale(1,-1)" /><circle + style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.81199992;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + id="path4186-3-5" + cx="400.89856" + cy="-599.61456" + r="63.543007" + transform="scale(1,-1)" /><circle + style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.05244672;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + id="path4252" + cx="146.72658" + cy="-419.38351" + r="23.486324" + transform="scale(1,-1)" /><circle + style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.05244672;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + id="path4252-3" + cx="235.6868" + cy="-107.44511" + r="23.486324" + transform="scale(1,-1)" /><circle + style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.05244672;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + id="path4252-5" + cx="302.69577" + cy="-365.08313" + r="23.486324" + transform="scale(1,-1)" /><circle + style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.05244672;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + id="path4252-6" + cx="562.64447" + cy="-564.95477" + r="23.486324" + transform="scale(1,-1)" /><circle + style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.05244672;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + id="path4252-2" + cx="563.7998" + cy="-293.45285" + r="23.486324" + transform="scale(1,-1)" /><circle + style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.81199992;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + id="path4188-9" + cx="664.31323" + cy="-538.38226" + r="36.970478" + transform="scale(1,-1)" /><circle + style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.81199992;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + id="path4188-1" + cx="466.75232" + cy="-60.076691" + r="36.970478" + transform="scale(1,-1)" /></g></svg>
\ No newline at end of file diff --git a/drawing/bin/data/clouds_flythrough.mp4 b/drawing/bin/data/clouds_flythrough.mp4 Binary files differnew file mode 100644 index 0000000..e4cd5e9 --- /dev/null +++ b/drawing/bin/data/clouds_flythrough.mp4 diff --git a/drawing/bin/data/lorenn.svg b/drawing/bin/data/lorenn.svg new file mode 100644 index 0000000..e8ddcb4 --- /dev/null +++ b/drawing/bin/data/lorenn.svg @@ -0,0 +1,78 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="1141px" + height="724px" + viewBox="0 0 1141 724" + version="1.1" + id="svg2" + inkscape:version="0.91 r13725" + sodipodi:docname="lorenn.svg"> + <metadata + id="metadata31"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title>lorenzo</dc:title> + </cc:Work> + </rdf:RDF> + </metadata> + <sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1920" + inkscape:window-height="1140" + id="namedview29" + showgrid="false" + inkscape:zoom="1.5895118" + inkscape:cx="552.1449" + inkscape:cy="445.05891" + inkscape:window-x="0" + inkscape:window-y="31" + inkscape:window-maximized="1" + inkscape:current-layer="svg2" /> + <!-- Generator: Sketch 48.2 (47327) - http://www.bohemiancoding.com/sketch --> + <title + id="title4">lorenzo</title> + <desc + id="desc6">Created with Sketch.</desc> + <defs + id="defs8"> + <polygon + id="path-1" + points="0 0 1199.89451 0 1199.89451 900.070762 0 900.070762" /> + <mask + fill="white" + id="mask-2"> + <use + height="100%" + width="100%" + y="0" + x="0" + id="use17" + xlink:href="#path-1" /> + </mask> + </defs> + <polygon + style="fill:#000000;fill-rule:nonzero;stroke:#000000;stroke-width:0.5" + points="844.36106,159.68957 844.36106,742.95873 784.90771,742.95873 784.90771,425.82712 741.65313,742.95873 682.19896,742.95873 682.19896,159.68957 741.65313,159.68957 741.65313,442.95623 784.84573,159.68957 784.90773,159.70477 784.90773,159.68957 " + id="N" + transform="matrix(1,0,0,-1,-92.859802,825.23401)" + inkscape:label="#path10620" /> +</svg> diff --git a/drawing/bin/data/lorenz1.svg b/drawing/bin/data/lorenz1.svg new file mode 100644 index 0000000..81cd618 --- /dev/null +++ b/drawing/bin/data/lorenz1.svg @@ -0,0 +1,161 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="1200mm" + height="900mm" + viewBox="0 0 4251.9685 3188.9764" + id="svg12126" + version="1.1" + inkscape:version="0.91 r13725" + sodipodi:docname="lorenz1.svg"> + <defs + id="defs12128"> + <clipPath + clipPathUnits="userSpaceOnUse" + id="clipPath3820"> + <path + d="m 0,0 11344.252,0 0,8509.606 -11344.252,0 z" + id="path3818" + inkscape:connector-curvature="0" /> + </clipPath> + </defs> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="0.29100247" + inkscape:cx="2125.9843" + inkscape:cy="1594.4882" + inkscape:document-units="px" + inkscape:current-layer="layer1" + showgrid="false" + inkscape:showpageshadow="false" + inkscape:window-width="1920" + inkscape:window-height="1140" + inkscape:window-x="0" + inkscape:window-y="31" + inkscape:window-maximized="1" /> + <metadata + id="metadata12131"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title></dc:title> + </cc:Work> + </rdf:RDF> + </metadata> + <g + inkscape:label="Layer 1" + inkscape:groupmode="layer" + id="layer1" + transform="translate(0,2136.6142)"> + <g + id="g3810" + transform="matrix(0.36786474,0,0,-0.36786474,185.11852,-1527.8311)" + style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-opacity:1;fill-rule:evenodd" /> + <g + id="g3814" + style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-opacity:1;fill-rule:evenodd" + transform="matrix(0.36786474,0,0,-0.36786474,43.88706,1051.6464)"> + <g + id="g3816" + clip-path="url(#clipPath3820)" + style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-opacity:1;fill-rule:evenodd"> + <g + id="g3822" + transform="translate(3179.8359,2193.6797)" + style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-opacity:1;fill-rule:evenodd" /> + <g + id="g3826" + transform="translate(4008.4219,1497.582)" + style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-opacity:1;fill-rule:evenodd" /> + </g> + </g> + <g + id="g3830" + transform="matrix(0.36786474,0,0,-0.36786474,1907.0359,-1527.8311)" + style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-opacity:1;fill-rule:evenodd" /> + <g + id="g3834" + transform="matrix(0.36786474,0,0,-0.36786474,3516.1048,-1527.8311)" + style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-opacity:1;fill-rule:evenodd" /> + <g + id="g3838" + transform="matrix(0.36786474,0,0,-0.36786474,2769.7963,-1527.8311)" + style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-opacity:1;fill-rule:evenodd" /> + <path + inkscape:connector-curvature="0" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.36786473;stroke-opacity:1" + d="m 4075.8024,244.66898 c 0,34.48162 -3.282,67.45901 -9.8001,98.93289 -6.5467,31.49962 -18.7179,58.82225 -36.5447,81.9964 -17.8245,23.17102 -42.782,41.61205 -74.8639,55.25877 -32.0877,13.64564 -74.2829,20.49822 -126.5626,20.49822 -52.3058,0 -94.7797,-6.85258 -127.4536,-20.49822 -32.6971,-13.64672 -57.9302,-32.08775 -75.7573,-55.25877 -17.8241,-23.17415 -30.0243,-50.49678 -36.5391,-81.9964 -6.547,-31.47388 -9.8062,-64.45127 -9.8062,-98.93289 l 0,-1515.81688 c 0,-34.4525 3.2592,-67.4281 9.8062,-98.9326 6.5148,-31.4693 18.715,-58.8223 36.5391,-81.9936 17.8271,-23.1755 43.0602,-41.5857 75.7573,-55.2613 32.6739,-13.6469 75.1478,-20.4957 127.4536,-20.4957 52.2797,0 94.4749,6.8488 126.5626,20.4957 32.0819,13.6756 57.0394,32.0858 74.8639,55.2613 17.8268,23.1713 29.998,50.5243 36.5447,81.9936 6.5181,31.5045 9.8001,64.4801 9.8001,98.9326 z" + id="path12070" /> + <path + inkscape:connector-curvature="0" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.36786473;stroke-opacity:1" + d="m 3785.2528,251.79771 c 0,21.39414 2.9512,37.43472 8.9092,48.13318 5.9344,10.69393 17.2148,16.0409 33.8691,16.0409 27.3227,0 40.9996,-21.39206 40.9996,-64.17408 l 0,-1528.29231 c 0,-42.7813 -13.6769,-64.1709 -40.9996,-64.1709 -16.6543,0 -27.9347,5.0669 -33.8691,15.1484 -5.958,10.1117 -8.9092,26.4604 -8.9092,49.0225 z" + id="path10622" /> + <path + inkscape:connector-curvature="0" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.36786473;stroke-opacity:1" + d="m 2769.7963,-1527.8311 0,1102.96184 -150.4367,-1102.96184 -206.7772,0 0,2028.56972 206.7772,0 0,-985.1817 150.2211,985.1817 0.2156,-0.0521 0,0.0521 206.7747,0 0,-2028.56972 z" + id="path10620" /> + <path + inkscape:connector-curvature="0" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.36786473;stroke-opacity:1" + d="m 3516.1048,-1527.8311 0,187.1656 -274.5105,1654.23857 274.5105,0 0,187.16555 -495.5453,0 0,-163.99141 279.8587,-1677.41271 -260.2496,0 0,-187.1656 z" + id="path10618" /> + <path + inkscape:connector-curvature="0" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.36786473;stroke-opacity:1" + d="m 1907.0359,-1527.8311 447.4181,0 0,187.1656 -240.6437,0 0,736.29705 231.7316,0 0,187.16978 -231.7316,0 0,730.77174 240.6437,0 0,187.16555 -447.4181,0 z" + id="path10616" /> + <path + inkscape:connector-curvature="0" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.36786473;stroke-opacity:1" + d="m 1518.4443,-693.73693 42.7816,0 c 27.3223,0 40.9938,-21.39204 40.9938,-64.17338 l 0,-518.58459 c 0,-42.7786 -13.6715,-64.1706 -40.9938,-64.1706 l -42.7816,0 z" + id="path12080" /> + <path + inkscape:connector-curvature="0" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.36786473;stroke-opacity:1" + d="m 1518.4443,500.73862 -206.7776,0 0,-2028.56972 249.5592,0 c 52.2741,0 94.4749,6.8483 126.5568,20.4981 32.0877,13.6772 57.0449,32.0879 74.8663,55.2589 17.8243,23.1738 29.9986,50.524 36.545,81.9981 6.5179,31.4997 9.8032,64.4798 9.8032,98.9308 l 0,506.10583 c 0,28.5211 -1.1958,51.69248 -3.5666,69.52067 -2.3939,17.8244 -6.8515,32.69534 -13.3695,44.56342 -6.5412,11.89378 -15.1489,21.69572 -25.8456,29.41176 -10.6939,7.74265 -23.7845,14.56529 -39.2177,20.49864 15.4332,8.32583 28.5238,16.65439 39.2177,24.95453 10.6967,8.32856 19.3044,18.44071 25.8456,30.30424 6.518,11.89377 10.9756,26.45876 13.3695,43.66957 2.3708,17.2422 3.5666,38.9403 3.5666,65.06758 l 0,937.78758 -206.7775,0 0,-943.13874 c 0,-39.21228 -11.8894,-60.60434 -35.6453,-64.16956 l -48.1301,0 z" + id="path10612" /> + <path + inkscape:connector-curvature="0" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.36786473;stroke-opacity:1" + d="m 923.08404,251.79771 c 0,21.39345 2.95172,37.43472 8.9122,48.13282 5.9316,10.69394 17.21193,16.04091 33.86635,16.04091 27.32262,0 41.00241,-21.39205 41.00241,-64.17373 l 0,-1528.29261 c 0,-42.7813 -13.67979,-64.1709 -41.00241,-64.1709 -16.65442,0 -27.93475,5.0668 -33.86635,15.1487 -5.96048,10.1117 -8.9122,26.4604 -8.9122,49.0222 z" + id="path12084" /> + <path + inkscape:connector-curvature="0" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.36786473;stroke-opacity:1" + d="m 1213.6366,244.66898 c 0,34.48126 -3.2848,67.45866 -9.8028,98.93254 -6.5469,31.49962 -18.7151,58.8226 -36.5451,81.9964 -17.824,23.17137 -42.7817,41.61205 -74.8635,55.25912 -32.0877,13.6453 -74.2827,20.49786 -126.56261,20.49786 -52.30564,0 -94.77954,-6.85256 -127.45087,-20.49786 -32.69708,-13.64707 -57.93295,-32.08775 -75.75699,-55.25912 -17.82718,-23.1738 -30.02707,-50.49678 -36.54227,-81.9964 -6.54686,-31.47388 -9.80604,-64.45128 -9.80604,-98.93254 l 0,-1515.81688 c 0,-34.4528 3.25918,-67.4284 9.80604,-98.9329 6.5152,-31.4693 18.71509,-58.8223 36.54227,-81.9933 17.82404,-23.1755 43.05991,-41.586 75.75699,-55.2619 32.67133,-13.6463 75.14523,-20.4954 127.45087,-20.4954 52.27991,0 94.47491,6.8491 126.56261,20.4954 32.0818,13.6759 57.0395,32.0864 74.8635,55.2619 17.83,23.171 29.9982,50.524 36.5451,81.9933 6.518,31.5045 9.8028,64.4801 9.8028,98.9329 z" + id="path10608" /> + <path + inkscape:connector-curvature="0" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.36786473;stroke-opacity:1" + d="m 185.11852,-1527.8311 206.77763,0 0,1841.40417 262.03427,0 0,187.16555 -468.8119,0 z" + id="path10606" /> + <path + inkscape:connector-curvature="0" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.36786473;stroke-opacity:1" + d="m 4112.7585,742.3745 -3964.59333,0 0,-206.77484 3964.59333,0 z" + id="path10604" /> + <path + inkscape:connector-curvature="0" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.36786473;stroke-opacity:1" + d="m 4112.7585,-1562.69 -3964.59333,0 0,-206.7767 3964.59333,0 z" + id="path3852" /> + </g> +</svg> diff --git a/drawing/bin/data/lorenzo-weird.svg b/drawing/bin/data/lorenzo-weird.svg new file mode 100644 index 0000000..a5bb1f9 --- /dev/null +++ b/drawing/bin/data/lorenzo-weird.svg @@ -0,0 +1,118 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="1141px" + height="724px" + viewBox="0 0 1141 724" + version="1.1" + id="svg2" + inkscape:version="0.91 r13725" + sodipodi:docname="lorenzo-weird.svg"> + <metadata + id="metadata31"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title>lorenzo</dc:title> + </cc:Work> + </rdf:RDF> + </metadata> + <sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1920" + inkscape:window-height="1140" + id="namedview29" + showgrid="false" + inkscape:zoom="1.2868004" + inkscape:cx="568.08355" + inkscape:cy="385.75935" + inkscape:window-x="0" + inkscape:window-y="31" + inkscape:window-maximized="1" + inkscape:current-layer="svg2" /> + <!-- Generator: Sketch 48.2 (47327) - http://www.bohemiancoding.com/sketch --> + <title + id="title4">lorenzo</title> + <desc + id="desc6">Created with Sketch.</desc> + <defs + id="defs8"> + <polygon + id="path-1" + points="0 0 1199.89451 0 1199.89451 900.070762 0 900.070762" /> + <mask + fill="white" + id="mask-2"> + <use + height="100%" + width="100%" + y="0" + x="0" + id="use17" + xlink:href="#path-1" /> + </mask> + </defs> + <path + style="fill:#000000;fill-rule:nonzero;stroke:#000000;stroke-width:0.5" + inkscape:connector-curvature="0" + id="O2" + d="m 1129.7534,580.01626 c 0,9.9144 -0.9438,19.39627 -2.8179,28.44587 -1.8824,9.05707 -5.3819,16.91307 -10.5076,23.57627 -5.1249,6.66226 -12.3009,11.96453 -21.5253,15.88839 -9.2262,3.92347 -21.3584,5.89374 -36.3903,5.89374 -15.0393,0 -27.2517,-1.97027 -36.6464,-5.89374 -9.4012,-3.92386 -16.6564,-9.22613 -21.7822,-15.88839 -5.12487,-6.6632 -8.63277,-14.5192 -10.50597,-23.57627 -1.8824,-9.0496 -2.8196,-18.53147 -2.8196,-28.44587 l 0,-435.83865 c 0,-9.906 0.9372,-19.38747 2.8196,-28.44587 1.8732,-9.04827 5.3811,-16.91293 10.50597,-23.57533 5.1258,-6.6636 12.381,-11.95707 21.7822,-15.8892 9.3947,-3.92387 21.6071,-5.89307 36.6464,-5.89307 15.0319,0 27.1641,1.9692 36.3903,5.89307 9.2244,3.93213 16.4004,9.2256 21.5253,15.8892 5.1257,6.6624 8.6252,14.52706 10.5076,23.57533 1.8741,9.0584 2.8179,18.53987 2.8179,28.44587 l 0,435.83865 z m -83.5411,2.04974 c 0,6.15133 0.8487,10.76346 2.5617,13.8396 1.7063,3.0748 4.9498,4.61213 9.7383,4.61213 7.856,0 11.7885,-6.1508 11.7885,-18.45173 l 0,-439.42573 c 0,-12.3008 -3.9325,-18.45093 -11.7885,-18.45093 -4.7885,0 -8.032,1.45693 -9.7383,4.3556 -1.713,2.90747 -2.5617,7.60813 -2.5617,14.09533 l 0,439.42573 z" + inkscape:label="#path10622" /> + <polygon + style="fill:#000000;fill-rule:nonzero;stroke:#000000;stroke-width:0.5" + points="857.00894,206.84161 937.47603,689.14353 862.64707,689.14353 862.64707,742.95873 999.49176,742.95873 999.49176,689.14353 920.56248,213.50477 999.49176,213.50477 999.49176,159.68957 857.00894,159.68957 " + id="Z" + transform="matrix(1,0,0,-1,-30.666667,813.33287)" + inkscape:label="#path10618" /> + <polygon + style="fill:#000000;fill-rule:nonzero;stroke:#000000;stroke-width:0.5" + points="662.923,423.62158 596.29385,423.62158 596.29385,213.50477 665.48552,213.50477 665.48552,159.68957 536.84052,159.68957 536.84052,742.95873 665.48552,742.95873 665.48552,689.14353 596.29385,689.14353 596.29385,477.43804 662.923,477.43804 " + id="E" + transform="matrix(1,0,0,-1,-30.666667,813.33287)" + inkscape:label="#path10616" /> + <path + style="fill:#000000;fill-rule:nonzero;stroke:#000000;stroke-width:0.5" + inkscape:connector-curvature="0" + id="R" + d="m 394.44319,310.199 12.30086,0 c 7.85595,0 11.78683,-6.15081 11.78683,-18.45168 l 0,-149.10717 c 0,-12.30001 -3.93088,-18.45082 -11.78683,-18.45082 l -12.30086,0 0,186.00967 z m 0,343.4443 -59.45418,0 0,-583.26916 71.75504,0 c 15.03019,0 27.16415,1.96914 36.38856,5.89377 9.22609,3.93258 16.40193,9.22611 21.52612,15.88842 5.12493,6.66316 8.62532,14.52704 10.50763,23.5767 1.87416,9.05698 2.81869,18.53968 2.81869,28.44536 l 0,145.5192 c 0,8.20055 -0.34376,14.86296 -1.02545,19.98905 -0.68836,5.12504 -1.96999,9.40083 -3.84415,12.81323 -1.88072,3.41979 -4.35565,6.23805 -7.43127,8.45672 -3.07477,2.22616 -6.83874,4.18789 -11.27615,5.89388 4.43741,2.39392 8.20138,4.78857 11.27615,7.17509 3.07562,2.39466 5.55055,5.3022 7.43127,8.71332 1.87416,3.41979 3.15579,7.60759 3.84415,12.5562 0.68169,4.9576 1.02545,11.1964 1.02545,18.70869 l 0,269.63953 -59.45417,0 0,-271.17818 c 0,-11.27457 -3.41852,-17.42537 -10.24901,-18.45051 l -13.83868,0 0,289.62869 z" + inkscape:label="#path10612" /> + <path + style="fill:#000000;fill-rule:nonzero;stroke:#000000;stroke-width:0.5" + inkscape:connector-curvature="0" + id="O" + d="m 223.26084,582.06598 c 0,6.15123 0.84871,10.76348 2.56252,13.83952 1.70556,3.07478 4.94892,4.61215 9.73751,4.61215 7.85604,0 11.78935,-6.1508 11.78935,-18.45167 l 0,-439.42579 c 0,-12.30086 -3.93331,-18.45093 -11.78935,-18.45093 -4.78859,0 -8.03195,1.45689 -9.73751,4.35565 -1.71381,2.90744 -2.56252,7.60812 -2.56252,14.09528 l 0,439.42579 z m 83.54187,-2.04973 c 0,9.91435 -0.94455,19.3962 -2.8186,28.44577 -1.8824,9.05708 -5.38111,16.91312 -10.50772,23.57628 -5.12494,6.66232 -12.30087,11.96452 -21.52528,15.88841 -9.22609,3.92348 -21.35837,5.89378 -36.39024,5.89378 -15.03929,0 -27.25173,-1.9703 -36.64559,-5.89378 -9.40125,-3.92389 -16.65725,-9.22609 -21.78218,-15.88841 -5.12578,-6.66316 -8.63358,-14.5192 -10.50688,-23.57628 -1.88242,-9.04957 -2.81955,-18.53142 -2.81955,-28.44577 l 0,-435.83868 c 0,-9.9061 0.93713,-19.38754 2.81955,-28.44588 1.8733,-9.0483 5.3811,-16.91301 10.50688,-23.57532 5.12493,-6.66359 12.38093,-11.95712 21.78218,-15.88927 9.39386,-3.92378 21.6063,-5.89304 36.64559,-5.89304 15.03187,0 27.16415,1.96926 36.39024,5.89304 9.22441,3.93215 16.40034,9.22568 21.52528,15.88927 5.12661,6.66231 8.62532,14.52702 10.50772,23.57532 1.87405,9.05834 2.8186,18.53978 2.8186,28.44588 l 0,435.83868 z" + inkscape:label="#path10608" /> + <polygon + style="fill:#000000;fill-rule:nonzero;stroke:#000000;stroke-width:0.5;stroke-opacity:1" + points="41.742356,742.95873 101.19653,742.95873 101.19653,213.50477 176.53858,213.50477 176.53858,159.68957 41.742356,159.68957 " + id="L" + transform="matrix(1,0,0,-1,-30.666667,813.33287)" + inkscape:label="#path10606" /> + <polygon + style="fill:#000000;fill-rule:nonzero;stroke:#000000;stroke-width:0.5" + points="31.117223,149.66608 1171.0459,149.66608 1171.0459,90.212744 31.117223,90.212744 " + id="path10604" + transform="matrix(1,0,0,-1,-30.666667,813.33287)" /> + <polygon + style="fill:#000000;fill-rule:nonzero;stroke:#000000;stroke-width:0.5" + points="31.117223,812.43553 1171.0459,812.43553 1171.0459,752.98166 31.117223,752.98166 " + id="path3852" + transform="matrix(1,0,0,-1,-30.666667,813.33287)" /> +</svg> diff --git a/drawing/bin/data/lorenzos.sketch b/drawing/bin/data/lorenzos.sketch Binary files differnew file mode 100644 index 0000000..38d9d34 --- /dev/null +++ b/drawing/bin/data/lorenzos.sketch diff --git a/drawing/bin/data/lorenzos.svg b/drawing/bin/data/lorenzos.svg new file mode 100644 index 0000000..b39f1a7 --- /dev/null +++ b/drawing/bin/data/lorenzos.svg @@ -0,0 +1,116 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="1141px" + height="724px" + viewBox="0 0 1141 724" + version="1.1" + id="svg2" + inkscape:version="0.91 r13725" + sodipodi:docname="lorenzos.svg"> + <metadata + id="metadata31"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + </cc:Work> + </rdf:RDF> + </metadata> + <sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1914" + inkscape:window-height="1142" + id="namedview29" + showgrid="false" + inkscape:zoom="1.2868004" + inkscape:cx="570.41491" + inkscape:cy="361.99126" + inkscape:window-x="0" + inkscape:window-y="31" + inkscape:window-maximized="0" + inkscape:current-layer="svg2" /> + <!-- Generator: Sketch 48.2 (47327) - http://www.bohemiancoding.com/sketch --> + <title + id="title4">lorenzo</title> + <desc + id="desc6">Created with Sketch.</desc> + <defs + id="defs8"> + <polygon + id="path-1" + points="0 0 1199.89451 0 1199.89451 900.070762 0 900.070762" /> + <mask + fill="white" + id="mask-2"> + <use + height="100%" + width="100%" + y="0" + x="0" + id="use17" + xlink:href="#path-1" /> + </mask> + </defs> + <path + style="fill:#000000;fill-rule:nonzero;stroke:#000000;stroke-width:0.5" + inkscape:connector-curvature="0" + id="path10622" + d="m 1129.7534,580.01626 c 0,9.9144 -0.9438,19.39627 -2.8179,28.44587 -1.8824,9.05707 -5.3819,16.91307 -10.5076,23.57627 -5.1249,6.66226 -12.3009,11.96453 -21.5253,15.88839 -9.2262,3.92347 -21.3584,5.89374 -36.3903,5.89374 -15.0393,0 -27.2517,-1.97027 -36.6464,-5.89374 -9.4012,-3.92386 -16.6564,-9.22613 -21.7822,-15.88839 -5.12487,-6.6632 -8.63277,-14.5192 -10.50597,-23.57627 -1.8824,-9.0496 -2.8196,-18.53147 -2.8196,-28.44587 l 0,-435.83865 c 0,-9.906 0.9372,-19.38747 2.8196,-28.44587 1.8732,-9.04827 5.3811,-16.91293 10.50597,-23.57533 5.1258,-6.6636 12.381,-11.95707 21.7822,-15.8892 9.3947,-3.92387 21.6071,-5.89307 36.6464,-5.89307 15.0319,0 27.1641,1.9692 36.3903,5.89307 9.2244,3.93213 16.4004,9.2256 21.5253,15.8892 5.1257,6.6624 8.6252,14.52706 10.5076,23.57533 1.8741,9.0584 2.8179,18.53987 2.8179,28.44587 l 0,435.83865 z m -83.5411,2.04974 c 0,6.15133 0.8487,10.76346 2.5617,13.8396 1.7063,3.0748 4.9498,4.61213 9.7383,4.61213 7.856,0 11.7885,-6.1508 11.7885,-18.45173 l 0,-439.42573 c 0,-12.3008 -3.9325,-18.45093 -11.7885,-18.45093 -4.7885,0 -8.032,1.45693 -9.7383,4.3556 -1.713,2.90747 -2.5617,7.60813 -2.5617,14.09533 l 0,439.42573 z" /> + <polygon + style="fill:#000000;fill-rule:nonzero;stroke:#000000;stroke-width:0.5" + points="741.65313,442.95623 784.84573,159.68957 784.90773,159.70477 784.90773,159.68957 844.36106,159.68957 844.36106,742.95873 784.90771,742.95873 784.90771,425.82712 741.65313,742.95873 682.19896,742.95873 682.19896,159.68957 741.65313,159.68957 " + id="path10620" + transform="matrix(1,0,0,-1,-30.666667,813.33287)" /> + <polygon + style="fill:#000000;fill-rule:nonzero;stroke:#000000;stroke-width:0.5" + points="857.00894,206.84161 937.47603,689.14353 862.64707,689.14353 862.64707,742.95873 999.49176,742.95873 999.49176,689.14353 920.56248,213.50477 999.49176,213.50477 999.49176,159.68957 857.00894,159.68957 " + id="path10618" + transform="matrix(1,0,0,-1,-30.666667,813.33287)" /> + <polygon + style="fill:#000000;fill-rule:nonzero;stroke:#000000;stroke-width:0.5" + points="662.923,423.62158 596.29385,423.62158 596.29385,213.50477 665.48552,213.50477 665.48552,159.68957 536.84052,159.68957 536.84052,742.95873 665.48552,742.95873 665.48552,689.14353 596.29385,689.14353 596.29385,477.43804 662.923,477.43804 " + id="path10616" + transform="matrix(1,0,0,-1,-30.666667,813.33287)" /> + <path + style="fill:#000000;fill-rule:nonzero;stroke:#000000;stroke-width:0.5" + inkscape:connector-curvature="0" + id="path10612" + d="m 394.44319,310.199 12.30086,0 c 7.85595,0 11.78683,-6.15081 11.78683,-18.45168 l 0,-149.10717 c 0,-12.30001 -3.93088,-18.45082 -11.78683,-18.45082 l -12.30086,0 0,186.00967 z m 0,343.4443 -59.45418,0 0,-583.26916 71.75504,0 c 15.03019,0 27.16415,1.96914 36.38856,5.89377 9.22609,3.93258 16.40193,9.22611 21.52612,15.88842 5.12493,6.66316 8.62532,14.52704 10.50763,23.5767 1.87416,9.05698 2.81869,18.53968 2.81869,28.44536 l 0,145.5192 c 0,8.20055 -0.34376,14.86296 -1.02545,19.98905 -0.68836,5.12504 -1.96999,9.40083 -3.84415,12.81323 -1.88072,3.41979 -4.35565,6.23805 -7.43127,8.45672 -3.07477,2.22616 -6.83874,4.18789 -11.27615,5.89388 4.43741,2.39392 8.20138,4.78857 11.27615,7.17509 3.07562,2.39466 5.55055,5.3022 7.43127,8.71332 1.87416,3.41979 3.15579,7.60759 3.84415,12.5562 0.68169,4.9576 1.02545,11.1964 1.02545,18.70869 l 0,269.63953 -59.45417,0 0,-271.17818 c 0,-11.27457 -3.41852,-17.42537 -10.24901,-18.45051 l -13.83868,0 0,289.62869 z" /> + <path + style="fill:#000000;fill-rule:nonzero;stroke:#000000;stroke-width:0.5" + inkscape:connector-curvature="0" + id="path10608" + d="m 223.26084,582.06598 c 0,6.15123 0.84871,10.76348 2.56252,13.83952 1.70556,3.07478 4.94892,4.61215 9.73751,4.61215 7.85604,0 11.78935,-6.1508 11.78935,-18.45167 l 0,-439.42579 c 0,-12.30086 -3.93331,-18.45093 -11.78935,-18.45093 -4.78859,0 -8.03195,1.45689 -9.73751,4.35565 -1.71381,2.90744 -2.56252,7.60812 -2.56252,14.09528 l 0,439.42579 z m 83.54187,-2.04973 c 0,9.91435 -0.94455,19.3962 -2.8186,28.44577 -1.8824,9.05708 -5.38111,16.91312 -10.50772,23.57628 -5.12494,6.66232 -12.30087,11.96452 -21.52528,15.88841 -9.22609,3.92348 -21.35837,5.89378 -36.39024,5.89378 -15.03929,0 -27.25173,-1.9703 -36.64559,-5.89378 -9.40125,-3.92389 -16.65725,-9.22609 -21.78218,-15.88841 -5.12578,-6.66316 -8.63358,-14.5192 -10.50688,-23.57628 -1.88242,-9.04957 -2.81955,-18.53142 -2.81955,-28.44577 l 0,-435.83868 c 0,-9.9061 0.93713,-19.38754 2.81955,-28.44588 1.8733,-9.0483 5.3811,-16.91301 10.50688,-23.57532 5.12493,-6.66359 12.38093,-11.95712 21.78218,-15.88927 9.39386,-3.92378 21.6063,-5.89304 36.64559,-5.89304 15.03187,0 27.16415,1.96926 36.39024,5.89304 9.22441,3.93215 16.40034,9.22568 21.52528,15.88927 5.12661,6.66231 8.62532,14.52702 10.50772,23.57532 1.87405,9.05834 2.8186,18.53978 2.8186,28.44588 l 0,435.83868 z" /> + <polygon + style="fill:#000000;fill-rule:nonzero;stroke:#000000;stroke-width:0.5;stroke-opacity:1" + points="41.742356,742.95873 101.19653,742.95873 101.19653,213.50477 176.53858,213.50477 176.53858,159.68957 41.742356,159.68957 " + id="path10606" + transform="matrix(1,0,0,-1,-30.666667,813.33287)" /> + <polygon + style="fill:#000000;fill-rule:nonzero;stroke:#000000;stroke-width:0.5" + points="31.117223,149.66608 1171.0459,149.66608 1171.0459,90.212744 31.117223,90.212744 " + id="path10604" + transform="matrix(1,0,0,-1,-30.666667,813.33287)" /> + <polygon + style="fill:#000000;fill-rule:nonzero;stroke:#000000;stroke-width:0.5" + points="31.117223,812.43553 1171.0459,812.43553 1171.0459,752.98166 31.117223,752.98166 " + id="path3852" + transform="matrix(1,0,0,-1,-30.666667,813.33287)" /> +</svg> diff --git a/drawing/bin/data/shapes3.svg b/drawing/bin/data/shapes3.svg new file mode 100644 index 0000000..0470db3 --- /dev/null +++ b/drawing/bin/data/shapes3.svg @@ -0,0 +1,104 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + version="1.1" + id="svg3718" + xml:space="preserve" + width="1200" + height="900" + viewBox="0 0 1200 899.99996" + sodipodi:docname="shapes3.svg" + inkscape:version="0.91 r13725"><metadata + id="metadata3724"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs + id="defs3722"><clipPath + clipPathUnits="userSpaceOnUse" + id="clipPath3796"><path + d="m 0,0 11344.252,0 0,8509.606 -11344.252,0 z" + id="path3794" + inkscape:connector-curvature="0" /></clipPath><clipPath + clipPathUnits="userSpaceOnUse" + id="clipPath3820"><path + d="m 0,0 11344.252,0 0,8509.606 -11344.252,0 z" + id="path3818" + inkscape:connector-curvature="0" /></clipPath><clipPath + clipPathUnits="userSpaceOnUse" + id="clipPath3848"><path + d="m 0,0 11344.252,0 0,8509.606 -11344.252,0 z" + id="path3846" + inkscape:connector-curvature="0" /></clipPath></defs><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1920" + inkscape:window-height="1140" + id="namedview3720" + showgrid="false" + showguides="false" + inkscape:zoom="0.64916666" + inkscape:cx="811.20277" + inkscape:cy="440.28878" + inkscape:window-x="0" + inkscape:window-y="31" + inkscape:window-maximized="1" + inkscape:current-layer="g3726" /><g + id="g3726" + inkscape:groupmode="layer" + inkscape:label="LS_PVCBanner_Dublin_NEW" + transform="matrix(1.3333333,0,0,-1.3333333,0,899.99954)"><g + id="g3810" + transform="matrix(0.07932836,0,0,0.07932836,32.306768,556.21906)" + style="stroke:#000000;stroke-opacity:1;fill:#000000;fill-opacity:1" /><g + id="g3814" + style="stroke:#000000;stroke-opacity:1;fill:#000000;fill-opacity:1" + transform="matrix(0.07932836,0,0,0.07932836,1.8508681,-0.03354016)"><g + id="g3816" + clip-path="url(#clipPath3820)" + style="stroke:#000000;stroke-opacity:1;fill:#000000;fill-opacity:1"><g + id="g3822" + transform="translate(3179.8359,2193.6797)" + style="stroke:#000000;stroke-opacity:1;fill:#000000;fill-opacity:1" /><g + id="g3826" + transform="translate(4008.4219,1497.582)" + style="stroke:#000000;stroke-opacity:1;fill:#000000;fill-opacity:1" /></g></g><g + id="g3830" + transform="matrix(0.07932836,0,0,0.07932836,403.6304,556.21906)" + style="stroke:#000000;stroke-opacity:1;fill:#000000;fill-opacity:1" /><g + id="g3834" + transform="matrix(0.07932836,0,0,0.07932836,750.61884,556.21906)" + style="stroke:#000000;stroke-opacity:1;fill:#000000;fill-opacity:1" /><g + id="g3838" + transform="matrix(0.07932836,0,0,0.07932836,589.6808,556.21906)" + style="stroke:#000000;stroke-opacity:1;fill:#000000;fill-opacity:1" /><ellipse + ry="143.5105" + rx="144.74768" + cy="-503.68338" + cx="309.46039" + id="path3596" + style="fill:#ff0000;fill-rule:evenodd;stroke:#000000;stroke-width:1.81224549px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + transform="scale(1,-1)" /><rect + y="-482.6517" + x="512.35461" + height="338.98172" + width="269.70078" + id="rect3598" + style="fill:#0000ff;fill-rule:evenodd;stroke:#000000;stroke-width:1.81224549px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + transform="scale(1,-1)" /><path + inkscape:connector-curvature="0" + d="m 308.22322,90.472139 -92.82778,24.731181 -72.99846,-62.448821 -5.16461,95.926841 -81.950097,50.12789 89.635857,34.55483 22.35049,93.42957 60.56261,-74.57074 95.7635,7.61475 -52.2061,-80.6421 z" + id="path3600" + style="fill:#ffff00;fill-rule:evenodd;stroke:#000000;stroke-width:1.81224549px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /></g></svg>
\ No newline at end of file diff --git a/drawing/bin/data/skyline.png b/drawing/bin/data/skyline.png Binary files differnew file mode 100644 index 0000000..d1918fd --- /dev/null +++ b/drawing/bin/data/skyline.png diff --git a/drawing/libs/libHeliosDacAPI.dylib b/drawing/libs/libHeliosDacAPI.dylib Binary files differnew file mode 100755 index 0000000..2544dff --- /dev/null +++ b/drawing/libs/libHeliosDacAPI.dylib diff --git a/drawing/obj/osx/Release/.compiler_flags b/drawing/obj/osx/Release/.compiler_flags new file mode 100644 index 0000000..0df9b92 --- /dev/null +++ b/drawing/obj/osx/Release/.compiler_flags @@ -0,0 +1 @@ +-Os -mtune=native -DNDEBUG -stdlib=libc++ -Wall -fexceptions -fpascal-strings -mmacosx-version-min=10.9 -D__MACOSX_CORE__ -fPIC -x objective-c++ -std=c++11 -I../../openFrameworks/libs/FreeImage/include -I../../openFrameworks/libs/boost/include -I../../openFrameworks/libs/boost/include/boost -I../../openFrameworks/libs/cairo/include -I../../openFrameworks/libs/cairo/include/cairo -I../../openFrameworks/libs/curl/include -I../../openFrameworks/libs/curl/include/curl -I../../openFrameworks/libs/fmodex/include -I../../openFrameworks/libs/freetype/include -I../../openFrameworks/libs/freetype/include/freetype2 -I../../openFrameworks/libs/freetype/include/freetype2/freetype -I../../openFrameworks/libs/freetype/include/freetype2/freetype/config -I../../openFrameworks/libs/freetype/include/freetype2/freetype/internal -I../../openFrameworks/libs/freetype/include/freetype2/freetype/internal/services -I../../openFrameworks/libs/glew/include -I../../openFrameworks/libs/glew/include/GL -I../../openFrameworks/libs/glfw/include -I../../openFrameworks/libs/glfw/include/GLFW -I../../openFrameworks/libs/glm/include -I../../openFrameworks/libs/glm/include/glm -I../../openFrameworks/libs/glm/include/glm/detail -I../../openFrameworks/libs/glm/include/glm/gtc -I../../openFrameworks/libs/glm/include/glm/gtx -I../../openFrameworks/libs/glm/include/glm/simd -I../../openFrameworks/libs/json/include -I../../openFrameworks/libs/kiss/include -I../../openFrameworks/libs/pugixml/include -I../../openFrameworks/libs/rtAudio/include -I../../openFrameworks/libs/tess2/include -I../../openFrameworks/libs/uriparser/include -I../../openFrameworks/libs/uriparser/include/uriparser -I../../openFrameworks/libs/utf8/include -I../../openFrameworks/libs/utf8/include/utf8 -I../../openFrameworks/libs/utf8cpp/include -I../../openFrameworks/libs/utf8cpp/include/utf8 -I../../openFrameworks/libs/openFrameworks -I../../openFrameworks/libs/openFrameworks/3d -I../../openFrameworks/libs/openFrameworks/app -I../../openFrameworks/libs/openFrameworks/communication -I../../openFrameworks/libs/openFrameworks/events -I../../openFrameworks/libs/openFrameworks/gl -I../../openFrameworks/libs/openFrameworks/graphics -I../../openFrameworks/libs/openFrameworks/math -I../../openFrameworks/libs/openFrameworks/sound -I../../openFrameworks/libs/openFrameworks/types -I../../openFrameworks/libs/openFrameworks/utils -I../../openFrameworks/libs/openFrameworks/video -I/work/workspace/raverony/drawing/Frameworks -I/work/workspace/raverony/drawing/Frameworks/Syphon.framework -I/work/workspace/raverony/drawing/Frameworks/Syphon.framework/Headers -I/work/workspace/raverony/drawing/Frameworks/Syphon.framework/Resources -I/work/workspace/raverony/drawing/Frameworks/Syphon.framework/Resources/English.lproj -I/work/workspace/raverony/drawing/Frameworks/Syphon.framework/Versions -I/work/workspace/raverony/drawing/Frameworks/Syphon.framework/Versions/A -I/work/workspace/raverony/drawing/Frameworks/Syphon.framework/Versions/A/Headers -I/work/workspace/raverony/drawing/Frameworks/Syphon.framework/Versions/A/Resources -I/work/workspace/raverony/drawing/Frameworks/Syphon.framework/Versions/A/Resources/English.lproj -I/work/workspace/raverony/drawing/Frameworks/Syphon.framework/Versions/Current -I/work/workspace/raverony/drawing/Frameworks/Syphon.framework/Versions/Current/Headers -I/work/workspace/raverony/drawing/Frameworks/Syphon.framework/Versions/Current/Resources -I/work/workspace/raverony/drawing/Frameworks/Syphon.framework/Versions/Current/Resources/English.lproj -I/work/workspace/raverony/drawing/libs -I/work/workspace/raverony/drawing/src -I/work/workspace/openFrameworks/addons/ofxSvg/src -I/work/workspace/openFrameworks/addons/ofxSvg/libs -I/work/workspace/openFrameworks/addons/ofxSvg/libs/libxml2 -I/work/workspace/openFrameworks/addons/ofxSvg/libs/libxml2/include -I/work/workspace/openFrameworks/addons/ofxSvg/libs/libxml2/include/libxml -I/work/workspace/openFrameworks/addons/ofxSvg/libs/libxml2/lib -I/work/workspace/openFrameworks/addons/ofxSvg/libs/libxml2/lib/osx -I/work/workspace/openFrameworks/addons/ofxSvg/libs/libxml2/license -I/work/workspace/openFrameworks/addons/ofxSvg/libs/svgtiny -I/work/workspace/openFrameworks/addons/ofxSvg/libs/svgtiny/include -I/work/workspace/openFrameworks/addons/ofxSvg/libs/svgtiny/lib -I/work/workspace/openFrameworks/addons/ofxSvg/libs/svgtiny/lib/osx -I/work/workspace/openFrameworks/addons/ofxSvg/libs/svgtiny/license -I/work/workspace/openFrameworks/addons/ofxClipper/src -I/work/workspace/openFrameworks/addons/ofxClipper/libs -I/work/workspace/openFrameworks/addons/ofxClipper/libs/clipper -I/work/workspace/openFrameworks/addons/ofxClipper/libs/clipper/src -I/work/workspace/openFrameworks/addons/ofxClipper/libs/clipper/src/cpp -I/work/workspace/openFrameworks/addons/ofxClipper/libs/ofxClipper -I/work/workspace/openFrameworks/addons/ofxClipper/libs/ofxClipper/include -I/work/workspace/openFrameworks/addons/ofxClipper/libs/ofxClipper/include/ofx -I/work/workspace/openFrameworks/addons/ofxClipper/libs/ofxClipper/src -I/work/workspace/openFrameworks/addons/ofxSyphon/src -I/work/workspace/openFrameworks/addons/ofxSyphon/libs -I/work/workspace/openFrameworks/addons/ofxSyphon/libs/Syphon -I/work/workspace/openFrameworks/addons/ofxSyphon/libs/Syphon/lib -I/work/workspace/openFrameworks/addons/ofxSyphon/libs/Syphon/lib/osx -I/work/workspace/openFrameworks/addons/ofxSyphon/libs/Syphon/lib/osx/Syphon.framework -I/work/workspace/openFrameworks/addons/ofxSyphon/libs/Syphon/lib/osx/Syphon.framework/Headers -I/work/workspace/openFrameworks/addons/ofxSyphon/libs/Syphon/lib/osx/Syphon.framework/Resources -I/work/workspace/openFrameworks/addons/ofxSyphon/libs/Syphon/lib/osx/Syphon.framework/Resources/English.lproj -I/work/workspace/openFrameworks/addons/ofxSyphon/libs/Syphon/lib/osx/Syphon.framework/Versions -I/work/workspace/openFrameworks/addons/ofxSyphon/libs/Syphon/lib/osx/Syphon.framework/Versions/A -I/work/workspace/openFrameworks/addons/ofxSyphon/libs/Syphon/lib/osx/Syphon.framework/Versions/A/Headers -I/work/workspace/openFrameworks/addons/ofxSyphon/libs/Syphon/lib/osx/Syphon.framework/Versions/A/Resources -I/work/workspace/openFrameworks/addons/ofxSyphon/libs/Syphon/lib/osx/Syphon.framework/Versions/A/Resources/English.lproj -I/work/workspace/openFrameworks/addons/ofxSyphon/libs/Syphon/lib/osx/Syphon.framework/Versions/Current -I/work/workspace/openFrameworks/addons/ofxSyphon/libs/Syphon/lib/osx/Syphon.framework/Versions/Current/Headers -I/work/workspace/openFrameworks/addons/ofxSyphon/libs/Syphon/lib/osx/Syphon.framework/Versions/Current/Resources -I/work/workspace/openFrameworks/addons/ofxSyphon/libs/Syphon/lib/osx/Syphon.framework/Versions/Current/Resources/English.lproj -I/work/workspace/openFrameworks/addons/ofxSyphon/libs/Syphon/src -I/work/workspace/openFrameworks/addons/ofxOpenCv/src -I/work/workspace/openFrameworks/addons/ofxOpenCv/libs -I/work/workspace/openFrameworks/addons/ofxOpenCv/libs/opencv -I/work/workspace/openFrameworks/addons/ofxOpenCv/libs/opencv/include -I/work/workspace/openFrameworks/addons/ofxOpenCv/libs/opencv/include/opencv -I/work/workspace/openFrameworks/addons/ofxOpenCv/libs/opencv/include/opencv2 -I/work/workspace/openFrameworks/addons/ofxOpenCv/libs/opencv/include/opencv2/calib3d -I/work/workspace/openFrameworks/addons/ofxOpenCv/libs/opencv/include/opencv2/core -I/work/workspace/openFrameworks/addons/ofxOpenCv/libs/opencv/include/opencv2/core/cuda -I/work/workspace/openFrameworks/addons/ofxOpenCv/libs/opencv/include/opencv2/core/cuda/detail -I/work/workspace/openFrameworks/addons/ofxOpenCv/libs/opencv/include/opencv2/core/hal -I/work/workspace/openFrameworks/addons/ofxOpenCv/libs/opencv/include/opencv2/features2d -I/work/workspace/openFrameworks/addons/ofxOpenCv/libs/opencv/include/opencv2/flann -I/work/workspace/openFrameworks/addons/ofxOpenCv/libs/opencv/include/opencv2/highgui -I/work/workspace/openFrameworks/addons/ofxOpenCv/libs/opencv/include/opencv2/imgcodecs -I/work/workspace/openFrameworks/addons/ofxOpenCv/libs/opencv/include/opencv2/imgproc -I/work/workspace/openFrameworks/addons/ofxOpenCv/libs/opencv/include/opencv2/imgproc/detail -I/work/workspace/openFrameworks/addons/ofxOpenCv/libs/opencv/include/opencv2/ml -I/work/workspace/openFrameworks/addons/ofxOpenCv/libs/opencv/include/opencv2/objdetect -I/work/workspace/openFrameworks/addons/ofxOpenCv/libs/opencv/include/opencv2/photo -I/work/workspace/openFrameworks/addons/ofxOpenCv/libs/opencv/include/opencv2/shape -I/work/workspace/openFrameworks/addons/ofxOpenCv/libs/opencv/include/opencv2/stitching -I/work/workspace/openFrameworks/addons/ofxOpenCv/libs/opencv/include/opencv2/stitching/detail -I/work/workspace/openFrameworks/addons/ofxOpenCv/libs/opencv/include/opencv2/superres -I/work/workspace/openFrameworks/addons/ofxOpenCv/libs/opencv/include/opencv2/video -I/work/workspace/openFrameworks/addons/ofxOpenCv/libs/opencv/include/opencv2/videoio -I/work/workspace/openFrameworks/addons/ofxOpenCv/libs/opencv/include/opencv2/videostab -I/work/workspace/openFrameworks/addons/ofxOpenCv/libs/opencv/lib -I/work/workspace/openFrameworks/addons/ofxOpenCv/libs/opencv/lib/osx -I/work/workspace/openFrameworks/addons/ofxOpenCv/libs/opencv/license -I/work/workspace/openFrameworks/addons/ofxHelios/src -I/work/workspace/openFrameworks/addons/ofxHelios/libs -I/work/workspace/openFrameworks/addons/ofxHelios/libs/libheliosdac -I/work/workspace/openFrameworks/addons/ofxHelios/libs/libheliosdac/includes -I/work/workspace/openFrameworks/addons/ofxHelios/libs/libheliosdac/lib -I/work/workspace/openFrameworks/addons/ofxHelios/libs/libheliosdac/lib/osx -I/work/workspace/openFrameworks/addons/ofxHelios/libs/libusb -I/work/workspace/openFrameworks/addons/ofxHelios/libs/libusb/include -I/work/workspace/openFrameworks/addons/ofxHelios/libs/libusb/lib -I/work/workspace/openFrameworks/addons/ofxHelios/libs/libusb/lib/osx -stdlib=libc++ -mmacosx-version-min=10.9 -v -FFrameworks -framework Syphon -framework Accelerate -framework QTKit -framework AGL -framework ApplicationServices -framework AudioToolbox -framework CoreAudio -framework CoreFoundation -framework CoreServices -framework OpenGL -framework IOKit -framework Cocoa -framework CoreVideo -framework AVFoundation -framework CoreMedia -framework QuartzCore -framework Security -framework LDAP diff --git a/drawing/src/ofApp.cpp b/drawing/src/ofApp.cpp index f84f0b0..7c7e784 100644 --- a/drawing/src/ofApp.cpp +++ b/drawing/src/ofApp.cpp @@ -2,14 +2,14 @@ #include "glew.h" vector<std::string> cmdnames={"moveTo","lineTo","curveTo","bezierTo","quadBezierTo","arc","arcNegative","close"}; +float simplify_factor=0.2f; //-------------------------------------------------------------- void ofApp::setup(){ ofxSVG svg; - svg.load("lorenzo.svg"); + svg.load("circles.svg"); imagepaths= svg.getPaths(); - float simplify_factor=0.2f; std::stringstream strm; @@ -39,7 +39,9 @@ void ofApp::setup(){ vector <ofPolyline> outlines= path.getOutline(); for (auto& outline:outlines){ + outline.simplify(simplify_factor); mask.push_back(outline); + masksegmenters.push_back(lineSegmenter(outline)); } /* vector<ofPath::Command> cmds=paths[i].getCommands(); @@ -86,7 +88,7 @@ void ofApp::setup(){ dirIdx = -1; - laser.set_pts(30000); + laser.set_pts(40000); laser.set_intensity(40); warpframe[0]=glm::vec2(0,0); @@ -266,18 +268,20 @@ void ofApp::draw(){ vector <ofPolyline> lasershapes; switch (mode){ - case 2:{ - for (auto shape=segmenters.begin();shape!=segmenters.end();shape++){ + case 0:{ + //just draw the mask + for (auto shape=masksegmenters.begin();shape!=masksegmenters.end();shape++){ lasershapes.push_back(shape->getPoly()); } break; } - case 0:{ - int s=((int)(ofGetElapsedTimef()*10))%segmenters.size(); - lasershapes.push_back(segmenters[s].getPoly()); + case 1:{ + //just draw 1 mask shape + int s=((int)(ofGetElapsedTimef()*10))%masksegmenters.size(); + lasershapes.push_back(masksegmenters[s].getPoly()); break; } - case 1:{ + case 2:{ for (auto shape=segmenters.begin();shape!=segmenters.end();shape++){ auto segments=shape->getSegments(numsegments,coverage,phase); @@ -289,7 +293,8 @@ void ofApp::draw(){ break; } - case 11:{ + case 3:{ + //clip the shape with the mask (intersction) vector <ofPolyline> shapes; for (auto shape=segmenters.begin();shape!=segmenters.end();shape++){ auto segments=shape->getSegments(numsegments,coverage,phase); @@ -301,13 +306,12 @@ void ofApp::draw(){ vector<ofPolyline> clipped = clipper.getClippedLines(ClipperLib::ctIntersection); for (auto& clip: clipped) { - clip.draw(); - segmentsdrawn++; - pointsdrawn+=clip.size(); + lasershapes.push_back(colourPolyline(clip)); } break; } - case 12:{ + case 4:{ + //clip the shape with the mask (difference) vector <ofPolyline> shapes; for (auto shape=segmenters.begin();shape!=segmenters.end();shape++){ auto segments=shape->getSegments(numsegments,coverage,phase); @@ -319,13 +323,13 @@ void ofApp::draw(){ vector<ofPolyline> clipped = clipper.getClippedLines(ClipperLib::ctDifference); for (auto& clip: clipped) { - clip.draw(); - segmentsdrawn++; - pointsdrawn+=clip.size(); + clip.simplify(simplify_factor); + lasershapes.push_back(colourPolyline(clip)); } break; } - case 3:{ + case 5:{ + //translate it vector <ofPolyline> shapes; ofMatrix4x4 rm = ofMatrix4x4::newIdentityMatrix(); rm.translate(-600,-450,0); @@ -338,23 +342,20 @@ void ofApp::draw(){ vector<ofPolyline> clipped = clipper.getClippedLines(ClipperLib::ctIntersection); for (auto& clip: clipped) { - clip.draw(); - segmentsdrawn++; - pointsdrawn+=clip.size(); + clip.simplify(simplify_factor); + lasershapes.push_back(colourPolyline(clip)); } break; } - case 4:{ + case 6:{ vector<ofPolyline> clipped = clipper.getOffsets(maskpaths,((sin(ofGetElapsedTimef())+1)*5)+1,true); for (auto& clip: clipped) { - clip.draw(); - segmentsdrawn++; - pointsdrawn+=clip.size(); + lasershapes.push_back(colourPolyline(clip)); } break; } - case 5:{ + case 7:{ //the N only fucks up when the other shapes are drawn! vector<ofPolyline> clipped; for (auto & maskpath:maskpaths){ @@ -368,10 +369,8 @@ void ofApp::draw(){ for (auto& clip: simplified) { - - clip.draw(); - segmentsdrawn++; - pointsdrawn+=clip.size(); + clip.simplify(simplify_factor); + lasershapes.push_back(colourPolyline(clip)); } /* @@ -398,7 +397,7 @@ void ofApp::draw(){ */ break; } - case 6:{ + case 8:{ vector <ofPolyline> shapes; for (auto& shape: mask) @@ -413,15 +412,14 @@ void ofApp::draw(){ for (auto& clip: simplified) { - clip.draw(); - segmentsdrawn++; - pointsdrawn+=clip.size(); + clip.simplify(simplify_factor); + lasershapes.push_back(colourPolyline(clip)); } break; } - case 7: { + case 9: { ofPoint scale; if(dir.isValidIndex(dirIdx)){ //client.update(); @@ -480,18 +478,14 @@ void ofApp::draw(){ ofColor c=colorImg.getPixels().getColor(point.x,point.y); shape.addVertex(p,c); } - shapes.push_back(shape); - segmentsdrawn++; - pointsdrawn+=shape.size(); - shape.draw(); + shape.simplify(simplify_factor); + lasershapes.push_back(shape); } break; } - case 8:{ + case 10:{ int w=ofRandom(1000); - segmenters[w%segmenters.size()].draw(); - segmentsdrawn=1; - pointsdrawn+=segmenters[w%segmenters.size()].size(); + lasershapes.push_back(colourPolyline(masksegmenters[w%masksegmenters.size()].getPoly(),ofColor(ofRandom(255),ofRandom(255),ofRandom(255)))); break; } } @@ -528,7 +522,7 @@ void ofApp::draw(){ warpedshapes.push_back(polyLineTransform(s,warp)); } - int num = laser.draw(warpedshapes); + int num = laser.draw(warpedshapes,ofColor(125,0,255)); for (auto& shape:lasershapes){ shape.draw(); @@ -543,7 +537,7 @@ void ofApp::draw(){ ofSetWindowTitle(ofToString(ofGetFrameRate(), 2)+" fps laser error "); } - //mainOutputSyphonServer.publishScreen(); + mainOutputSyphonServer.publishScreen(); } @@ -584,7 +578,12 @@ void ofApp::keyReleased(int key){ break; } case 'p':{ - mode=(mode+1)%9; + mode=(mode+1)%11; + break; + } + case 'q':{ + mode=(mode-1); + if (mode<0) mode=10; break; } case '-':{ diff --git a/drawing/src/ofApp.h b/drawing/src/ofApp.h index 3cf9de8..d0e3a16 100644 --- a/drawing/src/ofApp.h +++ b/drawing/src/ofApp.h @@ -36,6 +36,7 @@ class ofApp : public ofBaseApp{ void gotMessage(ofMessage msg); vector <lineSegmenter> segmenters; + vector <lineSegmenter> masksegmenters; vector <ofPolyline> mask; int numsegments; diff --git a/gui/Makefile b/gui/Makefile new file mode 100644 index 0000000..177e172 --- /dev/null +++ b/gui/Makefile @@ -0,0 +1,13 @@ +# Attempt to load a config.make file. +# If none is found, project defaults in config.project.make will be used. +ifneq ($(wildcard config.make),) + include config.make +endif + +# make sure the the OF_ROOT location is defined +ifndef OF_ROOT + OF_ROOT=$(realpath ../../..) +endif + +# call the project makefile! +include $(OF_ROOT)/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk diff --git a/gui/config.make b/gui/config.make new file mode 100644 index 0000000..469c495 --- /dev/null +++ b/gui/config.make @@ -0,0 +1,142 @@ +################################################################################ +# CONFIGURE PROJECT MAKEFILE (optional) +# This file is where we make project specific configurations. +################################################################################ + +################################################################################ +# OF ROOT +# The location of your root openFrameworks installation +# (default) OF_ROOT = ../../.. +################################################################################ + OF_ROOT = ../../openFrameworks + +################################################################################ +# PROJECT ROOT +# The location of the project - a starting place for searching for files +# (default) PROJECT_ROOT = . (this directory) +# +################################################################################ +# PROJECT_ROOT = . + +################################################################################ +# PROJECT SPECIFIC CHECKS +# This is a project defined section to create internal makefile flags to +# conditionally enable or disable the addition of various features within +# this makefile. For instance, if you want to make changes based on whether +# GTK is installed, one might test that here and create a variable to check. +################################################################################ +# None + +################################################################################ +# PROJECT EXTERNAL SOURCE PATHS +# These are fully qualified paths that are not within the PROJECT_ROOT folder. +# Like source folders in the PROJECT_ROOT, these paths are subject to +# exlclusion via the PROJECT_EXLCUSIONS list. +# +# (default) PROJECT_EXTERNAL_SOURCE_PATHS = (blank) +# +# Note: Leave a leading space when adding list items with the += operator +################################################################################ +# PROJECT_EXTERNAL_SOURCE_PATHS = + +################################################################################ +# PROJECT EXCLUSIONS +# These makefiles assume that all folders in your current project directory +# and any listed in the PROJECT_EXTERNAL_SOURCH_PATHS are are valid locations +# to look for source code. The any folders or files that match any of the +# items in the PROJECT_EXCLUSIONS list below will be ignored. +# +# Each item in the PROJECT_EXCLUSIONS list will be treated as a complete +# string unless teh user adds a wildcard (%) operator to match subdirectories. +# GNU make only allows one wildcard for matching. The second wildcard (%) is +# treated literally. +# +# (default) PROJECT_EXCLUSIONS = (blank) +# +# Will automatically exclude the following: +# +# $(PROJECT_ROOT)/bin% +# $(PROJECT_ROOT)/obj% +# $(PROJECT_ROOT)/%.xcodeproj +# +# Note: Leave a leading space when adding list items with the += operator +################################################################################ +# PROJECT_EXCLUSIONS = + +################################################################################ +# PROJECT LINKER FLAGS +# These flags will be sent to the linker when compiling the executable. +# +# (default) PROJECT_LDFLAGS = -Wl,-rpath=./libs +# +# Note: Leave a leading space when adding list items with the += operator +################################################################################ + +# Currently, shared libraries that are needed are copied to the +# $(PROJECT_ROOT)/bin/libs directory. The following LDFLAGS tell the linker to +# add a runtime path to search for those shared libraries, since they aren't +# incorporated directly into the final executable application binary. +# TODO: should this be a default setting? +# PROJECT_LDFLAGS=-Wl,-rpath=./libs + +################################################################################ +# PROJECT DEFINES +# Create a space-delimited list of DEFINES. The list will be converted into +# CFLAGS with the "-D" flag later in the makefile. +# +# (default) PROJECT_DEFINES = (blank) +# +# Note: Leave a leading space when adding list items with the += operator +################################################################################ +# PROJECT_DEFINES = + +################################################################################ +# PROJECT CFLAGS +# This is a list of fully qualified CFLAGS required when compiling for this +# project. These CFLAGS will be used IN ADDITION TO the PLATFORM_CFLAGS +# defined in your platform specific core configuration files. These flags are +# presented to the compiler BEFORE the PROJECT_OPTIMIZATION_CFLAGS below. +# +# (default) PROJECT_CFLAGS = (blank) +# +# Note: Before adding PROJECT_CFLAGS, note that the PLATFORM_CFLAGS defined in +# your platform specific configuration file will be applied by default and +# further flags here may not be needed. +# +# Note: Leave a leading space when adding list items with the += operator +################################################################################ +# PROJECT_CFLAGS = + +################################################################################ +# PROJECT OPTIMIZATION CFLAGS +# These are lists of CFLAGS that are target-specific. While any flags could +# be conditionally added, they are usually limited to optimization flags. +# These flags are added BEFORE the PROJECT_CFLAGS. +# +# PROJECT_OPTIMIZATION_CFLAGS_RELEASE flags are only applied to RELEASE targets. +# +# (default) PROJECT_OPTIMIZATION_CFLAGS_RELEASE = (blank) +# +# PROJECT_OPTIMIZATION_CFLAGS_DEBUG flags are only applied to DEBUG targets. +# +# (default) PROJECT_OPTIMIZATION_CFLAGS_DEBUG = (blank) +# +# Note: Before adding PROJECT_OPTIMIZATION_CFLAGS, please note that the +# PLATFORM_OPTIMIZATION_CFLAGS defined in your platform specific configuration +# file will be applied by default and further optimization flags here may not +# be needed. +# +# Note: Leave a leading space when adding list items with the += operator +################################################################################ +# PROJECT_OPTIMIZATION_CFLAGS_RELEASE = +# PROJECT_OPTIMIZATION_CFLAGS_DEBUG = + +################################################################################ +# PROJECT COMPILERS +# Custom compilers can be set for CC and CXX +# (default) PROJECT_CXX = (blank) +# (default) PROJECT_CC = (blank) +# Note: Leave a leading space when adding list items with the += operator +################################################################################ +# PROJECT_CXX = +# PROJECT_CC = diff --git a/gui/obj/osx/Release/.compiler_flags b/gui/obj/osx/Release/.compiler_flags new file mode 100644 index 0000000..b41c9fb --- /dev/null +++ b/gui/obj/osx/Release/.compiler_flags @@ -0,0 +1 @@ +-Os -mtune=native -DNDEBUG -stdlib=libc++ -Wall -fexceptions -fpascal-strings -mmacosx-version-min=10.9 -D__MACOSX_CORE__ -x objective-c++ -std=c++11 -I../../openFrameworks/libs/FreeImage/include -I../../openFrameworks/libs/boost/include -I../../openFrameworks/libs/boost/include/boost -I../../openFrameworks/libs/cairo/include -I../../openFrameworks/libs/cairo/include/cairo -I../../openFrameworks/libs/curl/include -I../../openFrameworks/libs/curl/include/curl -I../../openFrameworks/libs/fmodex/include -I../../openFrameworks/libs/freetype/include -I../../openFrameworks/libs/freetype/include/freetype2 -I../../openFrameworks/libs/freetype/include/freetype2/freetype -I../../openFrameworks/libs/freetype/include/freetype2/freetype/config -I../../openFrameworks/libs/freetype/include/freetype2/freetype/internal -I../../openFrameworks/libs/freetype/include/freetype2/freetype/internal/services -I../../openFrameworks/libs/glew/include -I../../openFrameworks/libs/glew/include/GL -I../../openFrameworks/libs/glfw/include -I../../openFrameworks/libs/glfw/include/GLFW -I../../openFrameworks/libs/glm/include -I../../openFrameworks/libs/glm/include/glm -I../../openFrameworks/libs/glm/include/glm/detail -I../../openFrameworks/libs/glm/include/glm/gtc -I../../openFrameworks/libs/glm/include/glm/gtx -I../../openFrameworks/libs/glm/include/glm/simd -I../../openFrameworks/libs/json/include -I../../openFrameworks/libs/kiss/include -I../../openFrameworks/libs/pugixml/include -I../../openFrameworks/libs/rtAudio/include -I../../openFrameworks/libs/tess2/include -I../../openFrameworks/libs/uriparser/include -I../../openFrameworks/libs/uriparser/include/uriparser -I../../openFrameworks/libs/utf8/include -I../../openFrameworks/libs/utf8/include/utf8 -I../../openFrameworks/libs/utf8cpp/include -I../../openFrameworks/libs/utf8cpp/include/utf8 -I../../openFrameworks/libs/openFrameworks -I../../openFrameworks/libs/openFrameworks/3d -I../../openFrameworks/libs/openFrameworks/app -I../../openFrameworks/libs/openFrameworks/communication -I../../openFrameworks/libs/openFrameworks/events -I../../openFrameworks/libs/openFrameworks/gl -I../../openFrameworks/libs/openFrameworks/graphics -I../../openFrameworks/libs/openFrameworks/math -I../../openFrameworks/libs/openFrameworks/sound -I../../openFrameworks/libs/openFrameworks/types -I../../openFrameworks/libs/openFrameworks/utils -I../../openFrameworks/libs/openFrameworks/video -I/work/workspace/raverony/gui/src -stdlib=libc++ -mmacosx-version-min=10.9 -v -framework Accelerate -framework QTKit -framework AGL -framework ApplicationServices -framework AudioToolbox -framework CoreAudio -framework CoreFoundation -framework CoreServices -framework OpenGL -framework IOKit -framework Cocoa -framework CoreVideo -framework AVFoundation -framework CoreMedia -framework QuartzCore -framework Security -framework LDAP diff --git a/gui/src/lineTransformer.cpp b/gui/src/lineTransformer.cpp new file mode 100644 index 0000000..bf237d7 --- /dev/null +++ b/gui/src/lineTransformer.cpp @@ -0,0 +1,117 @@ +#include "lineTransformer.h" + +void lineTransformer::drawWarpFrame(glm::vec2 warpframe[4]){ + ofSetColor(255,255,255); + ofNoFill(); + for (int i=0;i<4;i++){ + ofDrawCircle(warpframe[i],25); + ofDrawLine(warpframe[i],warpframe[(i+1)%4]); + } +} + +void lineTransformer::gaussianElimination(float * input, int n) +{ + auto i = 0; + auto j = 0; + auto m = n - 1; + + while (i < m && j < n) + { + auto iMax = i; + for (auto k = i + 1; k < m; ++k) + { + if (fabs(input[k * n + j]) > fabs(input[iMax * n + j])) + { + iMax = k; + } + } + + if (input[iMax * n + j] != 0) + { + if (i != iMax) + { + for (auto k = 0; k < n; ++k) + { + auto ikIn = input[i * n + k]; + input[i * n + k] = input[iMax * n + k]; + input[iMax * n + k] = ikIn; + } + } + + float ijIn = input[i * n + j]; + for (auto k = 0; k < n; ++k) + { + input[i * n + k] /= ijIn; + } + + for (auto u = i + 1; u < m; ++u) + { + auto ujIn = input[u * n + j]; + for (auto k = 0; k < n; ++k) + { + input[u * n + k] -= ujIn * input[i * n + k]; + } + } + + ++i; + } + ++j; + } + + for (auto i = m - 2; i >= 0; --i) + { + for (auto j = i + 1; j < n - 1; ++j) + { + input[i * n + m] -= input[i * n + j] * input[j * n + m]; + } + } +} + +glm::mat4 lineTransformer::getPerspectiveTransformMatrix(const glm::vec2 src[4], const glm::vec2 dst[4]) +{ + float p[8][9] = + { + { -src[0][0], -src[0][1], -1, 0, 0, 0, src[0][0] * dst[0][0], src[0][1] * dst[0][0], -dst[0][0] }, // h11 + { 0, 0, 0, -src[0][0], -src[0][1], -1, src[0][0] * dst[0][1], src[0][1] * dst[0][1], -dst[0][1] }, // h12 + { -src[1][0], -src[1][1], -1, 0, 0, 0, src[1][0] * dst[1][0], src[1][1] * dst[1][0], -dst[1][0] }, // h13 + { 0, 0, 0, -src[1][0], -src[1][1], -1, src[1][0] * dst[1][1], src[1][1] * dst[1][1], -dst[1][1] }, // h21 + { -src[2][0], -src[2][1], -1, 0, 0, 0, src[2][0] * dst[2][0], src[2][1] * dst[2][0], -dst[2][0] }, // h22 + { 0, 0, 0, -src[2][0], -src[2][1], -1, src[2][0] * dst[2][1], src[2][1] * dst[2][1], -dst[2][1] }, // h23 + { -src[3][0], -src[3][1], -1, 0, 0, 0, src[3][0] * dst[3][0], src[3][1] * dst[3][0], -dst[3][0] }, // h31 + { 0, 0, 0, -src[3][0], -src[3][1], -1, src[3][0] * dst[3][1], src[3][1] * dst[3][1], -dst[3][1] }, // h32 + }; + + gaussianElimination(&p[0][0], 9); + + return glm::mat4(p[0][8], p[3][8], 0, p[6][8], + p[1][8], p[4][8], 0, p[7][8], + 0, 0, 1, 0, + p[2][8], p[5][8], 0, 1); +} + +ofPolyline lineTransformer::polyLineTransform(const ofPolyline& poly, ofMatrix4x4 xform){ + ofPolyline tempPoly; + for (auto& p:poly){ + tempPoly.addVertex(ofVec3f(p)*xform); + } + return tempPoly; +} + +ofPolyline lineTransformer::makePolygon(int num,float diam){ + ofPolyline poly; + float step=PI*2/num; + for (int i=0;i<=num;i++){ + poly.addVertex(cos(step*i)*diam,sin(step*i)*diam); + } + return poly; +} + +void lineTransformer::drawPoly(ofPolyline poly,float x,float y){ + glPushMatrix(); + ofTranslate(x,y); + poly.draw(); + for (int i=0;i<poly.size();i++){ + ofDrawBitmapString(poly.getDegreesAtIndex(i),poly[i].x+10,poly[i].y+10,0); + } + glPopMatrix(); +} diff --git a/gui/src/lineTransformer.h b/gui/src/lineTransformer.h new file mode 100644 index 0000000..8268b81 --- /dev/null +++ b/gui/src/lineTransformer.h @@ -0,0 +1,17 @@ +#pragma once + +#include "ofMain.h" + +class lineTransformer { + + public: + lineTransformer(){ + } + void static drawWarpFrame(glm::vec2 warpframe[4]); + void static gaussianElimination(float * input, int n); + glm::mat4 static getPerspectiveTransformMatrix(const glm::vec2 src[4], const glm::vec2 dst[4]); + ofPolyline static polyLineTransform(const ofPolyline& poly, ofMatrix4x4 xform); + ofPolyline static makePolygon(int num,float diam); + void static drawPoly(ofPolyline poly,float x,float y); + +};
\ No newline at end of file diff --git a/gui/src/main.cpp b/gui/src/main.cpp new file mode 100644 index 0000000..ed7e18f --- /dev/null +++ b/gui/src/main.cpp @@ -0,0 +1,42 @@ +#include "ofMain.h" +#include "ofApp.h" + + +//======================================================================== +int main(int argc, char *argv[]){ + + + ofGLFWWindowSettings settings; + + settings.width = 600; + settings.height = 1200; + settings.setPosition(ofVec2f(0,0)); + settings.resizable = true; + + //settings.decorated = false; //doesn't suppress FS title bar + shared_ptr<ofAppBaseWindow> guiWindow = ofCreateWindow(settings); + guiWindow->setVerticalSync(false); + + // share OpenGL resources with other windows + settings.shareContextWith = guiWindow; + settings.decorated = true; + + settings.width = 1200; + settings.height = 900 ; + settings.setPosition(ofVec2f(1700,0)); + settings.resizable = false; + + shared_ptr<ofAppBaseWindow> mainWindow = ofCreateWindow(settings); + mainWindow->setVerticalSync(false); + + shared_ptr<ofApp> mainApp(new ofApp); + //mainApp->setupGui(); + + ofAddListener(guiWindow->events().draw,mainApp.get(),&ofApp::drawGui); + ofAddListener(guiWindow->events().windowResized,mainApp.get(),&ofApp::guiWindowResized); + ofAddListener(guiWindow->events().keyPressed,mainApp.get(),&ofApp::guiKeyPressed); + + ofRunApp(mainWindow, mainApp); + ofRunMainLoop(); +} +
\ No newline at end of file diff --git a/gui/src/ofApp.cpp b/gui/src/ofApp.cpp new file mode 100644 index 0000000..100c107 --- /dev/null +++ b/gui/src/ofApp.cpp @@ -0,0 +1,172 @@ +#include "ofApp.h" +#include "glew.h" + + +//-------------------------------------------------------------- +void ofApp::setup(){ + warpframe[0]=glm::vec2(0,0); + warpframe[1]=glm::vec2(ofGetWidth(),0); + warpframe[2]=glm::vec2(ofGetWidth(),ofGetHeight()); + warpframe[3]=glm::vec2(0,ofGetHeight()); + select_warpframe=-1; + bDrawFrame=false; +} + +//-------------------------------------------------------------- +void ofApp::update(){ + + +} + +void ofApp::updateGui(ofEventArgs & args){ + + +} + + +//-------------------------------------------------------------- +void ofApp::drawGui(ofEventArgs & args){ + ofBackground(0); + +} + +void ofApp::draw(){ + ofBackground(0); + //composite output window + + ofSetColor(255,255,255); + + ofMatrix4x4 m = ofMatrix4x4::newIdentityMatrix(); + m.rotateRad(ofGetElapsedTimef(),0,0,1); + m.translate(ofGetWidth()/2,ofGetHeight()/2,0); + + glm::vec2 src[]={ + glm::vec2(0,0), + glm::vec2(ofGetWidth(),0), + glm::vec2(ofGetWidth(),ofGetHeight()), + glm::vec2(0,ofGetHeight()) + }; + + ofMatrix4x4 warp =lineTransformer::getPerspectiveTransformMatrix(src,warpframe); + + //drawPoly(polyLineTransform(makePolygon(4,200),m),200,200); + //drawPoly(polyLineTransform(makePolygon(5,200),m),-200,200); + //drawPoly(polyLineTransform(makePolygon(6,200),m),-200,-200); + + lineTransformer::drawPoly( + lineTransformer::polyLineTransform( + lineTransformer::polyLineTransform( + lineTransformer::makePolygon(6,200) + ,m) + ,warp) + ,0,0); + + if (bDrawFrame){ + lineTransformer::drawWarpFrame(warpframe); + } + +} + +//-------------------------------------------------------------- +void ofApp::exit() { + +} + + + +//-------------------------------------------------------------- +void ofApp::keyPressed(ofKeyEventArgs &args){ + + if (args.key==OF_KEY_COMMAND){ + commandPressed=true; + } + + switch(args.key){ + case 'w':{ + bDrawFrame=!bDrawFrame; + break; + } + case OF_KEY_COMMAND:{ + commandPressed=true; + } + } + + +} + +void ofApp::guiKeyPressed(ofKeyEventArgs &args){ + +} + +//-------------------------------------------------------------- +void ofApp::keyReleased(int key){ + if (key==OF_KEY_COMMAND){ + commandPressed=false; + } +} + +//-------------------------------------------------------------- +void ofApp::mouseMoved(int x, int y ){ + +} + +//-------------------------------------------------------------- +void ofApp::mouseDragged(int x, int y, int button){ + if (select_warpframe>-1){ + warpframe[select_warpframe]=glm::vec2(x,y); + } +} + +//-------------------------------------------------------------- +void ofApp::mousePressed(int x, int y, int button){ + for (int i=0;i<4;i++){ + if (ofPoint(x,y).distance(warpframe[i])<25){ + select_warpframe=i; + } + } +} + +//-------------------------------------------------------------- +void ofApp::mouseReleased(int x, int y, int button){ + select_warpframe=-1; +} + +//-------------------------------------------------------------- +void ofApp::mouseEntered(int x, int y){ + +} + +//-------------------------------------------------------------- +void ofApp::mouseExited(int x, int y){ + +} + +//-------------------------------------------------------------- +void ofApp::windowResized(int w, int h){ + +} + +void ofApp::guiWindowResized(ofResizeEventArgs &resizeargs){ + +} + + +//-------------------------------------------------------------- +void ofApp::dragEvent(ofDragInfo dragInfo){ + //std::string filenames; + + //for (auto f = dragInfo.files.begin(); f != dragInfo.files.end(); f++){ + // if (f!=dragInfo.files.begin()){ + // filenames=filenames+", "; + // } + // filenames=filenames+*f; + + // if (dragInfo.position.y<200){ + // sets[0].addfiles(dragInfo.files); //,dragInfo.position); + // } + // else sets[1].addfiles(dragInfo.files); //,dragInfo.position); + + + //} + +} diff --git a/gui/src/ofApp.h b/gui/src/ofApp.h new file mode 100644 index 0000000..d28f393 --- /dev/null +++ b/gui/src/ofApp.h @@ -0,0 +1,38 @@ +#pragma once + +#include "ofMain.h" +#include "lineTransformer.h" + +class ofApp: public ofBaseApp { + + public: + void setup(); + void update(); + void updateGui(ofEventArgs & args); + void draw(); + void exit(); + + void drawGui(ofEventArgs & args); + void guiKeyPressed(ofKeyEventArgs & args); + + void keyPressed(ofKeyEventArgs &keyargs); + void keyReleased(int key); + void mouseMoved(int x, int y ); + void mouseDragged(int x, int y, int button); + void mousePressed(int x, int y, int button); + void mouseReleased(int x, int y, int button); + void mouseEntered(int x, int y); + void mouseExited(int x, int y); + void windowResized(int w, int h); + void dragEvent(ofDragInfo dragInfo); + + void guiWindowResized(ofResizeEventArgs &resizeargs); + + bool commandPressed; + + + glm::vec2 warpframe[4]; + int select_warpframe; + bool bDrawFrame; + +}; diff --git a/nditest/Makefile b/nditest/Makefile new file mode 100644 index 0000000..177e172 --- /dev/null +++ b/nditest/Makefile @@ -0,0 +1,13 @@ +# Attempt to load a config.make file. +# If none is found, project defaults in config.project.make will be used. +ifneq ($(wildcard config.make),) + include config.make +endif + +# make sure the the OF_ROOT location is defined +ifndef OF_ROOT + OF_ROOT=$(realpath ../../..) +endif + +# call the project makefile! +include $(OF_ROOT)/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk diff --git a/nditest/addons.make b/nditest/addons.make new file mode 100644 index 0000000..e77b1fe --- /dev/null +++ b/nditest/addons.make @@ -0,0 +1 @@ +ofxN
\ No newline at end of file diff --git a/nditest/config.make b/nditest/config.make new file mode 100644 index 0000000..469c495 --- /dev/null +++ b/nditest/config.make @@ -0,0 +1,142 @@ +################################################################################ +# CONFIGURE PROJECT MAKEFILE (optional) +# This file is where we make project specific configurations. +################################################################################ + +################################################################################ +# OF ROOT +# The location of your root openFrameworks installation +# (default) OF_ROOT = ../../.. +################################################################################ + OF_ROOT = ../../openFrameworks + +################################################################################ +# PROJECT ROOT +# The location of the project - a starting place for searching for files +# (default) PROJECT_ROOT = . (this directory) +# +################################################################################ +# PROJECT_ROOT = . + +################################################################################ +# PROJECT SPECIFIC CHECKS +# This is a project defined section to create internal makefile flags to +# conditionally enable or disable the addition of various features within +# this makefile. For instance, if you want to make changes based on whether +# GTK is installed, one might test that here and create a variable to check. +################################################################################ +# None + +################################################################################ +# PROJECT EXTERNAL SOURCE PATHS +# These are fully qualified paths that are not within the PROJECT_ROOT folder. +# Like source folders in the PROJECT_ROOT, these paths are subject to +# exlclusion via the PROJECT_EXLCUSIONS list. +# +# (default) PROJECT_EXTERNAL_SOURCE_PATHS = (blank) +# +# Note: Leave a leading space when adding list items with the += operator +################################################################################ +# PROJECT_EXTERNAL_SOURCE_PATHS = + +################################################################################ +# PROJECT EXCLUSIONS +# These makefiles assume that all folders in your current project directory +# and any listed in the PROJECT_EXTERNAL_SOURCH_PATHS are are valid locations +# to look for source code. The any folders or files that match any of the +# items in the PROJECT_EXCLUSIONS list below will be ignored. +# +# Each item in the PROJECT_EXCLUSIONS list will be treated as a complete +# string unless teh user adds a wildcard (%) operator to match subdirectories. +# GNU make only allows one wildcard for matching. The second wildcard (%) is +# treated literally. +# +# (default) PROJECT_EXCLUSIONS = (blank) +# +# Will automatically exclude the following: +# +# $(PROJECT_ROOT)/bin% +# $(PROJECT_ROOT)/obj% +# $(PROJECT_ROOT)/%.xcodeproj +# +# Note: Leave a leading space when adding list items with the += operator +################################################################################ +# PROJECT_EXCLUSIONS = + +################################################################################ +# PROJECT LINKER FLAGS +# These flags will be sent to the linker when compiling the executable. +# +# (default) PROJECT_LDFLAGS = -Wl,-rpath=./libs +# +# Note: Leave a leading space when adding list items with the += operator +################################################################################ + +# Currently, shared libraries that are needed are copied to the +# $(PROJECT_ROOT)/bin/libs directory. The following LDFLAGS tell the linker to +# add a runtime path to search for those shared libraries, since they aren't +# incorporated directly into the final executable application binary. +# TODO: should this be a default setting? +# PROJECT_LDFLAGS=-Wl,-rpath=./libs + +################################################################################ +# PROJECT DEFINES +# Create a space-delimited list of DEFINES. The list will be converted into +# CFLAGS with the "-D" flag later in the makefile. +# +# (default) PROJECT_DEFINES = (blank) +# +# Note: Leave a leading space when adding list items with the += operator +################################################################################ +# PROJECT_DEFINES = + +################################################################################ +# PROJECT CFLAGS +# This is a list of fully qualified CFLAGS required when compiling for this +# project. These CFLAGS will be used IN ADDITION TO the PLATFORM_CFLAGS +# defined in your platform specific core configuration files. These flags are +# presented to the compiler BEFORE the PROJECT_OPTIMIZATION_CFLAGS below. +# +# (default) PROJECT_CFLAGS = (blank) +# +# Note: Before adding PROJECT_CFLAGS, note that the PLATFORM_CFLAGS defined in +# your platform specific configuration file will be applied by default and +# further flags here may not be needed. +# +# Note: Leave a leading space when adding list items with the += operator +################################################################################ +# PROJECT_CFLAGS = + +################################################################################ +# PROJECT OPTIMIZATION CFLAGS +# These are lists of CFLAGS that are target-specific. While any flags could +# be conditionally added, they are usually limited to optimization flags. +# These flags are added BEFORE the PROJECT_CFLAGS. +# +# PROJECT_OPTIMIZATION_CFLAGS_RELEASE flags are only applied to RELEASE targets. +# +# (default) PROJECT_OPTIMIZATION_CFLAGS_RELEASE = (blank) +# +# PROJECT_OPTIMIZATION_CFLAGS_DEBUG flags are only applied to DEBUG targets. +# +# (default) PROJECT_OPTIMIZATION_CFLAGS_DEBUG = (blank) +# +# Note: Before adding PROJECT_OPTIMIZATION_CFLAGS, please note that the +# PLATFORM_OPTIMIZATION_CFLAGS defined in your platform specific configuration +# file will be applied by default and further optimization flags here may not +# be needed. +# +# Note: Leave a leading space when adding list items with the += operator +################################################################################ +# PROJECT_OPTIMIZATION_CFLAGS_RELEASE = +# PROJECT_OPTIMIZATION_CFLAGS_DEBUG = + +################################################################################ +# PROJECT COMPILERS +# Custom compilers can be set for CC and CXX +# (default) PROJECT_CXX = (blank) +# (default) PROJECT_CC = (blank) +# Note: Leave a leading space when adding list items with the += operator +################################################################################ +# PROJECT_CXX = +# PROJECT_CC = diff --git a/nditest/libs/libndi.3.dylib b/nditest/libs/libndi.3.dylib Binary files differnew file mode 100644 index 0000000..773c469 --- /dev/null +++ b/nditest/libs/libndi.3.dylib diff --git a/nditest/obj/osx/Release/.compiler_flags b/nditest/obj/osx/Release/.compiler_flags new file mode 100644 index 0000000..47bd934 --- /dev/null +++ b/nditest/obj/osx/Release/.compiler_flags @@ -0,0 +1 @@ +-Os -mtune=native -DNDEBUG -stdlib=libc++ -Wall -fexceptions -fpascal-strings -mmacosx-version-min=10.9 -D__MACOSX_CORE__ -fPIC -x objective-c++ -std=c++11 -I../../openFrameworks/libs/FreeImage/include -I../../openFrameworks/libs/boost/include -I../../openFrameworks/libs/boost/include/boost -I../../openFrameworks/libs/cairo/include -I../../openFrameworks/libs/cairo/include/cairo -I../../openFrameworks/libs/curl/include -I../../openFrameworks/libs/curl/include/curl -I../../openFrameworks/libs/fmodex/include -I../../openFrameworks/libs/freetype/include -I../../openFrameworks/libs/freetype/include/freetype2 -I../../openFrameworks/libs/freetype/include/freetype2/freetype -I../../openFrameworks/libs/freetype/include/freetype2/freetype/config -I../../openFrameworks/libs/freetype/include/freetype2/freetype/internal -I../../openFrameworks/libs/freetype/include/freetype2/freetype/internal/services -I../../openFrameworks/libs/glew/include -I../../openFrameworks/libs/glew/include/GL -I../../openFrameworks/libs/glfw/include -I../../openFrameworks/libs/glfw/include/GLFW -I../../openFrameworks/libs/glm/include -I../../openFrameworks/libs/glm/include/glm -I../../openFrameworks/libs/glm/include/glm/detail -I../../openFrameworks/libs/glm/include/glm/gtc -I../../openFrameworks/libs/glm/include/glm/gtx -I../../openFrameworks/libs/glm/include/glm/simd -I../../openFrameworks/libs/json/include -I../../openFrameworks/libs/kiss/include -I../../openFrameworks/libs/pugixml/include -I../../openFrameworks/libs/rtAudio/include -I../../openFrameworks/libs/tess2/include -I../../openFrameworks/libs/uriparser/include -I../../openFrameworks/libs/uriparser/include/uriparser -I../../openFrameworks/libs/utf8/include -I../../openFrameworks/libs/utf8/include/utf8 -I../../openFrameworks/libs/utf8cpp/include -I../../openFrameworks/libs/utf8cpp/include/utf8 -I../../openFrameworks/libs/openFrameworks -I../../openFrameworks/libs/openFrameworks/3d -I../../openFrameworks/libs/openFrameworks/app -I../../openFrameworks/libs/openFrameworks/communication -I../../openFrameworks/libs/openFrameworks/events -I../../openFrameworks/libs/openFrameworks/gl -I../../openFrameworks/libs/openFrameworks/graphics -I../../openFrameworks/libs/openFrameworks/math -I../../openFrameworks/libs/openFrameworks/sound -I../../openFrameworks/libs/openFrameworks/types -I../../openFrameworks/libs/openFrameworks/utils -I../../openFrameworks/libs/openFrameworks/video -I/work/workspace/raverony/nditest/libs -I/work/workspace/raverony/nditest/src -I/work/workspace/openFrameworks/addons/ofxN/src -I/work/workspace/openFrameworks/addons/ofxN/libs -I/work/workspace/openFrameworks/addons/ofxN/libs/libndi -I/work/workspace/openFrameworks/addons/ofxN/libs/libndi/includes -I/work/workspace/openFrameworks/addons/ofxN/libs/libndi/lib -I/work/workspace/openFrameworks/addons/ofxN/libs/libndi/lib/osx -stdlib=libc++ -mmacosx-version-min=10.9 -v -framework Accelerate -framework QTKit -framework AGL -framework ApplicationServices -framework AudioToolbox -framework CoreAudio -framework CoreFoundation -framework CoreServices -framework OpenGL -framework IOKit -framework Cocoa -framework CoreVideo -framework AVFoundation -framework CoreMedia -framework QuartzCore -framework Security -framework LDAP diff --git a/nditest/src/main.cpp b/nditest/src/main.cpp new file mode 100644 index 0000000..1589978 --- /dev/null +++ b/nditest/src/main.cpp @@ -0,0 +1,13 @@ +#include "ofMain.h" +#include "ofApp.h" + +//======================================================================== +int main() +{ + ofGLFWWindowSettings settings; + settings.width = 1280; + settings.height = 720; + ofCreateWindow(settings); + + ofRunApp(new ofApp()); +} diff --git a/nditest/src/ofApp.cpp b/nditest/src/ofApp.cpp new file mode 100644 index 0000000..e8e6422 --- /dev/null +++ b/nditest/src/ofApp.cpp @@ -0,0 +1,128 @@ +#include "ofApp.h" + +//-------------------------------------------------------------- +void ofApp::setup() +{ + ofSetLogLevel(OF_LOG_NOTICE); + ofBackground(ofColor::black); + + NDI.init(); + int framenum=0; +} + +//-------------------------------------------------------------- +void ofApp::exit() +{ + NDI.stopThread(); +} + +//-------------------------------------------------------------- +void ofApp::update() +{ + +} + +ofPolyline ofApp::polyLineTransform(const ofPolyline& poly, ofMatrix4x4 xform){ + ofPolyline tempPoly; + for (auto& p:poly){ + tempPoly.addVertex(ofVec3f(p)*xform); + } + return tempPoly; +} + +ofPolyline ofApp::makePolygon(int num,float diam){ + ofPolyline poly; + float step=PI*2/num; + for (int i=0;i<=num;i++){ + poly.addVertex(cos(step*i)*diam,sin(step*i)*diam); + } + return poly; +} + +void ofApp::drawPoly(ofPolyline poly,float x,float y){ + glPushMatrix(); + ofTranslate(x,y); + poly.draw(); + for (int i=0;i<poly.size();i++){ + ofDrawBitmapString(poly.getDegreesAtIndex(i),poly[i].x+10,poly[i].y+10,0); + } + glPopMatrix(); +} + + +//-------------------------------------------------------------- +void ofApp::draw(){ + ofBackground(0,0,0); + ofSetColor(255,255,255); + + ofMatrix4x4 m = ofMatrix4x4::newIdentityMatrix(); + m.rotateRad(ofGetElapsedTimef(),0,0,1); + m.translate(ofGetWidth()/2,ofGetHeight()/2,0); + + drawPoly(polyLineTransform(makePolygon(4,200),m),200,200); + drawPoly(polyLineTransform(makePolygon(5,200),m),-200,200); + drawPoly(polyLineTransform(makePolygon(6,200),m),-200,-200); +} + +//-------------------------------------------------------------- +void ofApp::keyPressed(int key) +{ + switch(key){ + case 'c':{ + if (NDI.connect()==0){ + printf("no connection\n"); + } + else printf("connected\n"); + } + } +} + +//-------------------------------------------------------------- +void ofApp::keyReleased(int key){ + +} + +//-------------------------------------------------------------- +void ofApp::mouseMoved(int x, int y){ + +} + +//-------------------------------------------------------------- +void ofApp::mouseDragged(int x, int y, int button){ + +} + +//-------------------------------------------------------------- +void ofApp::mousePressed(int x, int y, int button){ + +} + +//-------------------------------------------------------------- +void ofApp::mouseReleased(int x, int y, int button){ + +} + +//-------------------------------------------------------------- +void ofApp::mouseEntered(int x, int y){ + +} + +//-------------------------------------------------------------- +void ofApp::mouseExited(int x, int y){ + +} + +//-------------------------------------------------------------- +void ofApp::windowResized(int w, int h){ + +} + +//-------------------------------------------------------------- +void ofApp::gotMessage(ofMessage msg){ + +} + +//-------------------------------------------------------------- +void ofApp::dragEvent(ofDragInfo dragInfo){ + +} diff --git a/nditest/src/ofApp.h b/nditest/src/ofApp.h new file mode 100644 index 0000000..ab8c14f --- /dev/null +++ b/nditest/src/ofApp.h @@ -0,0 +1,35 @@ +#pragma once + +#include "ofMain.h" +#include "ofxN.h" + +class ofApp + : public ofBaseApp +{ +public: + void setup(); + void exit(); + + void update(); + void draw(); + + void keyPressed(int key); + void keyReleased(int key); + void mouseMoved(int x, int y); + void mouseDragged(int x, int y, int button); + void mousePressed(int x, int y, int button); + void mouseReleased(int x, int y, int button); + void mouseEntered(int x, int y); + void mouseExited(int x, int y); + void windowResized(int w, int h); + void dragEvent(ofDragInfo dragInfo); + void gotMessage(ofMessage msg); + + ofPolyline polyLineTransform(const ofPolyline& poly, ofMatrix4x4 xform); + ofPolyline makePolygon(int num,float diam); + void drawPoly(ofPolyline poly,float x,float y); + + ofxN NDI; + + int framenum; +}; diff --git a/nditest/start b/nditest/start new file mode 100755 index 0000000..b7817d6 --- /dev/null +++ b/nditest/start @@ -0,0 +1,2 @@ +mkdir bin/nditest.app/Contents/MacOS/@rpath +cp libs/* bin/nditest.app/Contents/MacOS/@rpath/ diff --git a/polyTest/obj/osx/Release/.compiler_flags b/polyTest/obj/osx/Release/.compiler_flags new file mode 100644 index 0000000..ea830f1 --- /dev/null +++ b/polyTest/obj/osx/Release/.compiler_flags @@ -0,0 +1 @@ +-Os -mtune=native -DNDEBUG -stdlib=libc++ -Wall -fexceptions -fpascal-strings -mmacosx-version-min=10.9 -D__MACOSX_CORE__ -x objective-c++ -std=c++11 -I../../openFrameworks/libs/FreeImage/include -I../../openFrameworks/libs/boost/include -I../../openFrameworks/libs/boost/include/boost -I../../openFrameworks/libs/cairo/include -I../../openFrameworks/libs/cairo/include/cairo -I../../openFrameworks/libs/curl/include -I../../openFrameworks/libs/curl/include/curl -I../../openFrameworks/libs/fmodex/include -I../../openFrameworks/libs/freetype/include -I../../openFrameworks/libs/freetype/include/freetype2 -I../../openFrameworks/libs/freetype/include/freetype2/freetype -I../../openFrameworks/libs/freetype/include/freetype2/freetype/config -I../../openFrameworks/libs/freetype/include/freetype2/freetype/internal -I../../openFrameworks/libs/freetype/include/freetype2/freetype/internal/services -I../../openFrameworks/libs/glew/include -I../../openFrameworks/libs/glew/include/GL -I../../openFrameworks/libs/glfw/include -I../../openFrameworks/libs/glfw/include/GLFW -I../../openFrameworks/libs/glm/include -I../../openFrameworks/libs/glm/include/glm -I../../openFrameworks/libs/glm/include/glm/detail -I../../openFrameworks/libs/glm/include/glm/gtc -I../../openFrameworks/libs/glm/include/glm/gtx -I../../openFrameworks/libs/glm/include/glm/simd -I../../openFrameworks/libs/json/include -I../../openFrameworks/libs/kiss/include -I../../openFrameworks/libs/pugixml/include -I../../openFrameworks/libs/rtAudio/include -I../../openFrameworks/libs/tess2/include -I../../openFrameworks/libs/uriparser/include -I../../openFrameworks/libs/uriparser/include/uriparser -I../../openFrameworks/libs/utf8/include -I../../openFrameworks/libs/utf8/include/utf8 -I../../openFrameworks/libs/utf8cpp/include -I../../openFrameworks/libs/utf8cpp/include/utf8 -I../../openFrameworks/libs/openFrameworks -I../../openFrameworks/libs/openFrameworks/3d -I../../openFrameworks/libs/openFrameworks/app -I../../openFrameworks/libs/openFrameworks/communication -I../../openFrameworks/libs/openFrameworks/events -I../../openFrameworks/libs/openFrameworks/gl -I../../openFrameworks/libs/openFrameworks/graphics -I../../openFrameworks/libs/openFrameworks/math -I../../openFrameworks/libs/openFrameworks/sound -I../../openFrameworks/libs/openFrameworks/types -I../../openFrameworks/libs/openFrameworks/utils -I../../openFrameworks/libs/openFrameworks/video -I/work/workspace/raverony/polyTest/src -stdlib=libc++ -mmacosx-version-min=10.9 -v -framework Accelerate -framework QTKit -framework AGL -framework ApplicationServices -framework AudioToolbox -framework CoreAudio -framework CoreFoundation -framework CoreServices -framework OpenGL -framework IOKit -framework Cocoa -framework CoreVideo -framework AVFoundation -framework CoreMedia -framework QuartzCore -framework Security -framework LDAP diff --git a/receiver/Makefile b/receiver/Makefile new file mode 100644 index 0000000..177e172 --- /dev/null +++ b/receiver/Makefile @@ -0,0 +1,13 @@ +# Attempt to load a config.make file. +# If none is found, project defaults in config.project.make will be used. +ifneq ($(wildcard config.make),) + include config.make +endif + +# make sure the the OF_ROOT location is defined +ifndef OF_ROOT + OF_ROOT=$(realpath ../../..) +endif + +# call the project makefile! +include $(OF_ROOT)/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk diff --git a/receiver/addons.make b/receiver/addons.make new file mode 100644 index 0000000..9850f54 --- /dev/null +++ b/receiver/addons.make @@ -0,0 +1 @@ +ofxNDI diff --git a/receiver/config.make b/receiver/config.make new file mode 100644 index 0000000..a2f4f86 --- /dev/null +++ b/receiver/config.make @@ -0,0 +1,142 @@ +################################################################################ +# CONFIGURE PROJECT MAKEFILE (optional) +# This file is where we make project specific configurations. +################################################################################ + +################################################################################ +# OF ROOT +# The location of your root openFrameworks installation +# (default) OF_ROOT = ../../.. +################################################################################ +OF_ROOT = ../../openFrameworks + +################################################################################ +# PROJECT ROOT +# The location of the project - a starting place for searching for files +# (default) PROJECT_ROOT = . (this directory) +# +################################################################################ +# PROJECT_ROOT = . + +################################################################################ +# PROJECT SPECIFIC CHECKS +# This is a project defined section to create internal makefile flags to +# conditionally enable or disable the addition of various features within +# this makefile. For instance, if you want to make changes based on whether +# GTK is installed, one might test that here and create a variable to check. +################################################################################ +# None + +################################################################################ +# PROJECT EXTERNAL SOURCE PATHS +# These are fully qualified paths that are not within the PROJECT_ROOT folder. +# Like source folders in the PROJECT_ROOT, these paths are subject to +# exlclusion via the PROJECT_EXLCUSIONS list. +# +# (default) PROJECT_EXTERNAL_SOURCE_PATHS = (blank) +# +# Note: Leave a leading space when adding list items with the += operator +################################################################################ +# PROJECT_EXTERNAL_SOURCE_PATHS = + +################################################################################ +# PROJECT EXCLUSIONS +# These makefiles assume that all folders in your current project directory +# and any listed in the PROJECT_EXTERNAL_SOURCH_PATHS are are valid locations +# to look for source code. The any folders or files that match any of the +# items in the PROJECT_EXCLUSIONS list below will be ignored. +# +# Each item in the PROJECT_EXCLUSIONS list will be treated as a complete +# string unless teh user adds a wildcard (%) operator to match subdirectories. +# GNU make only allows one wildcard for matching. The second wildcard (%) is +# treated literally. +# +# (default) PROJECT_EXCLUSIONS = (blank) +# +# Will automatically exclude the following: +# +# $(PROJECT_ROOT)/bin% +# $(PROJECT_ROOT)/obj% +# $(PROJECT_ROOT)/%.xcodeproj +# +# Note: Leave a leading space when adding list items with the += operator +################################################################################ +# PROJECT_EXCLUSIONS = + +################################################################################ +# PROJECT LINKER FLAGS +# These flags will be sent to the linker when compiling the executable. +# +# (default) PROJECT_LDFLAGS = -Wl,-rpath=./libs +# +# Note: Leave a leading space when adding list items with the += operator +################################################################################ + +# Currently, shared libraries that are needed are copied to the +# $(PROJECT_ROOT)/bin/libs directory. The following LDFLAGS tell the linker to +# add a runtime path to search for those shared libraries, since they aren't +# incorporated directly into the final executable application binary. +# TODO: should this be a default setting? +# PROJECT_LDFLAGS=-Wl,-rpath=./libs + +################################################################################ +# PROJECT DEFINES +# Create a space-delimited list of DEFINES. The list will be converted into +# CFLAGS with the "-D" flag later in the makefile. +# +# (default) PROJECT_DEFINES = (blank) +# +# Note: Leave a leading space when adding list items with the += operator +################################################################################ +# PROJECT_DEFINES = + +################################################################################ +# PROJECT CFLAGS +# This is a list of fully qualified CFLAGS required when compiling for this +# project. These CFLAGS will be used IN ADDITION TO the PLATFORM_CFLAGS +# defined in your platform specific core configuration files. These flags are +# presented to the compiler BEFORE the PROJECT_OPTIMIZATION_CFLAGS below. +# +# (default) PROJECT_CFLAGS = (blank) +# +# Note: Before adding PROJECT_CFLAGS, note that the PLATFORM_CFLAGS defined in +# your platform specific configuration file will be applied by default and +# further flags here may not be needed. +# +# Note: Leave a leading space when adding list items with the += operator +################################################################################ +# PROJECT_CFLAGS = + +################################################################################ +# PROJECT OPTIMIZATION CFLAGS +# These are lists of CFLAGS that are target-specific. While any flags could +# be conditionally added, they are usually limited to optimization flags. +# These flags are added BEFORE the PROJECT_CFLAGS. +# +# PROJECT_OPTIMIZATION_CFLAGS_RELEASE flags are only applied to RELEASE targets. +# +# (default) PROJECT_OPTIMIZATION_CFLAGS_RELEASE = (blank) +# +# PROJECT_OPTIMIZATION_CFLAGS_DEBUG flags are only applied to DEBUG targets. +# +# (default) PROJECT_OPTIMIZATION_CFLAGS_DEBUG = (blank) +# +# Note: Before adding PROJECT_OPTIMIZATION_CFLAGS, please note that the +# PLATFORM_OPTIMIZATION_CFLAGS defined in your platform specific configuration +# file will be applied by default and further optimization flags here may not +# be needed. +# +# Note: Leave a leading space when adding list items with the += operator +################################################################################ +# PROJECT_OPTIMIZATION_CFLAGS_RELEASE = +# PROJECT_OPTIMIZATION_CFLAGS_DEBUG = + +################################################################################ +# PROJECT COMPILERS +# Custom compilers can be set for CC and CXX +# (default) PROJECT_CXX = (blank) +# (default) PROJECT_CC = (blank) +# Note: Leave a leading space when adding list items with the += operator +################################################################################ +# PROJECT_CXX = +# PROJECT_CC = diff --git a/receiver/libs/libndi.3.dylib b/receiver/libs/libndi.3.dylib Binary files differnew file mode 100644 index 0000000..d079763 --- /dev/null +++ b/receiver/libs/libndi.3.dylib diff --git a/receiver/obj/osx/Release/.compiler_flags b/receiver/obj/osx/Release/.compiler_flags new file mode 100644 index 0000000..50bc4e0 --- /dev/null +++ b/receiver/obj/osx/Release/.compiler_flags @@ -0,0 +1 @@ +-Os -mtune=native -DNDEBUG -stdlib=libc++ -Wall -fexceptions -fpascal-strings -mmacosx-version-min=10.9 -D__MACOSX_CORE__ -fPIC -x objective-c++ -std=c++11 -I../../openFrameworks/libs/FreeImage/include -I../../openFrameworks/libs/boost/include -I../../openFrameworks/libs/boost/include/boost -I../../openFrameworks/libs/cairo/include -I../../openFrameworks/libs/cairo/include/cairo -I../../openFrameworks/libs/curl/include -I../../openFrameworks/libs/curl/include/curl -I../../openFrameworks/libs/fmodex/include -I../../openFrameworks/libs/freetype/include -I../../openFrameworks/libs/freetype/include/freetype2 -I../../openFrameworks/libs/freetype/include/freetype2/freetype -I../../openFrameworks/libs/freetype/include/freetype2/freetype/config -I../../openFrameworks/libs/freetype/include/freetype2/freetype/internal -I../../openFrameworks/libs/freetype/include/freetype2/freetype/internal/services -I../../openFrameworks/libs/glew/include -I../../openFrameworks/libs/glew/include/GL -I../../openFrameworks/libs/glfw/include -I../../openFrameworks/libs/glfw/include/GLFW -I../../openFrameworks/libs/glm/include -I../../openFrameworks/libs/glm/include/glm -I../../openFrameworks/libs/glm/include/glm/detail -I../../openFrameworks/libs/glm/include/glm/gtc -I../../openFrameworks/libs/glm/include/glm/gtx -I../../openFrameworks/libs/glm/include/glm/simd -I../../openFrameworks/libs/json/include -I../../openFrameworks/libs/kiss/include -I../../openFrameworks/libs/pugixml/include -I../../openFrameworks/libs/rtAudio/include -I../../openFrameworks/libs/tess2/include -I../../openFrameworks/libs/uriparser/include -I../../openFrameworks/libs/uriparser/include/uriparser -I../../openFrameworks/libs/utf8/include -I../../openFrameworks/libs/utf8/include/utf8 -I../../openFrameworks/libs/utf8cpp/include -I../../openFrameworks/libs/utf8cpp/include/utf8 -I../../openFrameworks/libs/openFrameworks -I../../openFrameworks/libs/openFrameworks/3d -I../../openFrameworks/libs/openFrameworks/app -I../../openFrameworks/libs/openFrameworks/communication -I../../openFrameworks/libs/openFrameworks/events -I../../openFrameworks/libs/openFrameworks/gl -I../../openFrameworks/libs/openFrameworks/graphics -I../../openFrameworks/libs/openFrameworks/math -I../../openFrameworks/libs/openFrameworks/sound -I../../openFrameworks/libs/openFrameworks/types -I../../openFrameworks/libs/openFrameworks/utils -I../../openFrameworks/libs/openFrameworks/video -I/work/workspace/raverony/receiver/libs -I/work/workspace/raverony/receiver/src -I/work/workspace/openFrameworks/addons/ofxNDI/src -I/work/workspace/openFrameworks/addons/ofxNDI/libs -I/work/workspace/openFrameworks/addons/ofxNDI/libs/linndi -I/work/workspace/openFrameworks/addons/ofxNDI/libs/linndi/include -I/work/workspace/openFrameworks/addons/ofxNDI/libs/linndi/lib -I/work/workspace/openFrameworks/addons/ofxNDI/libs/linndi/lib/osx -stdlib=libc++ -mmacosx-version-min=10.9 -v -framework Accelerate -framework QTKit -framework AGL -framework ApplicationServices -framework AudioToolbox -framework CoreAudio -framework CoreFoundation -framework CoreServices -framework OpenGL -framework IOKit -framework Cocoa -framework CoreVideo -framework AVFoundation -framework CoreMedia -framework QuartzCore -framework Security -framework LDAP diff --git a/receiver/src/main.cpp b/receiver/src/main.cpp new file mode 100755 index 0000000..0d13cee --- /dev/null +++ b/receiver/src/main.cpp @@ -0,0 +1,45 @@ +#include "ofMain.h" +#include "ofApp.h" + +/* + ========================================================================= + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. + ========================================================================= +*/ + +//-------------------------------------------------------------- +// to change options for console window (Visual Studio) +// +// Properties > Linker > System > Subsystem +// for console : Windows (/SUBSYSTEM:CONSOLE) +// +// for Window : Windows (/SUBSYSTEM:WINDOWS) +// +// Click APPLY and OK. Then make changes to Main as below +//-------------------------------------------------------------- + +// for default console +//======================================================================== +int main() { +// +// for window without console +//======================================================================== +// int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd) { + ofSetupOpenGL(640, 360, OF_WINDOW); // <-------- setup the GL context + // this kicks off the running of my app + // can be OF_WINDOW or OF_FULLSCREEN + // pass in width and height too: + ofRunApp( new ofApp()); + +} diff --git a/receiver/src/ofApp.cpp b/receiver/src/ofApp.cpp new file mode 100755 index 0000000..60a48cd --- /dev/null +++ b/receiver/src/ofApp.cpp @@ -0,0 +1,322 @@ +/* + + OpenFrameworks NDI receiver + using the NewTek NDI SDK to receive frames via network + + Advanced example using a shader for BGRA-RGBA conversion and sender selection dialog + + http://NDI.NewTek.com + + Copyright (C) 2016-2017 Lynn Jarvis. + + http://www.spout.zeal.co + + With help from Harvey Buchan + + https://github.com/Harvey3141 + + ========================================================================= + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. + ========================================================================= + + 13.10.16 - Addon receiver example created + 14.10.16 - Included received frame rate + 03.11.16 - Receive into image pixels directly + - Add a sender selection dialog + 05.11.16 - Note - dialog is Windows only + the ofxNDIdialog class is used separately by the application + and can be omitted along with resources + 09.02.17 - Updated to ofxNDI with Version 2 NDI SDK + - Added changes by Harvey Buchan to optionally + specify preferred pixel format in CreateReceiver + +*/ +#include "ofApp.h" + +//-------------------------------------------------------------- +void ofApp::setup() { + + ofBackground(0); + ofSetColor(255); + + // Set the window title to show that it is a receiver + ofSetWindowTitle("Openframeworks NDI receiver"); + cout << "NDI SDK copyright NewTek (http:\\NDI.NewTek.com)" << endl; + cout << "Press 'SPACE' to list NDI senders or RH click to open sender dialog" << endl; + + senderName[0] = 0; // The sender name used for display + nSenders = 0; // Total number of NDI senders + senderWidth = 0; // Sender width + senderHeight = 0; // Sender height + bNDIreceiver = false; // Receiver creation + + // Create an intial receiving image + ndiImage.allocate(ofGetWidth(), ofGetHeight(), OF_IMAGE_COLOR_ALPHA); + + // For received frame fps calculations - independent of the rendering rate + startTime = lastTime = frameTime = 0; + fps = frameRate = 1; // starting value + + +} // end setup + +//-------------------------------------------------------------- +void ofApp::update() { + +} + +//-------------------------------------------------------------- +void ofApp::draw() { + + char str[256]; + unsigned int width = 0; + unsigned int height = 0; + bool bResult = false; + + // Update the NDI sender list to find new senders + // There is no delay if no new senders are found + nSenders = ndiReceiver.FindSenders(); + + if(nSenders > 0) { + + // Has the user changed the sender index ? + if(ndiReceiver.SenderSelected()) { + // Release the current receiver. + // A new one is then created from the selected sender index. + ndiReceiver.ReleaseReceiver(); + bNDIreceiver = false; + } + + // Create a new receiver if one does not exist. + // We don't know the sender dimensions until a frame is received. + if(!bNDIreceiver) { + + // The receiver will detect which format a sender is using and convert + // the pixel buffer to BGRA for return. However, we can specify here + // that RGBA is the preferred format. + bNDIreceiver = ndiReceiver.CreateReceiver(NDIlib_recv_color_format_e_RGBX_RGBA); + // bNDIreceiver = ndiReceiver.CreateReceiver(); // default is BRRA + + // + // A receiver is created from an index into a list of sender names. + // The current user selected index is saved in the NDIreceiver class + // and is used to create the receiver unless you specify a particular index. + // + // The name of the sender can also be retrieved if you need it. + // If you specified a particular sender index to create the receiver + // use that index to retrieve it's name. + // + // In this application we use it to display the sender name. + // + + ndiReceiver.GetSenderName(senderName); + if(bNDIreceiver) + cout << "Created NDI receiver for " << senderName << endl; + + // Reset the starting values for frame rate calulations + fps = frameRate = 1; + + } + + } + + // Receive an image from the NDI sender + if(bNDIreceiver) { + + // If the NDI sender uses BGRA format, the received buffer is converted to rgba by ReceiveImage. + // Optionally you can flip the image if necessary. + + // !CHECKME MACOS + // ReceiveImage needs an unsigned char* so changed + // ndiImage.getPixels() to ndiImage.getPixels().getData() + // to avoid type error + if(ndiReceiver.ReceiveImage(ndiImage.getPixels().getData(), width, height, false)) { // receives as rgba + + ndiImage.update(); + + // ---------------------------- + // Calculate received frame fps + lastTime = startTime; + startTime = ofGetElapsedTimeMicros(); + frameTime = (startTime - lastTime)/1000000; // seconds + if( frameTime > 0.01) { + frameRate = floor(1.0/frameTime + 0.5); + // damping from a starting fps value + fps *= 0.95; + fps += 0.05*frameRate; + } + // ---------------------------- + + // Have the NDI sender dimensions changed ? + if(senderWidth != width || senderHeight != height) { + + // Update the sender dimensions + senderWidth = width; + senderHeight = height; + + // Update the receiving image size + ndiImage.allocate(senderWidth, senderHeight, OF_IMAGE_COLOR_ALPHA); + + } + } + + // + // Draw the current image. + // + // If receiveimage fails, the connection could be down so keep waiting for it to come back up. + // Or the frame rate of the NDI sender can be less than the receiver draw cycle. + // + if(bNDIreceiver) ndiImage.draw(0, 0, ofGetWidth(), ofGetHeight()); + + // Show fps etc. + if(nSenders > 0) { + if(bNDIreceiver) { + #ifdef _MSC_VER + sprintf_s(str, 256, "[%s] (%dx%d) - fps %2.0f", senderName, senderWidth, senderHeight, fps); + #else + // !CHECK MACOS + snprintf(str, 256, "[%s] (%dx%d) - fps %2.0f", senderName, senderWidth, senderHeight, fps); + str[255] = 0; + #endif + ofDrawBitmapString(str, 20, 30); + } + + if(nSenders == 1) { + ofDrawBitmapString("1 network source", 20, ofGetHeight()-20); + } + else { + #ifdef _MSC_VER + sprintf_s(str, 256, "%d network sources", nSenders); + #else + // !CHECK MACOS + snprintf(str, 256, "%d network sources", nSenders); + str[255] = 0; + #endif + ofDrawBitmapString(str, 20, ofGetHeight()-40); + ofDrawBitmapString("'SPACE' to list senders or RH click to open sender dialog", 20, ofGetHeight()-20); + } + } + } + else { + ofDrawBitmapString("Connecting . . .", 20, 30); + } + +} + + +//-------------------------------------------------------------- +void ofApp::keyPressed(int key) { + + char name[256]; + int index = key-48; + int nSenders = ndiReceiver.GetSenderCount(); + + if(key == ' ') { + // List all the senders + if(nSenders > 0) { + cout << "Number of NDI senders found: " << nSenders << endl; + for (int i = 0; i < nSenders; i++) { + ndiReceiver.GetSenderName(name, i); + cout << " Sender " << i << " [" << name << "]" << endl; + } + if(nSenders > 1) + cout << "Press key [0] to [" << nSenders-1 << "] to select a sender" << endl; + } + else + cout << "No NDI senders found" << endl; + } + else if(index >= 0 && index < nSenders) { + // Update the receiver with the returned index + // "SenderSelected" will then return true in Draw() to update the receiver + ndiReceiver.SetSenderIndex(index); + } +} + +//-------------------------------------------------------------- +void ofApp::keyReleased(int key){ + +} + +//-------------------------------------------------------------- +void ofApp::mousePressed(int x, int y, int button) { + + char name[256]; + int index = 0; + std::vector<std::string> senderlist; + + if(button == 2) { // RH button + // Get the senders into a list for the dialog + int nSenders = ndiReceiver.GetSenderCount(); + if(nSenders > 0) { + cout << "Number of NDI senders found: " << nSenders << endl; + for (int i = 0; i < nSenders; i++) { + ndiReceiver.GetSenderName(name, i); + senderlist.push_back(name); + cout << " Sender " << i << " [" << name << "]" << endl; + } + // Open the sender list dialog + // Returns true for OK, false for Cancel and the selected index + if(ndiDialog.SelectNDIPanel(senderlist, index)) { + // Update the receiver with the returned index + // "SenderSelected" will then return true in Draw() to update the receiver + ndiReceiver.SetSenderIndex(index); + // Show which sender was selected + ndiReceiver.GetSenderName(name, index); + cout << " Selected sender " << index << " [" << name << "]" << endl; + } + } + else + cout << "No NDI senders found" << endl; + } +} + +//-------------------------------------------------------------- +void ofApp::mouseMoved(int x, int y ){ + +} + +//-------------------------------------------------------------- +void ofApp::mouseDragged(int x, int y, int button){ + +} + +//-------------------------------------------------------------- +void ofApp::mouseReleased(int x, int y, int button){ + +} + +//-------------------------------------------------------------- +void ofApp::mouseEntered(int x, int y){ + +} + +//-------------------------------------------------------------- +void ofApp::mouseExited(int x, int y){ + +} + +//-------------------------------------------------------------- +void ofApp::windowResized(int w, int h){ + +} + +//-------------------------------------------------------------- +void ofApp::gotMessage(ofMessage msg){ + +} + +//-------------------------------------------------------------- +void ofApp::dragEvent(ofDragInfo dragInfo){ + +} diff --git a/receiver/src/ofApp.h b/receiver/src/ofApp.h new file mode 100755 index 0000000..d8a9526 --- /dev/null +++ b/receiver/src/ofApp.h @@ -0,0 +1,81 @@ +/* + + OpenFrameworks NDI receiver example + + using the NDI SDK to receive frames via network + + http://NDI.NewTek.com + + Copyright (C) 2016-2017 Lynn Jarvis. + + http://www.spout.zeal.co + + ========================================================================= + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. + ========================================================================= +*/ +#pragma once + +#include "ofMain.h" +#include "ofxNDI.h" // NDI classes + +#include "ofxNDIdialog.h" // for the sender dialog +// +// Also if you want to use the sender selection dialog, +// include in your project from the ofxNDI addon source files : +// ofxNDIdialog.h +// ofxNDIdialog.cpp +// resource.h +// resource.rc +// If this conflicts with existing resources, you will need to include +// the code for the dialog within your own resource files and change +// identifiers as necessary. +// + +class ofApp : public ofBaseApp { + + public: + + void setup(); + void update(); + void draw(); + + void keyPressed(int key); + void keyReleased(int key); + void mouseMoved(int x, int y ); + void mouseDragged(int x, int y, int button); + void mousePressed(int x, int y, int button); + void mouseReleased(int x, int y, int button); + void mouseEntered(int x, int y); + void mouseExited(int x, int y); + void windowResized(int w, int h); + void dragEvent(ofDragInfo dragInfo); + void gotMessage(ofMessage msg); + + ofxNDIreceiver ndiReceiver; // NDI receiver object + ofxNDIdialog ndiDialog; // for the sender dialog + + ofImage ndiImage; // Image used for pixel transfer and display + char senderName[256]; // Sender name used by a receiver + int nSenders; + unsigned int senderWidth; + unsigned int senderHeight; + bool bNDIreceiver; + + // For received frame fps calculations + double startTime, lastTime, frameTime, frameRate, fps; + + + +}; diff --git a/receiver/start b/receiver/start new file mode 100755 index 0000000..ae5a2e8 --- /dev/null +++ b/receiver/start @@ -0,0 +1,2 @@ +mkdir bin/receiver.app/Contents/MacOS/@rpath +cp libs/libndi.3.dylib bin/receiver.app/Contents/MacOS/@rpath/ diff --git a/warper/Makefile b/warper/Makefile new file mode 100644 index 0000000..177e172 --- /dev/null +++ b/warper/Makefile @@ -0,0 +1,13 @@ +# Attempt to load a config.make file. +# If none is found, project defaults in config.project.make will be used. +ifneq ($(wildcard config.make),) + include config.make +endif + +# make sure the the OF_ROOT location is defined +ifndef OF_ROOT + OF_ROOT=$(realpath ../../..) +endif + +# call the project makefile! +include $(OF_ROOT)/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk diff --git a/warper/addons.make b/warper/addons.make new file mode 100644 index 0000000..b0e37b8 --- /dev/null +++ b/warper/addons.make @@ -0,0 +1 @@ +ofxWarp diff --git a/warper/bin/data/ofxaddons_thumbnail.png b/warper/bin/data/ofxaddons_thumbnail.png Binary files differnew file mode 100644 index 0000000..622a643 --- /dev/null +++ b/warper/bin/data/ofxaddons_thumbnail.png diff --git a/warper/bin/data/ofxaddons_thumbnail@2x.png b/warper/bin/data/ofxaddons_thumbnail@2x.png Binary files differnew file mode 100644 index 0000000..67547e2 --- /dev/null +++ b/warper/bin/data/ofxaddons_thumbnail@2x.png diff --git a/warper/bin/data/settings.json b/warper/bin/data/settings.json new file mode 100644 index 0000000..e996b05 --- /dev/null +++ b/warper/bin/data/settings.json @@ -0,0 +1 @@ +{"warps":[{"blend":{"edges":"0, 0, 0.5, 0.5","exponent":2.0,"gamma":"1, 1, 1","luminance":"0.5, 0.5, 0.5"},"brightness":1.0,"type":2,"warp":{"columns":2,"control points":["0.0890625, 0.0597222","0.331009, 0.166569","0.388825, 0.477371","0.148126, 0.571886"],"rows":2}},{"adaptive":true,"blend":{"edges":"0.5, 0, 0, 0.5","exponent":2.0,"gamma":"1, 1, 1","luminance":"0.5, 0.5, 0.5"},"brightness":1.0,"linear":false,"resolution":16,"type":1,"warp":{"columns":5,"control points":["0.48418, 0.12602","0.554367, 0.469092","0.573438, 0.0392361","0.671484, 0.480903","0.725861, 0.186838","0.757812, 0.497917","0.824219, 0.0482639","0.840234, 0.410764","0.980469, 0.0527778","0.929688, 0.459722"],"rows":2}},{"adaptive":true,"blend":{"edges":"0.5, 0.5, 0, 0.5","exponent":2.0,"gamma":"1, 1, 1","luminance":"0.5, 0.5, 0.5"},"brightness":1.0,"corners":["0.585389, 0.542979","0.930469, 0.458333","0.898438, 0.870833","0.561719, 0.919444"],"linear":false,"resolution":16,"type":3,"warp":{"columns":5,"control points":["0, 0","0.0630292, 0.500232","0, 1","0.259811, -0.0268803","0.343242, 0.536344","0.259619, 1.09856","0.500002, 0.00670155","0.577167, 0.598489","0.513955, 1.19234","0.732039, -0.136884","0.82365, 0.508819","0.781408, 1.15969","1, 0","1.08493, 0.500191","1, 1"],"rows":3}},{"adaptive":true,"blend":{"edges":"0, 0.5, 0.5, 0","exponent":2.0,"gamma":"1, 1, 1","luminance":"0.5, 0.5, 0.5"},"brightness":1.0,"corners":["0.0460633, 0.677925","0.504574, 0.58986","0.567969, 0.920833","0.0382813, 0.911111"],"linear":false,"resolution":16,"type":3,"warp":{"columns":2,"control points":["0, 0","0.0784798, 0.507221","0, 1","1, 0","1.03334, 0.507208","1, 1"],"rows":3}}]}
\ No newline at end of file diff --git a/warper/bin/data/shaders/ofxWarp/ControlPoint.frag b/warper/bin/data/shaders/ofxWarp/ControlPoint.frag new file mode 100644 index 0000000..87ef7a3 --- /dev/null +++ b/warper/bin/data/shaders/ofxWarp/ControlPoint.frag @@ -0,0 +1,16 @@ +#version 150 + +in vec2 vTexCoord; +in vec4 vColor; + +out vec4 fragColor; + +void main(void) +{ + vec2 uv = vTexCoord * 2.0 - 1.0; + float d = dot(uv, uv); + float rim = smoothstep(0.7, 0.8, d); + rim += smoothstep(0.3, 0.4, d) - smoothstep(0.5, 0.6, d); + rim += smoothstep(0.1, 0.0, d); + fragColor = mix(vec4( 0.0, 0.0, 0.0, 0.25), vColor, rim); +} diff --git a/warper/bin/data/shaders/ofxWarp/ControlPoint.vert b/warper/bin/data/shaders/ofxWarp/ControlPoint.vert new file mode 100644 index 0000000..8eccc63 --- /dev/null +++ b/warper/bin/data/shaders/ofxWarp/ControlPoint.vert @@ -0,0 +1,23 @@ +#version 150 + +// OF default uniforms and attributes +uniform mat4 modelViewProjectionMatrix; +uniform vec4 globalColor; + +in vec4 position; +in vec2 texcoord; +in vec4 color; + +// App uniforms and attributes +in vec4 iPositionScale; +in vec4 iColor; + +out vec2 vTexCoord; +out vec4 vColor; + +void main(void) +{ + vTexCoord = texcoord; + vColor = globalColor * iColor; + gl_Position = modelViewProjectionMatrix * vec4(position.xy * iPositionScale.z + iPositionScale.xy, position.zw); +} diff --git a/warper/bin/data/shaders/ofxWarp/WarpBilinear.frag b/warper/bin/data/shaders/ofxWarp/WarpBilinear.frag new file mode 100644 index 0000000..14597bb --- /dev/null +++ b/warper/bin/data/shaders/ofxWarp/WarpBilinear.frag @@ -0,0 +1,57 @@ +#version 150 + +uniform sampler2D uTexture; +uniform vec4 uExtends; +uniform vec3 uLuminance; +uniform vec3 uGamma; +uniform vec4 uEdges; +uniform vec4 uCorners; +uniform float uExponent; +uniform bool uEditing; + +in vec2 vTexCoord; +in vec4 vColor; + +out vec4 fragColor; + +float map(in float value, in float inMin, in float inMax, in float outMin, in float outMax) +{ + return outMin + (outMax - outMin) * (value - inMin) / (inMax - inMin); +} + +float grid(in vec2 uv, in vec2 size) +{ + vec2 coord = uv / size; + vec2 grid = abs(fract(coord - 0.5) - 0.5) / (2.0 * fwidth(coord)); + float line = min(grid.x, grid.y); + return 1.0 - min(line, 1.0); +} + +void main(void) +{ + vec4 texColor = texture(uTexture, vTexCoord); + + vec2 mapCoord = vec2(map(vTexCoord.x, uCorners.x, uCorners.z, 0.0, 1.0), map(vTexCoord.y, uCorners.y, uCorners.w, 0.0, 1.0)); + + float a = 1.0; + if (uEdges.x > 0.0) a *= clamp(mapCoord.x / uEdges.x, 0.0, 1.0); + if (uEdges.y > 0.0) a *= clamp(mapCoord.y / uEdges.y, 0.0, 1.0); + if (uEdges.z > 0.0) a *= clamp((1.0 - mapCoord.x) / uEdges.z, 0.0, 1.0); + if (uEdges.w > 0.0) a *= clamp((1.0 - mapCoord.y) / uEdges.w, 0.0, 1.0); + + const vec3 one = vec3(1.0); + vec3 blend = (a < 0.5) ? (uLuminance * pow(2.0 * a, uExponent)) : one - (one - uLuminance) * pow(2.0 * (1.0 - a), uExponent); + + texColor.rgb *= pow(blend, one / uGamma); + + if (uEditing) + { + float f = grid(mapCoord.xy * uExtends.xy, uExtends.zw); + vec4 gridColor = vec4(1.0f); + fragColor = mix(texColor * vColor, gridColor, f); + } + else + { + fragColor = texColor * vColor; + } +} diff --git a/warper/bin/data/shaders/ofxWarp/WarpBilinear.vert b/warper/bin/data/shaders/ofxWarp/WarpBilinear.vert new file mode 100644 index 0000000..81e4fad --- /dev/null +++ b/warper/bin/data/shaders/ofxWarp/WarpBilinear.vert @@ -0,0 +1,21 @@ +#version 150 + +// OF default uniforms and attributes +uniform mat4 modelViewProjectionMatrix; +uniform vec4 globalColor; + +in vec4 position; +in vec2 texcoord; +in vec4 color; + +// App uniforms and attributes +out vec2 vTexCoord; +out vec4 vColor; + +void main(void) +{ + vTexCoord = texcoord; + vColor = globalColor; + + gl_Position = modelViewProjectionMatrix * position; +} diff --git a/warper/bin/data/shaders/ofxWarp/WarpPerspective.frag b/warper/bin/data/shaders/ofxWarp/WarpPerspective.frag new file mode 100644 index 0000000..82c1a0b --- /dev/null +++ b/warper/bin/data/shaders/ofxWarp/WarpPerspective.frag @@ -0,0 +1,38 @@ +#version 150 + +uniform sampler2D uTexture; +uniform vec3 uLuminance; +uniform vec3 uGamma; +uniform vec4 uEdges; +uniform vec4 uCorners; +uniform float uExponent; + +in vec2 vTexCoord; +in vec4 vColor; + +out vec4 fragColor; + +float map(in float value, in float inMin, in float inMax, in float outMin, in float outMax) +{ + return outMin + (outMax - outMin) * (value - inMin) / (inMax - inMin); +} + +void main(void) +{ + vec4 texColor = texture(uTexture, vTexCoord); + + vec2 mapCoord = vec2(map(vTexCoord.x, uCorners.x, uCorners.z, 0.0, 1.0), map(vTexCoord.y, uCorners.y, uCorners.w, 0.0, 1.0)); + + float a = 1.0; + if (uEdges.x > 0.0) a *= clamp(mapCoord.x / uEdges.x, 0.0, 1.0); + if (uEdges.y > 0.0) a *= clamp(mapCoord.y / uEdges.y, 0.0, 1.0); + if (uEdges.z > 0.0) a *= clamp((1.0 - mapCoord.x) / uEdges.z, 0.0, 1.0); + if (uEdges.w > 0.0) a *= clamp((1.0 - mapCoord.y) / uEdges.w, 0.0, 1.0); + + const vec3 one = vec3(1.0); + vec3 blend = (a < 0.5) ? (uLuminance * pow(2.0 * a, uExponent)) : one - (one - uLuminance) * pow(2.0 * (1.0 - a), uExponent); + + texColor.rgb *= pow(blend, one / uGamma); + + fragColor = texColor * vColor; +} diff --git a/warper/bin/data/shaders/ofxWarp/WarpPerspective.vert b/warper/bin/data/shaders/ofxWarp/WarpPerspective.vert new file mode 100644 index 0000000..81e4fad --- /dev/null +++ b/warper/bin/data/shaders/ofxWarp/WarpPerspective.vert @@ -0,0 +1,21 @@ +#version 150 + +// OF default uniforms and attributes +uniform mat4 modelViewProjectionMatrix; +uniform vec4 globalColor; + +in vec4 position; +in vec2 texcoord; +in vec4 color; + +// App uniforms and attributes +out vec2 vTexCoord; +out vec4 vColor; + +void main(void) +{ + vTexCoord = texcoord; + vColor = globalColor; + + gl_Position = modelViewProjectionMatrix * position; +} diff --git a/warper/bin/data/testcard.png b/warper/bin/data/testcard.png Binary files differnew file mode 100644 index 0000000..d15c568 --- /dev/null +++ b/warper/bin/data/testcard.png diff --git a/warper/config.make b/warper/config.make new file mode 100644 index 0000000..469c495 --- /dev/null +++ b/warper/config.make @@ -0,0 +1,142 @@ +################################################################################ +# CONFIGURE PROJECT MAKEFILE (optional) +# This file is where we make project specific configurations. +################################################################################ + +################################################################################ +# OF ROOT +# The location of your root openFrameworks installation +# (default) OF_ROOT = ../../.. +################################################################################ + OF_ROOT = ../../openFrameworks + +################################################################################ +# PROJECT ROOT +# The location of the project - a starting place for searching for files +# (default) PROJECT_ROOT = . (this directory) +# +################################################################################ +# PROJECT_ROOT = . + +################################################################################ +# PROJECT SPECIFIC CHECKS +# This is a project defined section to create internal makefile flags to +# conditionally enable or disable the addition of various features within +# this makefile. For instance, if you want to make changes based on whether +# GTK is installed, one might test that here and create a variable to check. +################################################################################ +# None + +################################################################################ +# PROJECT EXTERNAL SOURCE PATHS +# These are fully qualified paths that are not within the PROJECT_ROOT folder. +# Like source folders in the PROJECT_ROOT, these paths are subject to +# exlclusion via the PROJECT_EXLCUSIONS list. +# +# (default) PROJECT_EXTERNAL_SOURCE_PATHS = (blank) +# +# Note: Leave a leading space when adding list items with the += operator +################################################################################ +# PROJECT_EXTERNAL_SOURCE_PATHS = + +################################################################################ +# PROJECT EXCLUSIONS +# These makefiles assume that all folders in your current project directory +# and any listed in the PROJECT_EXTERNAL_SOURCH_PATHS are are valid locations +# to look for source code. The any folders or files that match any of the +# items in the PROJECT_EXCLUSIONS list below will be ignored. +# +# Each item in the PROJECT_EXCLUSIONS list will be treated as a complete +# string unless teh user adds a wildcard (%) operator to match subdirectories. +# GNU make only allows one wildcard for matching. The second wildcard (%) is +# treated literally. +# +# (default) PROJECT_EXCLUSIONS = (blank) +# +# Will automatically exclude the following: +# +# $(PROJECT_ROOT)/bin% +# $(PROJECT_ROOT)/obj% +# $(PROJECT_ROOT)/%.xcodeproj +# +# Note: Leave a leading space when adding list items with the += operator +################################################################################ +# PROJECT_EXCLUSIONS = + +################################################################################ +# PROJECT LINKER FLAGS +# These flags will be sent to the linker when compiling the executable. +# +# (default) PROJECT_LDFLAGS = -Wl,-rpath=./libs +# +# Note: Leave a leading space when adding list items with the += operator +################################################################################ + +# Currently, shared libraries that are needed are copied to the +# $(PROJECT_ROOT)/bin/libs directory. The following LDFLAGS tell the linker to +# add a runtime path to search for those shared libraries, since they aren't +# incorporated directly into the final executable application binary. +# TODO: should this be a default setting? +# PROJECT_LDFLAGS=-Wl,-rpath=./libs + +################################################################################ +# PROJECT DEFINES +# Create a space-delimited list of DEFINES. The list will be converted into +# CFLAGS with the "-D" flag later in the makefile. +# +# (default) PROJECT_DEFINES = (blank) +# +# Note: Leave a leading space when adding list items with the += operator +################################################################################ +# PROJECT_DEFINES = + +################################################################################ +# PROJECT CFLAGS +# This is a list of fully qualified CFLAGS required when compiling for this +# project. These CFLAGS will be used IN ADDITION TO the PLATFORM_CFLAGS +# defined in your platform specific core configuration files. These flags are +# presented to the compiler BEFORE the PROJECT_OPTIMIZATION_CFLAGS below. +# +# (default) PROJECT_CFLAGS = (blank) +# +# Note: Before adding PROJECT_CFLAGS, note that the PLATFORM_CFLAGS defined in +# your platform specific configuration file will be applied by default and +# further flags here may not be needed. +# +# Note: Leave a leading space when adding list items with the += operator +################################################################################ +# PROJECT_CFLAGS = + +################################################################################ +# PROJECT OPTIMIZATION CFLAGS +# These are lists of CFLAGS that are target-specific. While any flags could +# be conditionally added, they are usually limited to optimization flags. +# These flags are added BEFORE the PROJECT_CFLAGS. +# +# PROJECT_OPTIMIZATION_CFLAGS_RELEASE flags are only applied to RELEASE targets. +# +# (default) PROJECT_OPTIMIZATION_CFLAGS_RELEASE = (blank) +# +# PROJECT_OPTIMIZATION_CFLAGS_DEBUG flags are only applied to DEBUG targets. +# +# (default) PROJECT_OPTIMIZATION_CFLAGS_DEBUG = (blank) +# +# Note: Before adding PROJECT_OPTIMIZATION_CFLAGS, please note that the +# PLATFORM_OPTIMIZATION_CFLAGS defined in your platform specific configuration +# file will be applied by default and further optimization flags here may not +# be needed. +# +# Note: Leave a leading space when adding list items with the += operator +################################################################################ +# PROJECT_OPTIMIZATION_CFLAGS_RELEASE = +# PROJECT_OPTIMIZATION_CFLAGS_DEBUG = + +################################################################################ +# PROJECT COMPILERS +# Custom compilers can be set for CC and CXX +# (default) PROJECT_CXX = (blank) +# (default) PROJECT_CC = (blank) +# Note: Leave a leading space when adding list items with the += operator +################################################################################ +# PROJECT_CXX = +# PROJECT_CC = diff --git a/warper/obj/osx/Release/.compiler_flags b/warper/obj/osx/Release/.compiler_flags new file mode 100644 index 0000000..8ce5d95 --- /dev/null +++ b/warper/obj/osx/Release/.compiler_flags @@ -0,0 +1 @@ +-Os -mtune=native -DNDEBUG -stdlib=libc++ -Wall -fexceptions -fpascal-strings -mmacosx-version-min=10.9 -D__MACOSX_CORE__ -x objective-c++ -std=c++11 -I../../openFrameworks/libs/FreeImage/include -I../../openFrameworks/libs/boost/include -I../../openFrameworks/libs/boost/include/boost -I../../openFrameworks/libs/cairo/include -I../../openFrameworks/libs/cairo/include/cairo -I../../openFrameworks/libs/curl/include -I../../openFrameworks/libs/curl/include/curl -I../../openFrameworks/libs/fmodex/include -I../../openFrameworks/libs/freetype/include -I../../openFrameworks/libs/freetype/include/freetype2 -I../../openFrameworks/libs/freetype/include/freetype2/freetype -I../../openFrameworks/libs/freetype/include/freetype2/freetype/config -I../../openFrameworks/libs/freetype/include/freetype2/freetype/internal -I../../openFrameworks/libs/freetype/include/freetype2/freetype/internal/services -I../../openFrameworks/libs/glew/include -I../../openFrameworks/libs/glew/include/GL -I../../openFrameworks/libs/glfw/include -I../../openFrameworks/libs/glfw/include/GLFW -I../../openFrameworks/libs/glm/include -I../../openFrameworks/libs/glm/include/glm -I../../openFrameworks/libs/glm/include/glm/detail -I../../openFrameworks/libs/glm/include/glm/gtc -I../../openFrameworks/libs/glm/include/glm/gtx -I../../openFrameworks/libs/glm/include/glm/simd -I../../openFrameworks/libs/json/include -I../../openFrameworks/libs/kiss/include -I../../openFrameworks/libs/pugixml/include -I../../openFrameworks/libs/rtAudio/include -I../../openFrameworks/libs/tess2/include -I../../openFrameworks/libs/uriparser/include -I../../openFrameworks/libs/uriparser/include/uriparser -I../../openFrameworks/libs/utf8/include -I../../openFrameworks/libs/utf8/include/utf8 -I../../openFrameworks/libs/utf8cpp/include -I../../openFrameworks/libs/utf8cpp/include/utf8 -I../../openFrameworks/libs/openFrameworks -I../../openFrameworks/libs/openFrameworks/3d -I../../openFrameworks/libs/openFrameworks/app -I../../openFrameworks/libs/openFrameworks/communication -I../../openFrameworks/libs/openFrameworks/events -I../../openFrameworks/libs/openFrameworks/gl -I../../openFrameworks/libs/openFrameworks/graphics -I../../openFrameworks/libs/openFrameworks/math -I../../openFrameworks/libs/openFrameworks/sound -I../../openFrameworks/libs/openFrameworks/types -I../../openFrameworks/libs/openFrameworks/utils -I../../openFrameworks/libs/openFrameworks/video -I/work/workspace/raverony/warper/src -I/work/workspace/openFrameworks/addons/ofxWarp/src -I/work/workspace/openFrameworks/addons/ofxWarp/src/ofxWarp -stdlib=libc++ -mmacosx-version-min=10.9 -v -framework Accelerate -framework QTKit -framework AGL -framework ApplicationServices -framework AudioToolbox -framework CoreAudio -framework CoreFoundation -framework CoreServices -framework OpenGL -framework IOKit -framework Cocoa -framework CoreVideo -framework AVFoundation -framework CoreMedia -framework QuartzCore -framework Security -framework LDAP diff --git a/warper/src/main.cpp b/warper/src/main.cpp new file mode 100644 index 0000000..b562734 --- /dev/null +++ b/warper/src/main.cpp @@ -0,0 +1,14 @@ +#include "ofMain.h" +#include "ofApp.h" + +//======================================================================== +int main() +{ + ofGLFWWindowSettings settings; + settings.setGLVersion(3, 2); + settings.width = 1280; + settings.height = 720; + ofCreateWindow(settings); + + ofRunApp(new ofApp()); +} diff --git a/warper/src/ofApp.cpp b/warper/src/ofApp.cpp new file mode 100644 index 0000000..3caaa07 --- /dev/null +++ b/warper/src/ofApp.cpp @@ -0,0 +1,222 @@ +#include "ofApp.h" + +//-------------------------------------------------------------- +void ofApp::setup() +{ + ofSetLogLevel(OF_LOG_NOTICE); + ofDisableArbTex(); + ofBackground(ofColor::black); + + ofImage image; + image.setUseTexture(false); + if (!image.load("testcard.png")) + { + ofLogError("ofApp::setup") << "Could not load image!"; + return; + } + + this->texture.enableMipmap(); + this->texture.loadData(image.getPixels()); + + // Load warp settings from file if one exists. + this->warpController.loadSettings("settings.json"); + if (this->warpController.getWarps().empty()) + { + // Otherwise create warps from scratch. + shared_ptr<ofxWarpBase> warp; + + warp = this->warpController.buildWarp<ofxWarpPerspective>(); + warp->setSize(this->texture.getWidth(), this->texture.getHeight()); + warp->setEdges(glm::vec4(0.0f, 0.0f, 1.0f, 1.0f)); + + warp = this->warpController.buildWarp<ofxWarpBilinear>(); + warp->setSize(this->texture.getWidth(), this->texture.getHeight()); + warp->setEdges(glm::vec4(1.0f, 0.0f, 0.0f, 1.0f)); + + warp = this->warpController.buildWarp<ofxWarpPerspectiveBilinear>(); + warp->setSize(this->texture.getWidth(), this->texture.getHeight()); + warp->setEdges(glm::vec4(0.0f, 1.0f, 0.0f, 0.0f)); + + warp = this->warpController.buildWarp<ofxWarpPerspectiveBilinear>(); + warp->setSize(this->texture.getWidth(), this->texture.getHeight()); + warp->setEdges(glm::vec4(0.0f, 1.0f, 1.0f, 0.0f)); + } + + this->srcAreas.resize(this->warpController.getNumWarps()); + + // Start with full area mode. + this->areaMode = -1; + this->keyPressed('a'); + + this->useBeginEnd = false; +} + +//-------------------------------------------------------------- +void ofApp::exit() +{ + this->warpController.saveSettings("settings.json"); +} + +//-------------------------------------------------------------- +void ofApp::update() +{ + ofSetWindowTitle(ofToString(ofGetFrameRate(), 2) + " FPS :: " + areaName + " :: " + (this->useBeginEnd ? "begin()/end()" : "draw()")); +} + +//-------------------------------------------------------------- +void ofApp::draw() +{ + ofBackground(ofColor::black); + + if (this->texture.isAllocated()) + { + for (auto i = 0; i < this->warpController.getNumWarps(); ++i) + { + auto warp = this->warpController.getWarp(i); + if (this->useBeginEnd) + { + warp->begin(); + + auto bounds = warp->getBounds(); + this->texture.drawSubsection(bounds.x, bounds.y, bounds.width, bounds.height, this->srcAreas[i].x, this->srcAreas[i].y, this->srcAreas[i].width, this->srcAreas[i].height); + + warp->end(); + } + else + { + warp->draw(this->texture, this->srcAreas[i]); + } + } + } + + ostringstream oss; + oss << ofToString(ofGetFrameRate(), 2) << " fps" << endl; + oss << "[a]rea mode: " << areaName << endl; + oss << "[d]raw mode: " << (this->useBeginEnd ? "begin()/end()" : "draw()") << endl; + oss << "[w]arp edit: " << (this->warpController.getWarp(0)->isEditing() ? "on" : "off"); + ofSetColor(ofColor::white); + ofDrawBitmapStringHighlight(oss.str(), 10, 20); +} + +//-------------------------------------------------------------- +void ofApp::keyPressed(int key) +{ + if (key == 'f') + { + ofToggleFullscreen(); + } + else if (key == 'a') + { + this->areaMode = (this->areaMode + 1) % 3; + if (this->areaMode == 0) + { + // Draw the full image for each warp. + auto area = ofRectangle(0, 0, this->texture.getWidth(), this->texture.getHeight()); + for (auto i = 0; i < this->warpController.getNumWarps(); ++i) + { + this->srcAreas[i] = area; + } + + this->areaName = "full"; + } + else if (this->areaMode == 1) + { + // Draw a corner region of the image so that all warps make up the entire image. + for (auto i = 0; i < this->warpController.getNumWarps(); ++i) + { + static const auto overlap = 10.0f; + if (i == 0) + { + // Top-left. + this->srcAreas[i] = ofRectangle(0, 0, this->texture.getWidth() * 0.5f + overlap, this->texture.getHeight() * 0.5f + overlap); + } + else if (i == 1) + { + // Top-right. + this->srcAreas[i] = ofRectangle(this->texture.getWidth() * 0.5f - overlap, 0, this->texture.getWidth() * 0.5f + overlap, this->texture.getHeight() * 0.5f + overlap); + } + else if (i == 2) + { + // Bottom-right. + this->srcAreas[i] = ofRectangle(this->texture.getWidth() * 0.5f - overlap, this->texture.getHeight() * 0.5f - overlap, this->texture.getWidth() * 0.5f + overlap, this->texture.getHeight() * 0.5f + overlap); + } + else + { + // Bottom-left. + this->srcAreas[i] = ofRectangle(0, this->texture.getHeight() * 0.5f - overlap, this->texture.getWidth() * 0.5f + overlap, this->texture.getHeight() * 0.5f + overlap); + } + } + + this->areaName = "corners"; + } + else + { + // Draw a random region of the image for each warp. + auto x1 = ofRandom(0, this->texture.getWidth() - 150); + auto y1 = ofRandom(0, this->texture.getHeight() - 150); + auto x2 = ofRandom(x1 + 150, this->texture.getWidth()); + auto y2 = ofRandom(y1 + 150, this->texture.getHeight()); + auto area = ofRectangle(x1, y1, x2 - x1, y2 - y1); + for (auto i = 0; i < this->warpController.getNumWarps(); ++i) + { + this->srcAreas[i] = area; + } + + this->areaName = "random"; + } + } + else if (key == 'd') + { + this->useBeginEnd ^= 1; + } +} + +//-------------------------------------------------------------- +void ofApp::keyReleased(int key){ + +} + +//-------------------------------------------------------------- +void ofApp::mouseMoved(int x, int y){ + +} + +//-------------------------------------------------------------- +void ofApp::mouseDragged(int x, int y, int button){ + +} + +//-------------------------------------------------------------- +void ofApp::mousePressed(int x, int y, int button){ + +} + +//-------------------------------------------------------------- +void ofApp::mouseReleased(int x, int y, int button){ + +} + +//-------------------------------------------------------------- +void ofApp::mouseEntered(int x, int y){ + +} + +//-------------------------------------------------------------- +void ofApp::mouseExited(int x, int y){ + +} + +//-------------------------------------------------------------- +void ofApp::windowResized(int w, int h){ + +} + +//-------------------------------------------------------------- +void ofApp::gotMessage(ofMessage msg){ + +} + +//-------------------------------------------------------------- +void ofApp::dragEvent(ofDragInfo dragInfo){ + +} diff --git a/warper/src/ofApp.h b/warper/src/ofApp.h new file mode 100644 index 0000000..0476101 --- /dev/null +++ b/warper/src/ofApp.h @@ -0,0 +1,34 @@ +#pragma once + +#include "ofMain.h" +#include "ofxWarp.h" + +class ofApp + : public ofBaseApp +{ +public: + void setup(); + void exit(); + + void update(); + void draw(); + + void keyPressed(int key); + void keyReleased(int key); + void mouseMoved(int x, int y); + void mouseDragged(int x, int y, int button); + void mousePressed(int x, int y, int button); + void mouseReleased(int x, int y, int button); + void mouseEntered(int x, int y); + void mouseExited(int x, int y); + void windowResized(int w, int h); + void dragEvent(ofDragInfo dragInfo); + void gotMessage(ofMessage msg); + + bool useBeginEnd; + ofxWarpController warpController; + ofTexture texture; + vector<ofRectangle> srcAreas; + int areaMode; + string areaName; +}; |
