From: Gabriel Dunne
+ Shell script that slices a single image into any number of vertical and horizontal sections.
+
+ #!/bin/bash
+#copyright: 2009
+#author: gabriel dunne
+#url: quilime.com
+
+IMAGE=$1
+IMAGE_W=$2
+IMAGE_H=$3
+ROWS=$4
+COLS=$5
+
+if [ $# -eq 0 ]
+then
+ echo "usage: image width height rows cols"
+ echo "example: ./slice.sh Sunset.jpg 800 600 16 16"
+ exit
+else
+
+ for (( x = 1; x <= COLS; x++ ))
+ do
+ for (( y = 1 ; y <= ROWS; y++ ))
+ do
+ let CROP_X = `expr $IMAGE_W-IMAGE_W/$x`
+ let CROP_Y = `expr $IMAGE_H-IMAGE_H/$y`
+ let CROP_W = `expr $IMAGE_W/$ROWS`
+ let CROP_H = `expr $IMAGE_H/$COLS`
+ echo -n "crop ${CROP_W}x${CROP_H}+${CROP_X}+${CROP_Y} result: [${x},${y}]_$IMAGE"
+ echo ""
+ convert $IMAGE -crop ${CROP_W}x${CROP_H}+${CROP_X}+${CROP_Y} [${x},${y}]_$IMAGE
+ done
+ done
+
+fi
+
+
+To Use
+
+
+
+ $ chmod 775 slice.sh
+$ ./slice.sh Sunset.jpg 800 600 16 16
+
string $select[] = `ls -sl`;
+for ( $node in $select ) // process each
+{
+ /* ... */
+}
+
+
+
+string $node = "object";
+if ( `objExists $node` )
+{
+ // The node exists
+}
+
+
++string $node = "pCube1.f[2]"; +string $no_component = `match "^[^\.]*" $node`; +// Result: "pCube1" // ++ +
+string $node = "pCube1.f[2]"; +string $component = `match "\\..*" $node`; +// Result: ".f[2]" // + +string $nodeAttr = "blinn1.color"; +string $attrName = `match "\\..*" $nodeAttr`; +// Result: ".color" // ++ +
+string $node = "pCube1.f[2]"; +string $component = `substitute "^[^.]*\\." $node ""`; +// Result: "f[2]" // + +string $nodeAttr = "blinn1.color"; +string $attrName = `substitute "^[^.]*\\." $nodeAttr ""`; +// Result: "color" // ++ +
+string $uiControl = "OptionBoxWindow|formLayout52|formLayout55|button6"; +string $uiParent = `substitute "|[^|]*$" $uiControl ""`; +// Result: OptionBoxWindow|formLayout52|formLayout55 // ++ +
+string $input = "line\n"; +$string $line = `match "^[^(\r\n)]*" $input`; +// Result: "line" // ++ +
+string $path = "C:/AW/Maya5.0/bin/maya.exe"; +string $dir = `match "^.*/" $path`; +// Result: "C:/AW/Maya5.0/bin/" ++ +
+string $path = "C:/AW/Maya5.0/bin/maya.exe"; +string $filepart = `match "[^/\\]*$" $path`; +// Result: "maya.exe" ++ +
+ +string $node = "pCube1|pCubeShape223"; +string $noSuffix = `match ".*[^0-9]" $node`; +// Result: "pCube1|pCubeShape" ++ +
+string $node = "pCube1|pCubeShape223"; +string $suffix = `match "[0-9]+$" $node`; +// Result: "223" // ++ +
+string $dagPath = "pCube1|pCubeShape223"; +string $shortName = `match "[^|]*$" $dagPath`; +// Result: pCubeShape223 // ++ +
+Function to return location of intersect with poly mesh and spherical object moving in the positive direction on the Y axis.
+
+
global proc intersectSphereY()
+{
+ print(". . . . . go go go\n");
+
+ int $iter = 50;
+ float $start[3] = {0, -0.5, 0};
+ float $limit[3] = {0, 5.0, 0};
+ $mesh = "test_mesh";
+ $tmpCN = "cpom";
+
+
+ $obj = "rod1";
+ float $radius = 0.5;
+ float $curPos[3] = {0, 0, 0};
+
+ for ($i = 0; $i <= $iter; $i++)
+ {
+ $mesh = "test_mesh";
+ $shape = `listRelatives -shapes $mesh`;
+
+ createNode -n $tmpCN closestPointOnMesh;
+ connectAttr -f ($shape[0] + ".outMesh") ($tmpCN + ".inMesh");
+ setAttr ($tmpCN + ".inPosition") $curPos[0] $curPos[1] $curPos[2];
+
+ $cpom = `getAttr ($tmpCN + ".position")`;
+
+ if ( pointDist($curPos, $cpom) <= $radius ) {
+ return ". . bonk\n";
+ }
+
+ $curPos[1] = ($limit.y) / $iter * $i;
+ setAttr ($obj + ".translateY") $curPos[1];
+
+ delete $tmpCN;
+ }
+ return ". nope\n";
+}
+
+global proc float pointDist(float $p1[], float $p2[])
+{
+ return sqrt(
+ (($p1[0] - $p2[0]) * ($p1[0] - $p2[0])) +
+ (($p1[1] - $p2[1]) * ($p1[1] - $p2[1])) +
+ (($p1[2] - $p2[2]) * ($p1[2] - $p2[2])));
+}
+
+intersectSphereY;
+
+
+
+
+
+
\ No newline at end of file
diff --git a/content/log/2008-11-17_buttons b/content/log/2008-11-17_buttons
new file mode 100644
index 0000000..b658196
--- /dev/null
+++ b/content/log/2008-11-17_buttons
@@ -0,0 +1,10 @@
+title = button invasion
+date = 2009-11-17
+tags = monome, fabrication, electronics
+--
+
+
+
++Sparkfun boards and Monomes for a button-related project +
\ No newline at end of file diff --git a/content/log/2009-12-13_mandala b/content/log/2009-12-13_mandala new file mode 100644 index 0000000..93967b8 --- /dev/null +++ b/content/log/2009-12-13_mandala @@ -0,0 +1,11 @@ +title = mandala +date = 2009-12-13 +tags = art, graphic design +-- + + +
+
++endless knot, mandala +
\ No newline at end of file diff --git a/content/log/2009-12-18_taper b/content/log/2009-12-18_taper new file mode 100644 index 0000000..a92860c --- /dev/null +++ b/content/log/2009-12-18_taper @@ -0,0 +1,5 @@ +title = taper +date = 2009-12-18 +tags = tessellated +-- +
\ No newline at end of file
diff --git a/content/log/2010-01-13_relative_time b/content/log/2010-01-13_relative_time
new file mode 100644
index 0000000..05fb805
--- /dev/null
+++ b/content/log/2010-01-13_relative_time
@@ -0,0 +1,7 @@
+title = relative_time
+date = 2010-01-13
+tags = time, inspiration
+--
+
+
+
diff --git a/content/log/2010-01-22_cone b/content/log/2010-01-22_cone
new file mode 100644
index 0000000..a937eb3
--- /dev/null
+++ b/content/log/2010-01-22_cone
@@ -0,0 +1,11 @@
+title = cone
+date = 2010-01-22
+tags = installation, projection
+--
+
+
+
+
++test pattern +
\ No newline at end of file diff --git a/content/log/2010-07-01_icosi b/content/log/2010-07-01_icosi new file mode 100644 index 0000000..c7550cc --- /dev/null +++ b/content/log/2010-07-01_icosi @@ -0,0 +1,20 @@ +tags = fabrication, construction, icosi, installation, design +title = icosi fabrication +date = 2010-07-01 +markdown = true +-- +Fabrication progress on the 'ICOSI' project: a projection sculpture for an upcoming audiovisual installation at the +[Biennial of the Americas](http://www.biennialoftheamericas.org/) in Denver at the end of this month. The finished form is a section of a squished icosidodecahedron (scaled on the z-axis by 0.5). The form will act as a projection surface for visual software, which is directly linked to the audio components. + + +
+
