<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>mccun_ication</title>
	<atom:link href="http://mccunication.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://mccunication.wordpress.com</link>
	<description>computational explorations</description>
	<lastBuildDate>Fri, 03 Jun 2011 18:09:57 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='mccunication.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>mccun_ication</title>
		<link>http://mccunication.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://mccunication.wordpress.com/osd.xml" title="mccun_ication" />
	<atom:link rel='hub' href='http://mccunication.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Modulated Lattice 5</title>
		<link>http://mccunication.wordpress.com/2009/08/21/modulated-lattice-5/</link>
		<comments>http://mccunication.wordpress.com/2009/08/21/modulated-lattice-5/#comments</comments>
		<pubDate>Fri, 21 Aug 2009 15:14:06 +0000</pubDate>
		<dc:creator>michaelgmccune</dc:creator>
				<category><![CDATA[maya]]></category>

		<guid isPermaLink="false">http://mccunication.wordpress.com/?p=69</guid>
		<description><![CDATA[More images can be found at: Louisiana Tech School of Architecture Picasa Web Gallery<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mccunication.wordpress.com&amp;blog=5490620&amp;post=69&amp;subd=mccunication&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img class="aligncenter size-full wp-image-70" title="suckerpunch" src="http://mccunication.files.wordpress.com/2009/08/suckerpunch.jpg?w=490" alt="suckerpunch"   /></p>
<p>More images can be found at:</p>
<p><a title="Louisiana Tech Architecture" href="http://www.latech.edu/tech/liberal-arts/architecture/BananaGallery/Steel%20pavilion/index.html" target="_blank">Louisiana Tech School of Architecture</a></p>
<p><a title="Picasaweb Gallery" href="http://picasaweb.google.com/michaelgmccune/TriangularLattice5FinalPhotos#" target="_blank"></a><a title="Picasa Web Gallery" href="http://picasaweb.google.com/michaelgmccune/TriangularLattice5FinalPhotos#" target="_blank">Picasa Web Gallery</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mccunication.wordpress.com/69/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mccunication.wordpress.com/69/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mccunication.wordpress.com/69/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mccunication.wordpress.com/69/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mccunication.wordpress.com/69/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mccunication.wordpress.com/69/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mccunication.wordpress.com/69/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mccunication.wordpress.com/69/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mccunication.wordpress.com/69/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mccunication.wordpress.com/69/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mccunication.wordpress.com/69/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mccunication.wordpress.com/69/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mccunication.wordpress.com/69/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mccunication.wordpress.com/69/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mccunication.wordpress.com&amp;blog=5490620&amp;post=69&amp;subd=mccunication&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mccunication.wordpress.com/2009/08/21/modulated-lattice-5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7b230669398fea9562fc35adca0f095a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">michaelgmccune</media:title>
		</media:content>

		<media:content url="http://mccunication.files.wordpress.com/2009/08/suckerpunch.jpg" medium="image">
			<media:title type="html">suckerpunch</media:title>
		</media:content>
	</item>
		<item>
		<title>Flip-flopping paths with items in a list</title>
		<link>http://mccunication.wordpress.com/2009/06/19/flip-flopping-paths-with-items-in-a-list/</link>
		<comments>http://mccunication.wordpress.com/2009/06/19/flip-flopping-paths-with-items-in-a-list/#comments</comments>
		<pubDate>Fri, 19 Jun 2009 03:30:16 +0000</pubDate>
		<dc:creator>michaelgmccune</dc:creator>
				<category><![CDATA[grasshopper]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://mccunication.wordpress.com/?p=52</guid>
		<description><![CDATA[A general post for people that do not know Grasshopper that well: this is a simple example of re-ordering lists by paths. By using a series of a series you can create an index list that steps by the number of paths that steps by the number of items in each path. Confusing in the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mccunication.wordpress.com&amp;blog=5490620&amp;post=52&amp;subd=mccunication&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>A general post for people that do not know Grasshopper that well: this is a simple example of re-ordering lists by paths. By using a series of a series you can create an index list that steps by the number of paths that steps by the number of items in each path. Confusing in the description, but it is easier to understand in the image. This example, of course, works for only paths that have the same number of items!</p>
<p style="text-align:center;"><img class="size-large wp-image-57 aligncenter" title="flip flop" src="http://mccunication.files.wordpress.com/2009/06/flip-flop2.jpg?w=614&#038;h=384" alt="flip flop" width="614" height="384" /></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mccunication.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mccunication.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mccunication.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mccunication.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mccunication.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mccunication.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mccunication.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mccunication.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mccunication.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mccunication.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mccunication.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mccunication.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mccunication.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mccunication.wordpress.com/52/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mccunication.wordpress.com&amp;blog=5490620&amp;post=52&amp;subd=mccunication&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mccunication.wordpress.com/2009/06/19/flip-flopping-paths-with-items-in-a-list/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7b230669398fea9562fc35adca0f095a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">michaelgmccune</media:title>
		</media:content>

		<media:content url="http://mccunication.files.wordpress.com/2009/06/flip-flop2.jpg?w=1024" medium="image">
			<media:title type="html">flip flop</media:title>
		</media:content>
	</item>
		<item>
		<title>Over due Paneling Tools multiple patterns/components scripts</title>
		<link>http://mccunication.wordpress.com/2009/06/16/over-due-paneling-tools-multiple-patternscomponents-scripts/</link>
		<comments>http://mccunication.wordpress.com/2009/06/16/over-due-paneling-tools-multiple-patternscomponents-scripts/#comments</comments>
		<pubDate>Tue, 16 Jun 2009 04:17:01 +0000</pubDate>
		<dc:creator>michaelgmccune</dc:creator>
				<category><![CDATA[PanelingTools]]></category>
		<category><![CDATA[RhinoScript]]></category>

		<guid isPermaLink="false">http://mccunication.wordpress.com/?p=40</guid>
		<description><![CDATA[Sorry for the delay and the lack of posts. A lot has been going on in my personal life (deaths, Getting Married!, Honey Moon!, work, etc). I have been doing some research at work so look for some posts/examples/tutorials coming soon on Grasshopper and more Paneling Tools! &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; Panel 4 Custom 2D Patterns [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mccunication.wordpress.com&amp;blog=5490620&amp;post=40&amp;subd=mccunication&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:center;"><em><img class="aligncenter size-large wp-image-44" title="Cabo San Lucas" src="http://mccunication.files.wordpress.com/2009/06/picture-047.jpg?w=614&#038;h=461" alt="Cabo San Lucas" width="614" height="461" />Sorry for the delay and the lack of posts. A lot has been going on in my personal life (deaths, Getting Married!, Honey Moon!, work, etc). I have been doing some research at work so look for some posts/examples/tutorials coming soon on Grasshopper and more Paneling Tools!</em></p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p>Panel 4 Custom 2D Patterns Script:</p>
<p>Option Explicit<br />
&#8216;Script written by Michael McCune<br />
&#8216;Script originated on http://mccunication.wordpress.com/<br />
&#8216;This script takes a grid of points generated from Paneling Tools and places 4 custom 2d Patterns on the grid of points.<br />
&#8216;The distance to the closest attractor point determines which pattern is appropriate. To add more patterns, simply<br />
&#8216; copy a new arrPatternX and add an IF/Then statement.</p>
<p>Call paneltls_4customPats()<br />
Sub paneltls_4customPats()<br />
&#8216;Select points<br />
arrPoints = Rhino.GetObjects(&#8220;Select grid of paneling points&#8221;, 1)<br />
&#8216;Select pattern<br />
arrPattern1 = Rhino.GetObjects(&#8220;Select 1st custom pattern curves and points&#8221;, 1+4)<br />
arrPattern2 = Rhino.GetObjects(&#8220;Select 2nd custom pattern curves and points&#8221;, 1+4)<br />
arrPattern3 = Rhino.GetObjects(&#8220;Select 3rd custom pattern curves and points&#8221;, 1+4)<br />
arrPattern4 = Rhino.GetObjects(&#8220;Select 4th custom pattern curves and points&#8221;, 1+4)</p>
<p>dblMax = Rhino.GetReal(&#8220;What is the max distance to be affected&#8221;, 15)<br />
dblMin = Rhino.GetReal(&#8220;What is the min distance to be affected&#8221;, 5)</p>
<p>&#8216;Select Attractors<br />
arrAttractors = Rhino.GetObjects(&#8220;Select attractor points&#8221;, 1)</p>
<p>Dim arrPoints, arrCrvs,arrAttractors,arrNewCrvs,arrPattern1,arrPattern2,arrPattern3,arrPattern4,dblMid,dblMax,dblMin,dblMid2<br />
Dim arrAttractorxyz,dblDistance,dblShortestDistance,dblFactor,arrCustomPattern,arrINDPoint1xyz,arrINDPoint2xyz,arrINDPoint3xyz,arrINDPoint4xyz<br />
Dim PTObj<br />
Dim dblMidPt1x,dblMidPt1y, dblMidPt1z,dblMidPt2x,dblMidPt2y,dblMidPt2z,dblSrfCentroidx,dblSrfCentroidy,dblSrfCentroidz,arrSrfCentroid<br />
Dim i,j,k<br />
Const intUSpacing = 1<br />
Const intVSpacing = 1</p>
<p>On Error Resume Next</p>
<p>&#8216;Get PanelingTools Object<br />
Set PTObj = Rhino.GetPluginObject(&#8220;PanelingTools&#8221;)<br />
If Err Then<br />
MsgBox Err.Description<br />
Exit Sub<br />
End If</p>
<p>dblMid = ((dblMax + dblMin)/2)<br />
dblMid2 = ((dblMax + dblMid)/2)</p>
<p>If IsArray(arrPoints) Then<br />
For i = 0 To 150<br />
For j = 0 To 15<br />
object_name0 = &#8220;S0(&#8221; &amp; CStr(i) &amp; &#8220;)(&#8221; &amp; CStr(j) &amp; &#8220;)&#8221;<br />
object_name1 = &#8220;S0(&#8221; &amp; CStr(i+1) &amp; &#8220;)(&#8221; &amp; CStr(j) &amp; &#8220;)&#8221;<br />
object_name2 = &#8220;S0(&#8221; &amp; CStr(i+1) &amp; &#8220;)(&#8221; &amp; CStr(j+1) &amp; &#8220;)&#8221;<br />
object_name3 = &#8220;S0(&#8221; &amp; CStr(i) &amp; &#8220;)(&#8221; &amp; CStr(j+1) &amp; &#8220;)&#8221;</p>
<p>object_list0 = Rhino.ObjectsByName(object_name0)<br />
object_list1 = Rhino.ObjectsByName(object_name1)<br />
object_list2 = Rhino.ObjectsByName(object_name2)<br />
object_list3 = Rhino.ObjectsByName(object_name3)</p>
<p>arrINDPoints = array(object_list0(0),object_list1(0),object_list2(0),object_list3(0))</p>
<p>arrINDPoint1xyz =Rhino.PointCoordinates(object_list0(0))<br />
arrINDPoint2xyz =Rhino.PointCoordinates(object_list1(0))<br />
arrINDPoint3xyz =Rhino.PointCoordinates(object_list2(0))<br />
arrINDPoint4xyz =Rhino.PointCoordinates(object_list3(0))</p>
<p>&#8216;Get centroid of the four surface pts<br />
dblMidPt1x = ((arrINDPoint1xyz(0) + arrINDPoint3xyz(0))/2)<br />
dblMidPt1y = ((arrINDPoint1xyz(1) + arrINDPoint3xyz(1))/2)<br />
dblMidPt1z = ((arrINDPoint1xyz(2) + arrINDPoint3xyz(2))/2)</p>
<p>dblMidPt2x = ((arrINDPoint2xyz(0) + arrINDPoint4xyz(0))/2)<br />
dblMidPt2y = ((arrINDPoint2xyz(1) + arrINDPoint4xyz(1))/2)<br />
dblMidPt2z = ((arrINDPoint2xyz(2) + arrINDPoint4xyz(2))/2)</p>
<p>dblSrfCentroidx = ((dblMidPt1x + dblMidPt2x) /2)<br />
dblSrfCentroidy = ((dblMidPt1y + dblMidPt2y) /2)<br />
dblSrfCentroidz = ((dblMidPt1z + dblMidPt2z) /2)</p>
<p>arrSrfCentroid = array(    dblSrfCentroidx,dblSrfCentroidy,dblSrfCentroidz)</p>
<p>dblShortestDistance = 9999900<br />
&#8216;loop through attractors<br />
For k = 0 To Ubound(arrAttractors)</p>
<p>&#8216;get xyz of attractor<br />
arrAttractorxyz = Rhino.PointCoordinates(arrAttractors(k))</p>
<p>dblDistance = Rhino.Distance(arrAttractorxyz,arrSrfCentroid)<br />
&#8216;Call Rhino.Print(dblDistance)<br />
If dblDistance &lt; dblShortestDistance Then</p>
<p>dblShortestDistance = dblDistance<br />
End If<br />
Call Rhino.Print(dblShortestDistance)<br />
Next</p>
<p>&#8216;panel 1<br />
If dblShortestDistance &gt; dblMax Then<br />
&#8216;Call rhino.RotateObjects(arrPattern2,,dblangle)<br />
arrCrvs(i)(j) = PTObj.PanelCustomWithOrderedPoints(arrINDPoints, arrPattern1, intUSpacing, intVSpacing)<br />
End If</p>
<p>&#8216;panel 2<br />
If dblShortestDistance &lt; dblMax Then<br />
If dblShortestDistance &gt; dblMid2 Then<br />
arrCrvs(i)(j) = PTObj.PanelCustomWithOrderedPoints(arrINDPoints, arrPattern2, intUSpacing, intVSpacing)<br />
End If<br />
End If</p>
<p>&#8216;panel 3<br />
If dblShortestDistance &gt; dblMin Then<br />
If dblShortestDistance &lt; dblMid2 Then<br />
arrCrvs(i)(j) = PTObj.PanelCustomWithOrderedPoints(arrINDPoints, arrPattern3, intUSpacing, intVSpacing)<br />
End If<br />
End If</p>
<p>&#8216;panel 4<br />
If dblShortestDistance &lt; dblMin Then<br />
arrCrvs(i)(j) = PTObj.PanelCustomWithOrderedPoints(arrINDPoints, arrPattern4, intUSpacing, intVSpacing)<br />
End If<br />
Next<br />
Next</p>
<p>End If</p>
<p>Set PTObj = Nothing</p>
<p>End Sub<br />
)</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p>Panel 4 Custom 3d Components Script:</p>
<p>Option Explicit<br />
&#8216;Script written by Michael McCune<br />
&#8216;Script originated on http://mccunication.wordpress.com/<br />
&#8216;This script needs three surfaces. A &#8220;top&#8221; surface as a finish face, a &#8220;bottom&#8221; surface as a back face, and a &#8220;driver&#8221; surface.<br />
&#8216;The top and bottom surfaces work better if they are similar. The &#8220;driver&#8221; surfaces works like a visual graph.<br />
&#8216;It is easier to interpret the driver surface if it is similar to the top and/or bottom surfaces. It simply uses the heights of the surface for each corresponding panel<br />
&#8216; to determine which component to apply. The higher the surface is at that corresponding parameter the higher the number pattern.<br />
&#8216;This script should work on any component type.</p>
<p>Call paneltls_4custompanels3dSurfaceDriver()<br />
Sub paneltls_4custompanels3dSurfaceDriver()</p>
<p>&#8216;variables<br />
Dim arrAttractorxyz,dblDistance,dblShortestDistance,dblFactor,arrCustomPattern,arrINDBottomPoint1xyz,arrINDBottomPoint2xyz,arrINDBottomPoint3xyz,arrINDBottomPoint4xyz,strBottomName0,strBottomName1,strBottomName2,strBottomName3,strBottomPt0,strBottomPt1,strBottomPt2,strBottomPt3<br />
Dim arrINDTopPoint1xyz,arrINDTopPoint2xyz,arrINDTopPoint3xyz,arrINDTopPoint4xyz,strTopName0,strTopName1,strTopName2,strTopName3,strTopPt0,strTopPt1,strTopPt2,strTopPt3<br />
Dim arrINDDriverPoint1xyz,arrINDDriverPoint2xyz,arrINDDriverPoint3xyz,arrINDDriverPoint4xyz,strDriverName0,strDriverName1,strDriverName2,strDriverName3,strDriverPt0,strDriverPt1,strDriverPt2,strDriverPt3<br />
Dim arrPanels<br />
Dim PTObj<br />
Dim arrSrfCentroid, dblSrfCentroidx,dblSrfCentroidy,dblSrfCentroidz<br />
Dim dblBottomMidPt1x,dblBottomMidPt1y, dblBottomMidPt1z,dblBottomMidPt2x,dblBottomMidPt2y,dblBottomMidPt2z,dblBottomSrfCentroidx,dblBottomSrfCentroidy,dblBottomSrfCentroidz,arrBottomSrfCentroid,strGroup<br />
Dim dblTopMidPt1x,dblTopMidPt1y, dblTopMidPt1z,dblTopMidPt2x,dblTopMidPt2y,dblTopMidPt2z,dblTopSrfCentroidx,dblTopSrfCentroidy,dblTopSrfCentroidz,arrTopSrfCentroid<br />
Dim dblDriverMidPt1x,dblDriverMidPt1y, dblDriverMidPt1z,dblDriverMidPt2x,dblDriverMidPt2y,dblDriverMidPt2z,dblDriverSrfCentroidx,dblDriverSrfCentroidy,dblDriverSrfCentroidz,arrDriverSrfCentroid<br />
Dim i,j,k,l<br />
Const intUSpacing = 1<br />
Const intVSpacing = 1<br />
&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;<br />
&#8216;Select pattern<br />
Dim arrPattern1 : arrPattern1 = Rhino.GetObjects(&#8220;Select 1st custom 3d pattern/component&#8221;)<br />
Dim arrPattern2 : arrPattern2 = Rhino.GetObjects(&#8220;Select 2nd custom 3d pattern/component&#8221;)<br />
Dim arrPattern3 : arrPattern3 = Rhino.GetObjects(&#8220;Select 3rd custom 3d pattern/component&#8221;)<br />
Dim arrPattern4 : arrPattern4 = Rhino.GetObjects(&#8220;Select 4th custom 3d pattern/component&#8221;)</p>
<p>Dim dblMax : dblMax = Rhino.GetReal(&#8220;What is the max distance of threshold?&#8221;, 5)<br />
Dim dblNegativeMax : dblNegativeMax = dblMax &#8211; (2*dblMax)<br />
&#8216;Dim dblMin : dblMin = Rhino.GetReal(&#8220;What is the min distance&#8221;, 5)</p>
<p>&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8217;<br />
On Error Resume Next</p>
<p>&#8216;Get PanelingTools Plugin!!<br />
Set PTObj = Rhino.GetPluginObject(&#8220;PanelingTools&#8221;)<br />
If Err Then<br />
MsgBox Err.Description<br />
Exit Sub<br />
End If</p>
<p>&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8217;<br />
&#8216;get surfaces and divisions<br />
Dim strBottomSrfObject : strBottomSrfObject = Rhino.GetObject(&#8220;Select bottom surface to grid&#8221;,24)<br />
Dim strTopSrfObject : strTopSrfObject = Rhino.GetObject(&#8220;Select top surface to grid&#8221;,24)<br />
Dim strDriverSrfObject : strDriverSrfObject = Rhino.GetObject(&#8220;Select driver Surface&#8221;,24)<br />
Dim intUNum : intUNum = Rhino.GetReal(&#8220;How many divisions in the U direction?&#8221;,15)<br />
Dim intVNum : intVNum = Rhino.GetReal(&#8220;How many divisions in the V direction?&#8221;,150)<br />
&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8217;</p>
<p>&#8216;generate points<br />
Dim strcmd1 : strcmd1 = &#8220;ungroup&#8221;<br />
Dim strGridName1 : strGridName1 = &#8220;Bottom&#8221;<br />
Dim strGridName2 : strGridName2 = &#8220;Top&#8221;<br />
Dim strGridName3 : strGridName3 = &#8220;Driver&#8221;<br />
Dim arrBottomGrid : arrBottomGrid = GridByUV(strBottomSrfObject,strGridName1,intUNum,intVNum)<br />
Call Rhino.Command(strcmd1)<br />
Call Rhino.UnselectAllObjects<br />
Dim arrTopGrid : arrTopGrid = GridByUV(strTopSrfObject,strGridName2,intUNum,intVNum)<br />
Call Rhino.Command(strcmd1)<br />
Call Rhino.UnselectAllObjects<br />
Dim arrDriverGrid : arrDriverGrid = GridByUV(strDriverSrfObject,strGridName3,intUNum,intVNum)<br />
Call Rhino.Command(strcmd1)<br />
Call Rhino.UnselectAllObjects<br />
Call rhino.EnableRedraw(False)<br />
&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8217;</p>
<p>Dim intCount : intCount = 0<br />
Dim intLayerCount : intLayerCount = 0<br />
k =0</p>
<p>&#8216;create layer and make it current<br />
Dim strLayer : strLayer = &#8220;Group &#8221; &amp; CStr(intLayerCount)<br />
Dim strPrevLayer : strPrevLayer = &#8220;Group &#8221; &amp; CStr((intLayerCount)-1)<br />
Call Rhino.DeleteLayer(strLayer)<br />
Call Rhino.AddLayer (strLayer)<br />
Call Rhino.CurrentLayer (strLayer)</p>
<p>&#8216;loop through surfaces</p>
<p>&#8216;loop through grid pts<br />
If IsArray(arrBottomGrid) Then<br />
For i = 0 To intVNum-1<br />
For j = 0 To intUNum-1</p>
<p>&#8216;store name in var<br />
strBottomName0 = &#8220;Bottom(&#8221; &amp; CStr(i) &amp; &#8220;)(&#8221; &amp; CStr(j) &amp; &#8220;)&#8221;<br />
strBottomName1 = &#8220;Bottom(&#8221; &amp; CStr(i+1) &amp; &#8220;)(&#8221; &amp; CStr(j) &amp; &#8220;)&#8221;<br />
strBottomName2 = &#8220;Bottom(&#8221; &amp; CStr(i+1) &amp; &#8220;)(&#8221; &amp; CStr(j+1) &amp; &#8220;)&#8221;<br />
strBottomName3 = &#8220;Bottom(&#8221; &amp; CStr(i) &amp; &#8220;)(&#8221; &amp; CStr(j+1) &amp; &#8220;)&#8221;<br />
&#8216;selcect 4 points by name<br />
strBottomPt0 = Rhino.ObjectsByName(strBottomName0)<br />
strBottomPt1 = Rhino.ObjectsByName(strBottomName1)<br />
strBottomPt2 = Rhino.ObjectsByName(strBottomName2)<br />
strBottomPt3 = Rhino.ObjectsByName(strBottomName3)</p>
<p>&#8216;assemble 4 points in one array<br />
arrINDBottomPoints = array(strBottomPt0(0),strBottomPt1(0),strBottomPt2(0),strBottomPt3(0))<br />
&#8216;create and store 4 points in one group<br />
Dim strGroup1 : strGroup1 = &#8220;BottomGroup(&#8221; &amp; CStr(i) &amp; &#8220;)(&#8221; &amp; CStr (j) &amp; &#8220;)&#8221;<br />
Call Rhino.DeleteGroup(strGroup1)<br />
Call Rhino.AddGroup(strGroup1)<br />
Call Rhino.AddObjectsToGroup (arrINDBottomPoints, strGroup1)<br />
&#8216;get coordinates of each point<br />
arrINDBottomPoint1xyz =Rhino.PointCoordinates(strBottomPt0(0))<br />
arrINDBottomPoint2xyz =Rhino.PointCoordinates(strBottomPt1(0))<br />
arrINDBottomPoint3xyz =Rhino.PointCoordinates(strBottomPt2(0))<br />
arrINDBottomPoint4xyz =Rhino.PointCoordinates(strBottomPt3(0))</p>
<p>&#8216;Get centroid of the four surface pts<br />
dblBottomMidPt1x = ((arrINDBottomPoint1xyz(0) + arrINDBottomPoint3xyz(0))/2)<br />
dblBottomMidPt1y = ((arrINDBottomPoint1xyz(1) + arrINDBottomPoint3xyz(1))/2)<br />
dblBottomMidPt1z = ((arrINDBottomPoint1xyz(2) + arrINDBottomPoint3xyz(2))/2)</p>
<p>dblBottomMidPt2x = ((arrINDBottomPoint2xyz(0) + arrINDBottomPoint4xyz(0))/2)<br />
dblBottomMidPt2y = ((arrINDBottomPoint2xyz(1) + arrINDBottomPoint4xyz(1))/2)<br />
dblBottomMidPt2z = ((arrINDBottomPoint2xyz(2) + arrINDBottomPoint4xyz(2))/2)</p>
<p>dblBottomSrfCentroidx = ((dblBottomMidPt1x + dblBottomMidPt2x) /2)<br />
dblBottomSrfCentroidy = ((dblBottomMidPt1y + dblBottomMidPt2y) /2)<br />
dblBottomSrfCentroidz = ((dblBottomMidPt1z + dblBottomMidPt2z) /2)</p>
<p>arrBottomSrfCentroid = array(    dblBottomSrfCentroidx,dblBottomSrfCentroidy,dblBottomSrfCentroidz)</p>
<p>&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8217;<br />
&#8216;store name in var<br />
strTopName0 = &#8220;Top(&#8221; &amp; CStr(i) &amp; &#8220;)(&#8221; &amp; CStr(j) &amp; &#8220;)&#8221;<br />
strTopName1 = &#8220;Top(&#8221; &amp; CStr(i+1) &amp; &#8220;)(&#8221; &amp; CStr(j) &amp; &#8220;)&#8221;<br />
strTopName2 = &#8220;Top(&#8221; &amp; CStr(i+1) &amp; &#8220;)(&#8221; &amp; CStr(j+1) &amp; &#8220;)&#8221;<br />
strTopName3 = &#8220;Top(&#8221; &amp; CStr(i) &amp; &#8220;)(&#8221; &amp; CStr(j+1) &amp; &#8220;)&#8221;<br />
&#8216;selcect 4 points by name<br />
strTopPt0 = Rhino.ObjectsByName(strTopName0)<br />
strTopPt1 = Rhino.ObjectsByName(strTopName1)<br />
strTopPt2 = Rhino.ObjectsByName(strTopName2)<br />
strTopPt3 = Rhino.ObjectsByName(strTopName3)<br />
&#8216;assemble 4 points in one array<br />
arrINDTopPoints = array(strTopPt0(0),strTopPt1(0),strTopPt2(0),strTopPt3(0))<br />
&#8216;create and store 4 points in one group<br />
Dim strGroup2 : strGroup2 = &#8220;TopGroup(&#8221; &amp; CStr(i) &amp; &#8220;)(&#8221; &amp; CStr (j) &amp; &#8220;)&#8221;<br />
Call Rhino.DeleteGroup(strGroup2)<br />
Call Rhino.AddGroup(strGroup2)<br />
Call Rhino.AddObjectsToGroup (arrINDTopPoints, strGroup2)<br />
&#8216;get coordinates of each point<br />
arrINDTopPoint1xyz =Rhino.PointCoordinates(strTopPt0(0))<br />
arrINDTopPoint2xyz =Rhino.PointCoordinates(strTopPt1(0))<br />
arrINDTopPoint3xyz =Rhino.PointCoordinates(strTopPt2(0))<br />
arrINDTopPoint4xyz =Rhino.PointCoordinates(strTopPt3(0))</p>
<p>&#8216;Get centroid of the four surface pts<br />
dblTopMidPt1x = ((arrINDTopPoint1xyz(0) + arrINDTopPoint3xyz(0))/2)<br />
dblTopMidPt1y = ((arrINDTopPoint1xyz(1) + arrINDTopPoint3xyz(1))/2)<br />
dblTopMidPt1z = ((arrINDTopPoint1xyz(2) + arrINDTopPoint3xyz(2))/2)</p>
<p>dblTopMidPt2x = ((arrINDTopPoint2xyz(0) + arrINDTopPoint4xyz(0))/2)<br />
dblTopMidPt2y = ((arrINDTopPoint2xyz(1) + arrINDTopPoint4xyz(1))/2)<br />
dblTopMidPt2z = ((arrINDTopPoint2xyz(2) + arrINDTopPoint4xyz(2))/2)</p>
<p>dblTopSrfCentroidx = ((dblTopMidPt1x + dblTopMidPt2x) /2)<br />
dblTopSrfCentroidy = ((dblTopMidPt1y + dblTopMidPt2y) /2)<br />
dblTopSrfCentroidz = ((dblTopMidPt1z + dblTopMidPt2z) /2)</p>
<p>&#8216;get EXACT centroid<br />
dblSrfCentroidx = ((dblBottomSrfCentroidx + dblTopSrfCentroidx) /2)<br />
dblSrfCentroidy = ((dblBottomSrfCentroidy + dblTopSrfCentroidy) /2)<br />
dblSrfCentroidz = ((dblBottomSrfCentroidz + dblTopSrfCentroidz) /2)</p>
<p>arrSrfCentroid = array(    dblSrfCentroidx,dblSrfCentroidy,dblSrfCentroidz)<br />
&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8217;<br />
&#8216;store name in var<br />
strDriverName0 = &#8220;Driver(&#8221; &amp; CStr(i) &amp; &#8220;)(&#8221; &amp; CStr(j) &amp; &#8220;)&#8221;<br />
strDriverName1 = &#8220;Driver(&#8221; &amp; CStr(i+1) &amp; &#8220;)(&#8221; &amp; CStr(j) &amp; &#8220;)&#8221;<br />
strDriverName2 = &#8220;Driver(&#8221; &amp; CStr(i+1) &amp; &#8220;)(&#8221; &amp; CStr(j+1) &amp; &#8220;)&#8221;<br />
strDriverName3 = &#8220;Driver(&#8221; &amp; CStr(i) &amp; &#8220;)(&#8221; &amp; CStr(j+1) &amp; &#8220;)&#8221;<br />
&#8216;selcect 4 points by name<br />
strDriverPt0 = Rhino.ObjectsByName(strDriverName0)<br />
strDriverPt1 = Rhino.ObjectsByName(strDriverName1)<br />
strDriverPt2 = Rhino.ObjectsByName(strDriverName2)<br />
strDriverPt3 = Rhino.ObjectsByName(strDriverName3)</p>
<p>&#8216;assemble 4 points in one array<br />
arrINDDriverPoints = array(strDriverPt0(0),strDriverPt1(0),strDriverPt2(0),strDriverPt3(0))<br />
&#8216;create and store 4 points in one group<br />
Dim strGroup3 : strGroup3 = &#8220;DriverGroup(&#8221; &amp; CStr(i) &amp; &#8220;)(&#8221; &amp; CStr (j) &amp; &#8220;)&#8221;<br />
Call Rhino.DeleteGroup(strGroup3)<br />
Call Rhino.AddGroup(strGroup3)<br />
Call Rhino.AddObjectsToGroup (arrINDDriverPoints, strGroup3)<br />
&#8216;get coordinates of each point<br />
arrINDDriverPoint1xyz =Rhino.PointCoordinates(strDriverPt0(0))<br />
arrINDDriverPoint2xyz =Rhino.PointCoordinates(strDriverPt1(0))<br />
arrINDDriverPoint3xyz =Rhino.PointCoordinates(strDriverPt2(0))<br />
arrINDDriverPoint4xyz =Rhino.PointCoordinates(strDriverPt3(0))</p>
<p>&#8216;Get centroid of the four surface pts<br />
dblDriverMidPt1x = ((arrINDDriverPoint1xyz(0) + arrINDDriverPoint3xyz(0))/2)<br />
dblDriverMidPt1y = ((arrINDDriverPoint1xyz(1) + arrINDDriverPoint3xyz(1))/2)<br />
dblDriverMidPt1z = ((arrINDDriverPoint1xyz(2) + arrINDDriverPoint3xyz(2))/2)</p>
<p>dblDriverMidPt2x = ((arrINDDriverPoint2xyz(0) + arrINDDriverPoint4xyz(0))/2)<br />
dblDriverMidPt2y = ((arrINDDriverPoint2xyz(1) + arrINDDriverPoint4xyz(1))/2)<br />
dblDriverMidPt2z = ((arrINDDriverPoint2xyz(2) + arrINDDriverPoint4xyz(2))/2)</p>
<p>dblDriverSrfCentroidx = ((dblDriverMidPt1x + dblDriverMidPt2x) /2)<br />
dblDriverSrfCentroidy = ((dblDriverMidPt1y + dblDriverMidPt2y) /2)<br />
dblDriverSrfCentroidz = ((dblDriverMidPt1z + dblDriverMidPt2z) /2)</p>
<p>arrDriverSrfCentroid = array(    dblDriverSrfCentroidx,dblDriverSrfCentroidy,dblDriverSrfCentroidz)</p>
<p>&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;</p>
<p>&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;<br />
&#8221;choose which panel To apply</p>
<p>&#8216;panel 1<br />
If dblDriverSrfCentroidz &gt; dblMax Then<br />
&#8216;Call paneling tool<br />
Call PanelCustomGroup(strGroup1,strGroup2,arrPattern1(0))<br />
End If</p>
<p>&#8216;panel 2<br />
If dblDriverSrfCentroidz &lt; dblMax Then<br />
If dblDriverSrfCentroidz &gt; 0 Then<br />
&#8216;Call paneling tool<br />
Call PanelCustomGroup(strGroup1,strGroup2,arrPattern2(0))<br />
End If<br />
End If</p>
<p>&#8216;panel 3<br />
If dblDriverSrfCentroidz &lt; 0 Then<br />
If dblDriverSrfCentroidz &gt; dblNegativeMax Then<br />
&#8216;Call paneling tool<br />
Call PanelCustomGroup(strGroup1,strGroup2,arrPattern3(0))<br />
End If<br />
End If</p>
<p>&#8216;panel 4<br />
If dblDriverSrfCentroidz &lt; dblNegativeMax Then<br />
&#8216;Call paneling tool<br />
Call PanelCustomGroup(strGroup1,strGroup2,arrPattern4(0))<br />
End If</p>
<p>&#8216;print progess bar<br />
Dim intTotal: intTotal = (intVNum * intUNum)<br />
Dim intPercent : intPercent = ((k/intTotal)*100)<br />
Call Rhino.StatusBarMessage (&#8221; &#8221; &amp; CStr(k) &amp; &#8221; of &#8221; &amp; CStr(intTotal) &amp; &#8221; panels done&#8230;&#8230;&#8230;&#8221; &amp; CStr(intPercent)&amp; &#8220;% Done&#8221;)</p>
<p>Dim intReset : intReset = (intCount/intUNum)<br />
&#8216;                If intReset = 1 Then<br />
&#8216;                    intLayerCount = intLayerCount + 1<br />
&#8216;                    strLayer = &#8220;Group &#8221; &amp; CStr(intLayerCount)<br />
&#8216;                    strPrevLayer = &#8220;Group &#8221; &amp; CStr((intLayerCount)-1)<br />
&#8216;                    Call Rhino.DeleteLayer(strLayer)<br />
&#8216;                    Call Rhino.AddLayer (strLayer)<br />
&#8216;                    Call Rhino.CurrentLayer (strLayer)<br />
&#8216;                    Call Rhino.LayerVisible(strPrevLayer, False)<br />
&#8216;                End If</p>
<p>k = k + 1<br />
Next</p>
<p>intCount = intCount + 1</p>
<p>Next</p>
<p>Else<br />
Call Rhino.Print(&#8220;not an array&#8221;)<br />
End If</p>
<p>&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8217;<br />
Call Rhino.HideObject(strBottomSrfObject)<br />
Call Rhino.HideObject(strTopSrfObject)<br />
Call Rhino.HideObjects(arrBottomGrid)<br />
Call Rhino.HideObjects(arrTopGrid)<br />
Call Rhino.HideObjects(arrDriverGrid)<br />
&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8217;<br />
Call rhino.EnableRedraw(True)</p>
<p>&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8221;&#8217;</p>
<p>Set PTObj = Nothing</p>
<p>End Sub</p>
<p>Function PanelCustomGroup(strFirGroupName1,strGroupName2,strObject)</p>
<p>Dim strCmd, strPanel<br />
&#8216;strCmd = &#8220;! _ptPanel3DCustom _selGroup BottomGroup _Enter _SelGroup TopGroup _Enter _Enter _SelID &#8221; &amp; strObject &amp; &#8221; _Enter _Enter&#8221;<br />
strCmd = &#8220;! _ptPanel3DCustom _selGroup &#8221; &amp; strFirGroupName1 &amp; &#8221; _Enter _SelGroup &#8221; &amp; strGroupName2&amp; &#8221; _Enter _Enter _SelID &#8221; &amp; strObject &amp; &#8221; _Enter _Enter&#8221;<br />
strPanel = Rhino.Command (strCmd)</p>
<p>PanelCustomGroup = strPanel<br />
End Function</p>
<p>Sub PanelCustomPts(arrBottomPts,arrTopPts,strObject)</p>
<p>Dim strCmd<br />
strCmd = &#8220;! _ptPanel3DCustom _SelID &#8221; &amp; arrBottomPts &amp; &#8221; _Enter _SelID &#8221; &amp; arrTopPts &amp; &#8221; _Enter _Enter _SelID &#8221; &amp; strObject &amp; &#8221; _Enter _Enter&#8221;<br />
Rhino.Command strCmd</p>
<p>End Sub</p>
<p>Function GridByUV(strSrfObject,strGridName,intUNum,intVNum)<br />
Dim arrPoints, PTObj<br />
Const boolUMode = False   &#8216;Divide by number in U direction<br />
Const boolVMode = False    &#8216;Divide by distance in V direction<br />
&#8216;Const intUNum = 15        &#8216;Number of points in U direction<br />
&#8216;Const intVNum = 150         &#8216;Number of points in V direction<br />
Const doubleUDis = 0      &#8216;Distance In U direction<br />
Const doubleVDis = 1.5    &#8216;Distance In V direction<br />
Const boolURound = False  &#8216;Round in U direction<br />
Const boolVRound = True   &#8216;Round in V direction<br />
Const boolURoundMethod = False  &#8216;RoundMethod in U Dir<br />
Const boolVRoundMethod = False  &#8216;Round up in V direction<br />
Const boolGroup = True<br />
&#8216;strGridName = &#8220;MyGrid&#8221;</p>
<p>On Error Resume Next</p>
<p>&#8216;Get PanelingTools Object<br />
Set PTObj = Rhino.GetPluginObject(&#8220;PanelingTools&#8221;)</p>
<p>If Err Then<br />
MsgBox Err.Description<br />
Exit Function<br />
End If</p>
<p>&#8216;Select a surface<br />
&#8216;strSrfObject = Rhino.GetObject(&#8220;Select a surface&#8221;, <img src='http://s0.wp.com/wp-includes/images/smilies/icon_cool.gif' alt='8)' class='wp-smiley' /> </p>
<p>If (strSrfObject &lt;&gt; vbNull) Then</p>
<p>&#8216;Call grid generation function<br />
arrPoints = PTObj.GridBySurfaceUV( strSrfObject, boolUmode, boolVMode, intUNum, intVNum, doubleUDis,  doubleVDis, boolURound, boolVRound, boolURoundMethod, boolVRoundMethod, boolGroup, strGridName )<br />
End If<br />
GridByUV = arrPoints<br />
Set PTObj = Nothing<br />
End Function</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mccunication.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mccunication.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mccunication.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mccunication.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mccunication.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mccunication.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mccunication.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mccunication.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mccunication.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mccunication.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mccunication.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mccunication.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mccunication.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mccunication.wordpress.com/40/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mccunication.wordpress.com&amp;blog=5490620&amp;post=40&amp;subd=mccunication&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mccunication.wordpress.com/2009/06/16/over-due-paneling-tools-multiple-patternscomponents-scripts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7b230669398fea9562fc35adca0f095a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">michaelgmccune</media:title>
		</media:content>

		<media:content url="http://mccunication.files.wordpress.com/2009/06/picture-047.jpg?w=1023" medium="image">
			<media:title type="html">Cabo San Lucas</media:title>
		</media:content>
	</item>
		<item>
		<title>Paneling Tools Gallery</title>
		<link>http://mccunication.wordpress.com/2009/06/10/paneling-tools-gallery/</link>
		<comments>http://mccunication.wordpress.com/2009/06/10/paneling-tools-gallery/#comments</comments>
		<pubDate>Wed, 10 Jun 2009 04:26:49 +0000</pubDate>
		<dc:creator>michaelgmccune</dc:creator>
				<category><![CDATA[PanelingTools]]></category>

		<guid isPermaLink="false">http://mccunication.wordpress.com/?p=47</guid>
		<description><![CDATA[Rajaa created this gallery some time ago, but it seems as though it has lost its momemtum. If you are using paneling tools I encourage you to contact Rajaa. I am sure she would be happy to add to gallery. Here is the link: Paneling Tools Gallery.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mccunication.wordpress.com&amp;blog=5490620&amp;post=47&amp;subd=mccunication&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Rajaa created this gallery some time ago, but it seems as though it has lost its momemtum. If you are using paneling tools I encourage you to contact Rajaa. I am sure she would be happy to add to gallery. Here is the link: <a title="Paneling Tools Gallery" href="http://en.wiki.mcneel.com/default.aspx/McNeel/PanelingGallery.html" target="_blank">Paneling Tools Gallery.</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mccunication.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mccunication.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mccunication.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mccunication.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mccunication.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mccunication.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mccunication.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mccunication.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mccunication.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mccunication.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mccunication.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mccunication.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mccunication.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mccunication.wordpress.com/47/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mccunication.wordpress.com&amp;blog=5490620&amp;post=47&amp;subd=mccunication&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mccunication.wordpress.com/2009/06/10/paneling-tools-gallery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7b230669398fea9562fc35adca0f095a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">michaelgmccune</media:title>
		</media:content>
	</item>
		<item>
		<title>Soft-Forms with Paneling Tools</title>
		<link>http://mccunication.wordpress.com/2008/12/14/soft-forms-with-paneling-tools/</link>
		<comments>http://mccunication.wordpress.com/2008/12/14/soft-forms-with-paneling-tools/#comments</comments>
		<pubDate>Sun, 14 Dec 2008 03:03:01 +0000</pubDate>
		<dc:creator>michaelgmccune</dc:creator>
				<category><![CDATA[PanelingTools]]></category>
		<category><![CDATA[RhinoScript]]></category>

		<guid isPermaLink="false">http://mccunication.wordpress.com/?p=22</guid>
		<description><![CDATA[These were screen studies utilizing Paneling Tools. The 4-5 soft components were modeled in Maya, imported into Rhino, and paneled across a surface. The explorations were then 3d printed.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mccunication.wordpress.com&amp;blog=5490620&amp;post=22&amp;subd=mccunication&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>These were screen studies utilizing Paneling Tools. The 4-5  soft components were modeled in Maya, imported into Rhino, and paneled across a surface. The explorations were then 3d printed.</p>
<p><img class="alignleft size-medium wp-image-24" title="img_3084_edited1" src="http://mccunication.files.wordpress.com/2008/12/img_3084_edited1.jpg?w=300&#038;h=219" alt="img_3084_edited1" width="300" height="219" /></p>
<p><img class="alignleft size-medium wp-image-25" title="img_3085_edited" src="http://mccunication.files.wordpress.com/2008/12/img_3085_edited.jpg?w=227&#038;h=300" alt="img_3085_edited" width="227" height="300" /></p>
<p><img class="alignleft size-medium wp-image-26" title="img_3087_edited" src="http://mccunication.files.wordpress.com/2008/12/img_3087_edited.jpg?w=225&#038;h=300" alt="img_3087_edited" width="225" height="300" /></p>
<p><img class="alignleft size-medium wp-image-27" title="img_3096_edited" src="http://mccunication.files.wordpress.com/2008/12/img_3096_edited.jpg?w=300&#038;h=188" alt="img_3096_edited" width="300" height="188" /></p>
<p><img class="alignleft size-medium wp-image-28" title="img_3095_edited" src="http://mccunication.files.wordpress.com/2008/12/img_3095_edited.jpg?w=269&#038;h=300" alt="img_3095_edited" width="269" height="300" /></p>
<p><img class="alignleft size-medium wp-image-29" title="img_3090_edited" src="http://mccunication.files.wordpress.com/2008/12/img_3090_edited.jpg?w=300&#038;h=225" alt="img_3090_edited" width="300" height="225" /></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mccunication.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mccunication.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mccunication.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mccunication.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mccunication.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mccunication.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mccunication.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mccunication.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mccunication.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mccunication.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mccunication.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mccunication.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mccunication.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mccunication.wordpress.com/22/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mccunication.wordpress.com&amp;blog=5490620&amp;post=22&amp;subd=mccunication&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mccunication.wordpress.com/2008/12/14/soft-forms-with-paneling-tools/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7b230669398fea9562fc35adca0f095a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">michaelgmccune</media:title>
		</media:content>

		<media:content url="http://mccunication.files.wordpress.com/2008/12/img_3084_edited1.jpg?w=300" medium="image">
			<media:title type="html">img_3084_edited1</media:title>
		</media:content>

		<media:content url="http://mccunication.files.wordpress.com/2008/12/img_3085_edited.jpg?w=227" medium="image">
			<media:title type="html">img_3085_edited</media:title>
		</media:content>

		<media:content url="http://mccunication.files.wordpress.com/2008/12/img_3087_edited.jpg?w=225" medium="image">
			<media:title type="html">img_3087_edited</media:title>
		</media:content>

		<media:content url="http://mccunication.files.wordpress.com/2008/12/img_3096_edited.jpg?w=300" medium="image">
			<media:title type="html">img_3096_edited</media:title>
		</media:content>

		<media:content url="http://mccunication.files.wordpress.com/2008/12/img_3095_edited.jpg?w=269" medium="image">
			<media:title type="html">img_3095_edited</media:title>
		</media:content>

		<media:content url="http://mccunication.files.wordpress.com/2008/12/img_3090_edited.jpg?w=300" medium="image">
			<media:title type="html">img_3090_edited</media:title>
		</media:content>
	</item>
		<item>
		<title>Parametric Multi-Paneling</title>
		<link>http://mccunication.wordpress.com/2008/12/10/parametric-multi-paneling/</link>
		<comments>http://mccunication.wordpress.com/2008/12/10/parametric-multi-paneling/#comments</comments>
		<pubDate>Wed, 10 Dec 2008 04:29:55 +0000</pubDate>
		<dc:creator>michaelgmccune</dc:creator>
				<category><![CDATA[PanelingTools]]></category>
		<category><![CDATA[RhinoScript]]></category>
		<category><![CDATA[Rhino]]></category>

		<guid isPermaLink="false">http://mccunication.wordpress.com/?p=16</guid>
		<description><![CDATA[After playing with the PanelingTools plug-in for Rhino4, I noticed its great power for mapping components on a surface efficiently. The one restraint that it has is its inability to map multiple components through conditional statements. The great thing about PanelingTools is that it allows you to access its syntax tree in RhinoScript. After gaining [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mccunication.wordpress.com&amp;blog=5490620&amp;post=16&amp;subd=mccunication&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>After playing with the <a href="http://en.wiki.mcneel.com/default.aspx/McNeel/PanelingTools.html">PanelingTools</a> plug-in for Rhino4, I noticed its great power for mapping components on a surface efficiently. The one restraint that it has is its inability to map multiple components through <a href="http://en.wikipedia.org/wiki/Conditional_statement">conditional statements</a>. The great thing about PanelingTools is that it allows you to access its syntax tree in RhinoScript. After gaining access to its mapping/ordering technique, I wrote a script to populate multiple surfaces with multiple components/panels. The script chooses which component is more appropriate by analyzing a point, surface, or light displacement map. This allows for performance based populations and surface mimicking populations.</p>
<h1><a href="http://tesselion.wordpress.com/"><br />
</a></h1>
<p>Inspired by SJET and theverymany.net &#8216;s <a href="http://tesselion.wordpress.com/">Tesselion</a>.</p>
<p>Utilizing Rhino + PanelingTools + RhinoScript, four base components were modeled and tagged into the script according to their porosity. A &#8220;driver surface&#8221; ( that could be a height field of a heat dissipation map of the target surface) dictates which component to populate depending on the zed of the corresponding grid point of surface. Further exploration and development is coming.</p>
<p>One thing that should be understood is that this experiment does not clearly match the level of complexity achieved by SJET and theverymany.net!! The surface I used to populate was not a rulled surface nor a faceted surface; therefore, the individual panels are not planar as in the Tesselion. Although it is a nice feature of PanelingTools to &#8220;morph&#8221; the components to the surface grids, it is not desired for fabricating out of planar materials economically! Script will be posted after cleanup.</p>
<p>Very quick exploration:</p>
<p><img class="alignleft size-medium wp-image-17" title="Parametric Multi-PanelingTools" src="http://mccunication.files.wordpress.com/2008/12/sjet-tesselion.jpg?w=300&#038;h=224" alt="Parametric Multi-PanelingTools" width="300" height="224" /><img class="size-medium wp-image-18 alignleft" title="Parametric Multi-PanelingTools" src="http://mccunication.files.wordpress.com/2008/12/sjet-tesselion2.jpg?w=300&#038;h=224" alt="Parametric Multi-PanelingTools" width="300" height="224" /></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mccunication.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mccunication.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mccunication.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mccunication.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mccunication.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mccunication.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mccunication.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mccunication.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mccunication.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mccunication.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mccunication.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mccunication.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mccunication.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mccunication.wordpress.com/16/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mccunication.wordpress.com&amp;blog=5490620&amp;post=16&amp;subd=mccunication&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mccunication.wordpress.com/2008/12/10/parametric-multi-paneling/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7b230669398fea9562fc35adca0f095a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">michaelgmccune</media:title>
		</media:content>

		<media:content url="http://mccunication.files.wordpress.com/2008/12/sjet-tesselion.jpg?w=300" medium="image">
			<media:title type="html">Parametric Multi-PanelingTools</media:title>
		</media:content>

		<media:content url="http://mccunication.files.wordpress.com/2008/12/sjet-tesselion2.jpg?w=300" medium="image">
			<media:title type="html">Parametric Multi-PanelingTools</media:title>
		</media:content>
	</item>
		<item>
		<title>Light Basd Diffusion Limited Aggregation</title>
		<link>http://mccunication.wordpress.com/2008/11/13/light-basd-diffusion-limited-aggregation/</link>
		<comments>http://mccunication.wordpress.com/2008/11/13/light-basd-diffusion-limited-aggregation/#comments</comments>
		<pubDate>Thu, 13 Nov 2008 23:00:41 +0000</pubDate>
		<dc:creator>michaelgmccune</dc:creator>
				<category><![CDATA[RhinoScript]]></category>
		<category><![CDATA[AA]]></category>
		<category><![CDATA[Rhino]]></category>

		<guid isPermaLink="false">http://mccunication.wordpress.com/?p=4</guid>
		<description><![CDATA[AA Summer DLab was a 2 week workshop where with the direction of Dave Pigram and Ezio Blasetti we focused on generative processes utilizing RhinoScript. Although I knew how to read the language, this was my first exposure to these generative techniques. This marks the beginning of a search to know more. In the workshop, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mccunication.wordpress.com&amp;blog=5490620&amp;post=4&amp;subd=mccunication&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[
<a href='http://mccunication.wordpress.com/2008/11/13/light-basd-diffusion-limited-aggregation/cdocuments-and-settingsuserdesktoplines-dla-layout1-1/' title='C:Documents and SettingsuserDesktoplines dla Layout1 (1)'><img data-attachment-id='5' data-orig-size='1650,1937' data-liked='0'width="127" height="150" src="http://mccunication.files.wordpress.com/2008/11/lines-dla-layout1-1.jpg?w=127&#038;h=150" class="attachment-thumbnail" alt="C:Documents and SettingsuserDesktoplines dla Layout1 (1)" title="C:Documents and SettingsuserDesktoplines dla Layout1 (1)" /></a>
<a href='http://mccunication.wordpress.com/2008/11/13/light-basd-diffusion-limited-aggregation/plan-diagramsai/' title='plan diagrams.ai'><img data-attachment-id='6' data-orig-size='691,861' data-liked='0'width="120" height="150" src="http://mccunication.files.wordpress.com/2008/11/plan-diagrams.jpg?w=120&#038;h=150" class="attachment-thumbnail" alt="plan diagrams.ai" title="plan diagrams.ai" /></a>
<a href='http://mccunication.wordpress.com/2008/11/13/light-basd-diffusion-limited-aggregation/p1020300/' title='p1020300'><img data-attachment-id='7' data-orig-size='3168,2376' data-liked='0'width="150" height="112" src="http://mccunication.files.wordpress.com/2008/11/p1020300.jpg?w=150&#038;h=112" class="attachment-thumbnail" alt="p1020300" title="p1020300" /></a>
<a href='http://mccunication.wordpress.com/2008/11/13/light-basd-diffusion-limited-aggregation/3d-view-1-exp10-5/' title='3d-view-1-exp10-5'><img data-attachment-id='8' data-orig-size='4724,3248' data-liked='0'width="150" height="103" src="http://mccunication.files.wordpress.com/2008/11/3d-view-1-exp10-5.jpg?w=150&#038;h=103" class="attachment-thumbnail" alt="3d-view-1-exp10-5" title="3d-view-1-exp10-5" /></a>
<a href='http://mccunication.wordpress.com/2008/11/13/light-basd-diffusion-limited-aggregation/pict0086/' title='pict0086'><img data-attachment-id='9' data-orig-size='2272,1704' data-liked='0'width="150" height="112" src="http://mccunication.files.wordpress.com/2008/11/pict0086.jpg?w=150&#038;h=112" class="attachment-thumbnail" alt="pict0086" title="pict0086" /></a>
<a href='http://mccunication.wordpress.com/2008/11/13/light-basd-diffusion-limited-aggregation/surfaces/' title='surfaces'><img data-attachment-id='10' data-orig-size='1257,726' data-liked='0'width="150" height="86" src="http://mccunication.files.wordpress.com/2008/11/surfaces.jpg?w=150&#038;h=86" class="attachment-thumbnail" alt="surfaces" title="surfaces" /></a>

<p><strong>AA Summer DLab was a 2 week workshop where with the direction of Dave Pigram and Ezio Blasetti we focused on generative processes utilizing RhinoScript. Although I knew how to read the language, this was my first exposure to these generative techniques. This marks the beginning of a search to know more. </strong></p>
<p><strong>In the workshop, students designed chandeliers utilizing generative algorithms. My group explored the potential for light based parameters in a  DLA, diffusion limited aggregation, system. </strong></p>
<p><strong>The first script uses a surface (based on the luminance of a ceiling plan) to aggregate a ceiling plane with &#8220;smart&#8221; light nodes and develop connections between them based on the amount of light in a given region.</strong></p>
<p>Option Explicit<br />
&#8216;Script written by &lt;Michael McCune,Stephen Crawford, Karol Seamus Mac Gairbheith&gt;<br />
&#8216;Script version Wednesday, August 06, 2008 5:42:24 PM<br />
&#8216;Light based Diffusion Limited Aggregation</p>
<p>Call Main()<br />
Sub Main()</p>
<p>&#8216;declaraions<br />
Dim dblDistance, arrSeeds(), arrSeedThresholds(),arrMinLightPt<br />
Dim i,j,k,l,m</p>
<p>&#8216;because there is nothing in the array, set it at minus one to trick the computer that when we add 1 futher below the first slot will be 0<br />
ReDim arrSeeds(-1)<br />
ReDim arrSeedThresholds(-1)</p>
<p>&#8216;user iputs<br />
Dim dblScaleFactor : dblScaleFactor = Rhino.GetReal(&#8220;What is the distance scale factor between seed and emmitter?&#8221;,1,.0001,100)<br />
If IsNull(dblScaleFactor) Then Exit Sub</p>
<p>Dim dblVelocityScaler : dblVelocityScaler = Rhino.GetReal(&#8220;Velociy Scaler?&#8221;,1,.01,1000)<br />
If IsNull(strObject) Then Exit Sub</p>
<p>Dim dblRand : dblRand = Rhino.GetReal(&#8220;What is degree of randomness to the movement of the emmitter?&#8221;,.2,.01,100)<br />
If IsNull(dblRand) Then Exit Sub</p>
<p>Dim intConnections : intConnections = Rhino.GetReal(&#8220;What is the max conections between seed and attractor?&#8221;,4,3,10)<br />
If IsNull(intConnections) Then Exit Sub</p>
<p>Dim intStep : intStep = Rhino.GetReal(&#8220;How many times do you want to do cycle?&#8221;,1000,1)<br />
If IsNull(intStep) Then Exit Sub</p>
<p>Dim intNumberOfStarterEmmitters: intNumberOfStarterEmmitters = Rhino.GetReal(&#8220;How many Emmitters to Start With?&#8221;,20,1,1000)</p>
<p>Dim strObject : strObject = Rhino.GetObject(&#8220;give me a surface to populate with dots&#8221;,24)<br />
If IsNull(strObject) Then Exit Sub</p>
<p>&#8216;Call Rhino.EnableRedraw(False)</p>
<p>&#8216;Create Bounding Box so the attractors will not wonder off!!<br />
Dim arrSBox : arrSBox =  Rhino.BoundingBox (strObject)<br />
Dim arrBBox : arrBBox =  arrSBox</p>
<p>arrBBox(0) = array(arrSBox(0)(0),arrSBox(0)(1),-.1)<br />
arrBBox(1) = array(arrSBox(1)(0),arrSBox(1)(1),-.1)<br />
arrBBox(2) = array(arrSBox(2)(0),arrSBox(2)(1),-.1)<br />
arrBBox(3) = array(arrSBox(3)(0),arrSBox(3)(1),-.1)<br />
arrBBox(4) = array(arrSBox(4)(0),arrSBox(4)(1),9)<br />
arrBBox(5) = array(arrSBox(5)(0),arrSBox(5)(1),9)<br />
arrBBox(6) = array(arrSBox(6)(0),arrSBox(6)(1),9)<br />
arrBBox(7) = array(arrSBox(7)(0),arrSBox(7)(1),9)</p>
<p>&#8216;Create the first seed<br />
arrMinLightPt = GetMinLightPt (strObject)<br />
ReDim arrSeeds(0)<br />
arrSeeds(0)            =     Rhino.AddPoint(array(arrMinLightPt(0),arrMinLightPt(1),0))<br />
Call Rhino.ObjectLayer(arrSeeds(0), &#8220;Attractors&#8221;)</p>
<p>&#8216;find the corresponding Threshold<br />
ReDim arrSeedThresholds(0)<br />
arrSeedThresholds(0) = GetThreshold(strObject,Rhino.PointCoordinates(arrSeeds(0)),dblScaleFactor)<br />
&#8216;Call Rhino.Print(arrSeedThresholds(0))</p>
<p>&#8216;place intnumber of emmitters randomly to start with<br />
For l = 0 To intNumberOfStarterEmmitters<br />
Dim arrNewPt2 : arrNewPt2 = array(28*(rnd-0.5), 28*(rnd-0.5),0)<br />
arrNewPt2 = ConstrainToBBox(arrNewPt2, arrBBox)<br />
Rhino.AddPoint arrNewPt2<br />
Call Rhino.ObjectLayer(arrNewPt2, &#8220;Emmitters&#8221;)<br />
Next</p>
<p>&#8216;start loop for each iteration<br />
For j = 0 To intStep</p>
<p>Dim arrEmmitters : arrEmmitters = Rhino.ObjectsByLayer(&#8220;Emmitters&#8221;)</p>
<p>&#8216;cycle through each arrEmmitters<br />
&#8216;<br />
For i = 0 To (Ubound(arrEmmitters)-1)<br />
If IsNull(arrEmmitters) Then<br />
Exit For<br />
End If<br />
&#8216;Find the attractors with more than x connections, then place those in an &#8220;expired&#8221; layer<br />
&#8216;Call SortPoints()</p>
<p>Dim arrPointxyzEmmitter</p>
<p>arrPointxyzEmmitter = Rhino.PointCoordinates(arrEmmitters(i))</p>
<p>&#8216;make the emmitters move<br />
&#8216;RandomizeRandomize<br />
Dim rndDirectionX : rndDirectionX = rnd-0.5<br />
Dim rndDirectionY : rndDirectionY = rnd-0.5<br />
Dim rndDirectionZ : rndDirectionZ = rnd-0.5<br />
&#8216;Dim rndDirectionZ : rndDirectionZ = rnd-0.5</p>
<p>&#8216;get a threshold factor to apply to the speed at which the particles move<br />
Dim dblThresholdFactor<br />
dblThresholdFactor = GetThreshold(strObject,arrPointxyzEmmitter,dblVelocityScaler)</p>
<p>&#8216;Rhino.Print(dblThresholdFactor)</p>
<p>Dim arrNewPt : arrNewPt = array(arrPointxyzEmmitter(0)+3*rndDirectionX, arrPointxyzEmmitter(1)+3*rndDirectionY, 0)<br />
arrNewPt = ConstrainToBBox(arrNewPt, arrBBox)<br />
rhino.DeleteObject arrEmmitters(i)<br />
arrEmmitters(i) = Rhino.AddPoint (arrNewPt)<br />
&#8216;Call Rhino.PointCoordinates (arrEmmitters(i) , arrNewPt)</p>
<p>Dim arrLineCounter : arrLineCounter = Rhino.ObjectsByLayer(&#8220;Lines&#8221;)</p>
<p>&#8216;start loop for each arrAttrctors<br />
For k=0 To Ubound(arrSeeds)<br />
&#8216;measure distance between emmitter and seed<br />
Dim arrPointxyzAttractor : arrPointxyzAttractor = Rhino.PointCoordinates(arrSeeds(k))<br />
dblDistance = Rhino.Distance(arrPointxyzAttractor,arrNewPt )</p>
<p>If dblDistance &lt; arrSeedThresholds(k) Then<br />
&#8216;If dblDistance &gt; 1.67 And dblDistance &lt; 8.4 Then</p>
<p>&#8216;Rhino.Print dblDistance<br />
&#8216;draw a line from seed to emmitter<br />
Dim strLine : strLine = Rhino.AddLine(arrPointxyzAttractor,arrNewPt)<br />
If Not IsNull(strLine) Then<br />
Call Rhino.ObjectLayer(strLine, &#8220;Lines&#8221;)<br />
End If<br />
&#8216;switch the emmitter to the attrctor layer<br />
Call Rhino.ObjectLayer(arrEmmitters(i), &#8220;Attractors&#8221;)<br />
ReDim Preserve arrSeeds(Ubound(arrSeeds)+1) &#8216;store the name of the new seed (previously an emmiter) in an array<br />
arrSeeds(Ubound(arrSeeds)) = arrEmmitters(i)<br />
&#8216;claculatethe threshold for the new seed and store it in a corresponding array<br />
ReDim Preserve arrSeedThresholds(Ubound(arrSeedThresholds)+1)<br />
arrSeedThresholds(Ubound(arrSeedThresholds)) = GetThreshold(strObject,Rhino.PointCoordinates(arrSeeds(k)),dblScaleFactor)</p>
<p>&#8216;End If<br />
End If<br />
Next<br />
Dim arrCleanedSeeds : arrCleanedSeeds = SortPointsAfterDave(arrSeeds)<br />
Dim arrCleanSeed<br />
ReDim arrSeeds(-1)<br />
For Each arrCleanSeed In arrCleanedSeeds<br />
ReDim Preserve arrSeeds(Ubound(arrSeeds)+1) &#8216;store the name of the new seed (previously an emmiter) in an array<br />
arrSeeds(Ubound(arrSeeds)) = arrCleanSeed<br />
Next<br />
Dim arrLineCounter2 : arrLineCounter2 = Rhino.ObjectsByLayer(&#8220;Lines&#8221;)</p>
<p>If Ubound(arrLineCounter) &lt; Ubound(arrLineCounter2) Then</p>
<p>&#8216;create a new emmitter (particle)<br />
arrNewPt2 = array(28*(rnd-0.5), 28*(rnd-0.5), 0*(rnd-0.5))<br />
arrNewPt2 = ConstrainToBBox(arrNewPt2, arrBBox)<br />
For m = 0 To Ubound (arrSeeds)<br />
Dim arrSeedsx: arrPointxyzAttractor = Rhino.PointCoordinates(arrSeeds(k))<br />
dblDistance = Rhino.Distance(arrNewPt2,arrSeeds(m))<br />
If dblDistance &gt; 1.67 Then<br />
Rhino.AddPoint arrNewPt2<br />
Call Rhino.ObjectLayer(arrNewPt2, &#8220;Emmitters&#8221;)<br />
Else ReLoop<br />
End If<br />
Next</p>
<p>End If</p>
<p>Next</p>
<p>Next</p>
<p>&#8216;Call AverageDistLoft</p>
<p>Call Rhino.EnableRedraw(True)</p>
<p>End Sub</p>
<p>Function GetNumberOfSeedsWithinDist(strSeed,dblDistanceThreshold)<br />
&#8216;Gets the number of seeds within a distance of a seed. that number of seeds should then be multiplied by the z direction of the point</p>
<p>Dim i,arrPointxyzSeed, arrSeeds<br />
Dim arrNumberOfSeedsWithinDistance()<br />
ReDim arrNumberOfSeedsWithinDistance(-1)</p>
<p>ReDim arrNumberOfSeedsWithinDistance(0)<br />
arrNumberOfSeedsWithinDistance(0) = 1<br />
arrSeeds = Rhino.ObjectsByLayer(&#8220;ExpiredAttractors&#8221;)</p>
<p>&#8216;loop through each seed<br />
For    i=0 To Ubound(arrSeeds)<br />
&#8216;get the x,y,z of the seeds<br />
arrPointxyzSeed = Rhino.PointCoordinates(arrSeeds(i))</p>
<p>&#8216;loop through the rest of the seeds<br />
For j=0 To Ubound(arrSeeds)</p>
<p>&#8216;get the x,y,z of the seeds<br />
arrPointxyzOtherSeed = Rhino.PointCoordinates(arrSeeds(j))</p>
<p>&#8216;measure distance between seed and seed<br />
dblDistance     = Rhino.Distance(arrPointxyzAttractor,arrPointxyzOtherSeed )<br />
If dblDistance &lt; dblDistanceThreshold Then</p>
<p>ReDim Preserve arrNumberOfSeedsWithinDistance(Ubound(arrNumberOfSeedsWithinDistance)+1) &#8216;store the name of the new seed (previously an emmiter) in an array<br />
arrNumberOfSeedsWithinDistance(Ubound(arrNumberOfSeedsWithinDistance)) = arrSeeds(j)</p>
<p>End If</p>
<p>Next<br />
Next</p>
<p>dblDistanceThreshold = arrSeeds(Ubound)</p>
<p>GetNumberOfSeedsWithinDist = dblDistanceThreshold</p>
<p>End Function</p>
<p>Function GetThreshold(strObject,arrSeedPt,dblScaleFactor)</p>
<p>GetThreshold = Null</p>
<p>Dim dblThresholdFactor, dblHeightofLine, arrIntersectingPoint, strTempIntersectingLine, arrIntersectingBrepsReturn, arrBrepClosestPointRtn</p>
<p>dblHeightofLine = 100</p>
<p>strTempIntersectingLine      = Rhino.AddLine(arrSeedPt,array(arrSeedPt(0),arrSeedPt(1),arrSeedPt(2)+dblHeightofLine))<br />
arrIntersectingBrepsReturn  = Rhino.IntersectBreps(strTempIntersectingLine,strObject)</p>
<p>Call Rhino.DeleteObject(strTempIntersectingLine)</p>
<p>&#8216;if there is no intersection, then use closest point on surface instead<br />
If isNull(arrIntersectingBrepsReturn) Then<br />
arrBrepClosestPointRtn     =    Rhino.BrepClosestPoint(strObject,arrSeedPt)<br />
arrIntersectingPoint     =    arrBrepClosestPointRtn(0)<br />
Else<br />
arrIntersectingPoint     = Rhino.PointCoordinates(arrIntersectingBrepsReturn(2))<br />
End If</p>
<p>dblThresholdFactor = (dblScaleFactor)*arrIntersectingPoint(2) &#8216;use the Z value of the point on the heighfield surface</p>
<p>GetThreshold = dblThresholdFactor</p>
<p>End Function</p>
<p>Sub SortPoints()<br />
Dim intConnections</p>
<p>intConnections = 4</p>
<p>Dim arrSeeds   : arrSeeds      = Rhino.ObjectsByLayer(&#8220;Attractors&#8221;)<br />
If IsNull(arrSeeds) Then Exit Sub<br />
Dim arrIDLines      : arrIDLines           = Rhino.ObjectsByLayer(&#8220;Lines&#8221;)<br />
&#8216;Dim arrLines : arrLines = Rhino.PointCoordinates(arrIDLines)<br />
If IsNull(arrIDLines) Then Exit Sub<br />
Dim i,j</p>
<p>For j = 0 To Ubound (arrIDLines)<br />
Dim arrLineStPt         : arrLineStPt         = Rhino.CurveStartPoint (arrIDLines(j))<br />
Dim arrLineEndPt        : arrLineEndPt        = Rhino.CurveEndPoint (arrIDLines(j))<br />
Dim intcounterConections : intcounterConections = 0</p>
<p>For i = 0 To Ubound (arrSeeds)<br />
If intcounterConections &gt; intConnections Then<br />
Call Rhino.ObjectLayer (arrSeeds(i) , &#8220;ExpiredAttractors&#8221;)<br />
Exit For<br />
End If<br />
Dim arrPointxyzAttraction : arrPointxyzAttraction = Rhino.PointCoordinates(arrSeeds(i))<br />
If arrPointxyzAttraction(0) = arrLineStPt(0) Or arrPointxyzAttraction(0) = arrLineEndPt(0) Then<br />
If arrPointxyzAttraction(1) = arrLineStPt(1) Or arrPointxyzAttraction(1) = arrLineEndPt(1) Then<br />
intcounterConections = intcounterConections + 1<br />
End If<br />
End If<br />
Next</p>
<p>Next</p>
<p>End Sub</p>
<p>Function SortPointsAfterDave(arrSeeds)<br />
Dim intConnections :    intConnections = 4<br />
Dim arrSeedsClean()<br />
ReDim arrSeedsClean(-1)<br />
&#8216;Dim arrSeeds   : arrSeeds      = Rhino.ObjectsByLayer(&#8220;Attractors&#8221;)<br />
If IsNull(arrSeeds) Then Exit Function<br />
Dim arrIDLines      : arrIDLines           = Rhino.ObjectsByLayer(&#8220;Lines&#8221;)<br />
&#8216;Dim arrLines : arrLines = Rhino.PointCoordinates(arrIDLines)<br />
If IsNull(arrIDLines) Then Exit Function<br />
Dim i,j<br />
For i = 0 To Ubound (arrSeeds)<br />
Dim intcounterConections : intcounterConections = 0<br />
Dim arrPointxyzAttraction : arrPointxyzAttraction = Rhino.PointCoordinates(arrSeeds(i))<br />
For j = 0 To Ubound (arrIDLines)<br />
Dim arrLineStPt         : arrLineStPt         = Rhino.CurveStartPoint (arrIDLines(j))<br />
Dim arrLineEndPt        : arrLineEndPt        = Rhino.CurveEndPoint (arrIDLines(j))<br />
If     Rhino.PointCompare (arrPointxyzAttraction, arrLineStPt) Then<br />
intcounterConections = intcounterConections + 1<br />
End If<br />
If     Rhino.PointCompare (arrPointxyzAttraction, arrLineEndPt) Then<br />
intcounterConections = intcounterConections + 1<br />
End If<br />
Next<br />
&#8216;prompt intcounterConections<br />
If intcounterConections &lt; intConnections Then<br />
&#8216;Call Rhino.ObjectLayer (arrSeeds(i) , &#8220;ExpiredAttractors&#8221;)</p>
<p>Dim strTestPt<br />
Dim TestCounter : TestCounter = 0<br />
For Each strTestPt In arrSeedsClean<br />
Dim arrTestPt : arrTestPt =  Rhino.PointCoordinates(strTestPt)<br />
Dim blnTest : blnTest = Rhino.PointCompare (arrTestPt, arrPointxyzAttraction)<br />
If blnTest Then<br />
testCounter = TestCounter+1<br />
End If<br />
Next            &#8216;<br />
If TestCounter=0 Then<br />
ReDim Preserve arrSeedsClean(Ubound(arrSeedsClean)+1) &#8216;store the name of the new seed (previously an emmiter) in an array<br />
arrSeedsClean(Ubound(arrSeedsClean)) = arrSeeds(i)<br />
End If<br />
Else<br />
&#8216;prompt &#8220;why am i here?&#8221;<br />
&#8216;            Dim strDot : strDot = rhino.AddTextDot (&#8220;expired&#8221;, arrPointxyzAttraction)<br />
&#8216;            Call Rhino.ObjectLayer (arrSeeds(i) , &#8220;ExpiredAttractors&#8221;)<br />
&#8216;            Call Rhino.ObjectLayer (strDot , &#8220;ExpiredAttractors&#8221;)<br />
End If<br />
Next<br />
SortPointsAfterDave = arrSeedsClean<br />
End Function</p>
<p>Function GetMinLightPt (strObject)</p>
<p>GetMinLightPt = Null</p>
<p>Dim i, arrSurfacePoints, dblLowestZ, arrLowestPt</p>
<p>arrSurfacePoints = Rhino.SurfacePoints(strObject)</p>
<p>dblLowestZ = 9999999999999999</p>
<p>For i = 0 To Ubound(arrSurfacePoints)</p>
<p>If arrSurfacePoints(i)(2) &lt; dblLowestZ Then</p>
<p>dblLowestZ = arrSurfacePoints(i)(2)<br />
arrLowestPt = arrSurfacePoints(i)</p>
<p>End If</p>
<p>Next</p>
<p>GetMinLightPt = arrLowestPt</p>
<p>End Function</p>
<p>Function ConstrainToBBox(arrNewPt, arrBBox)<br />
ConstrainToBBox = Null<br />
&#8216;    Dim arrNewAttractors : arrNewAttractors = arrNewPt<br />
Dim arrPoint00              : arrPoint00 = arrBBox(0)<br />
Dim arrPoint01              : arrPoint01 = arrBBox(1)<br />
Dim arrPoint03              : arrPoint03 = arrBBox(3)<br />
Dim arrPoint04              : arrPoint04 = arrBBox(4)<br />
Dim arrXbound               : arrXbound  = arrPoint01(0) &#8211; arrPoint00(0)<br />
Dim arrYbound               : arrYbound  = arrPoint03(1) &#8211; arrPoint00(1)<br />
Dim arrZbound               : arrZbound  = arrPoint04(2) &#8211; arrPoint00(2)</p>
<p>If arrNewPt(0)&gt;arrPoint01(0) Then<br />
arrNewPt(0) = arrNewPt(0) &#8211; arrXbound<br />
End If<br />
If arrNewPt(0)&lt;arrPoint00(0) Then<br />
arrNewPt(0) = arrNewPt(0) + arrXbound<br />
End If<br />
If arrNewPt(1)&gt;arrPoint03(1) Then<br />
arrNewPt(1) = arrNewPt(1)- arrYbound<br />
End If<br />
If arrNewPt(1)&lt;arrPoint00(1) Then<br />
arrNewPt(1) = arrNewPt(1) + arrYbound<br />
End If<br />
If arrNewPt(2)&gt;arrPoint04(2) Then<br />
arrNewPt(2) = arrNewPt(2)- arrZbound<br />
End If<br />
If arrNewPt(2)&lt;arrPoint00(2) Then<br />
arrNewPt(2) = arrNewPt(2) + arrZbound<br />
End If</p>
<p>ConstraintoBBox = arrNewPt<br />
End Function</p>
<p>Function AverageDistLoft</p>
<p>&#8216;Call an array of all lines and get start and end points<br />
Dim arrObjects, arrStartPoint, dblDistance, dblScaleFactor<br />
Dim arrEndPoint, arrMidPoint, SumOfAllDistances<br />
Dim dblAverageDistanceStartPt, dblAverageDistanceEndPt<br />
Dim i, j</p>
<p>dblScaleFactor = 100</p>
<p>arrObjects = Rhino.ObjectsByLayer(&#8220;Lines&#8221;)<br />
&#8216;get start, mid and end points</p>
<p>For i = 0 To Ubound(arrObjects)</p>
<p>If Rhino.IsCurve(arrObjects(i)) Then</p>
<p>arrStartPoint = Rhino.CurveStartPoint(arrObjects(i))<br />
arrEndPoint = Rhino.CurveEndPoint(arrObjects(i))</p>
<p>&#8216;reset the total for this line<br />
SumOfAllDistances = 0</p>
<p>&#8216;for the start point<br />
For j = 0 To Ubound(arrObjects)</p>
<p>arrMidPoint = Rhino.CurveMidPoint(arrObjects(j))</p>
<p>dblDistance = Rhino.Distance(arrStartPoint,arrMidPoint)</p>
<p>SumOfAllDistances    = SumOfAllDistances + dblDistance</p>
<p>Next</p>
<p>dblAverageDistanceStartPt = SumOfAllDistances / (Ubound(arrObjects) + 1)</p>
<p>&#8216;for the end point<br />
SumOfAllDistances = 0</p>
<p>For j = 0 To Ubound(arrObjects)</p>
<p>arrMidPoint = Rhino.CurveMidPoint(arrObjects(j))</p>
<p>dblDistance = Rhino.Distance(arrEndPoint,arrMidPoint)</p>
<p>SumOfAllDistances    = SumOfAllDistances + dblDistance</p>
<p>Next</p>
<p>dblAverageDistanceEndPt = SumOfAllDistances / (Ubound(arrObjects) + 1)</p>
<p>End If</p>
<p>&#8216;Dim strNewLine : strNewLine = Rhino.AddLine(array(arrStartPoint(0),arrStartPoint(1),dblAverageDistanceStartPt/dblScaleFactor), array(arrEndPoint(0),arrEndPoint(1),dblAverageDistanceEndPt/dblScaleFactor))<br />
Dim strNewLine : strNewLine = Rhino.AddLine(array(arrStartPoint(0),arrStartPoint(1),dblScaleFactor/dblAverageDistanceStartPt), array(arrEndPoint(0),arrEndPoint(1),dblScaleFactor/dblAverageDistanceEndPt))</p>
<p>&#8216;add loft surface between 2 sets of lines</p>
<p>&#8216;Rhino.AddLoftSrf array(arrObjects(i),strNewLine)</p>
<p>Next<br />
End Function</p>
<p><strong>The second script lofts surfaces based on the density of light nodes. The denser the thicker and further the members are from the ceiling. The script also prepares the file for laser cutting by unrolling the surfaces, labeling, and giving the lengths of the light nodes.</strong></p>
<p>Option Explicit<br />
&#8216;Script written by Michael McCune<br />
&#8216;Script version Tuesday, August 12, 2008 1:07:43 PM<br />
&#8216;Lofts line based on density of points<br />
&#8216;Unrolls for laser cutting and labeling</p>
<p>Call Main()<br />
Sub Main()<br />
Dim intSpread : intSpread = Rhino.GetReal(&#8220;Space between unrolled surfaces&#8221;,1, 1,100)</p>
<p>Call LoftSurfacesBasedOnDensity (intSpread)<br />
End Sub</p>
<p>Function LoftSurfacesBasedOnDensity (intSpread)</p>
<p>Dim arrIDLines      : arrIDLines           = Rhino.ObjectsByLayer(&#8220;Lines2&#8243;)<br />
Dim dblDistanceThreshold : dblDistanceThreshold = 2<br />
Dim intcounterConectionsST, intcounterConectionsEnd, intcounterLines<br />
Dim dblDistanceStPt, dblDistanceEndPt<br />
&#8216;Dim arrLines : arrLines = Rhino.PointCoordinates(arrIDLines)<br />
If IsNull(arrIDLines) Then Exit Function</p>
<p>Dim i,j,k<br />
Dim x : x = 0</p>
<p>For i = 0 To Ubound (arrIDLines)<br />
Dim arrLineStPt         : arrLineStPt         = Rhino.CurveStartPoint (arrIDLines(i))<br />
Dim arrLineEndPt        : arrLineEndPt        = Rhino.CurveEndPoint (arrIDLines(i))</p>
<p>intcounterConectionsST = 0<br />
intcounterConectionsEnd = 0<br />
intcounterLines = 0</p>
<p>For j = 0 To Ubound (arrIDLines)</p>
<p>Dim arrLineMidPtOther         : arrLineMidPtOther         = Rhino.CurveMidPoint (arrIDLines(j))</p>
<p>dblDistanceStPt     = Rhino.Distance(arrLineStPt,arrLineMidPtOther )<br />
dblDistanceEndPt    = Rhino.Distance(arrLineEndPt,arrLineMidPtOther )</p>
<p>If dblDistanceStPt &lt; dblDistanceThreshold   Then<br />
If dblDistanceStPt &gt; 0 Then<br />
intcounterConectionsST = intcounterConectionsST + 1<br />
End If<br />
End If</p>
<p>If dblDistanceEndPt &lt; dblDistanceThreshold  Then<br />
If dblDistanceEndPt &gt; 0 Then<br />
intcounterConectionsEnd = intcounterConectionsEnd + 1<br />
End If<br />
End If<br />
Next</p>
<p>Call Rhino.Print(intcounterConectionsST)<br />
Call Rhino.Print(intcounterConectionsEnd)</p>
<p>Dim arrNewLineStPt  : arrNewLineStPt   = array(arrLineStPt(0), arrLineStPt(1), arrLineStPt(2) + (intcounterConectionsST/5))<br />
Dim arrNewLineEndPt : arrNewLineEndPt  = array(arrLineEndPt(0), arrLineEndPt(1), arrLineEndPt(2) + (intcounterConectionsEnd/5))</p>
<p>Dim arrNewLoftLineStPt  : arrNewLoftLineStPt   = array(arrLineStPt(0), arrLineStPt(1), (arrLineStPt(2) + (intcounterConectionsST/5))+ (((intcounterConectionsST/20)*.8)+.1))<br />
Dim arrNewLoftLineEndPt : arrNewLoftLineEndPt  = array(arrLineEndPt(0), arrLineEndPt(1), (arrLineEndPt(2) + (intcounterConectionsEnd/5))+ (((intcounterConectionsEnd/20)*.8)+.1))</p>
<p>Dim strNewLines : strNewLines = Rhino.AddLine (arrNewLineStPt, arrNewLineEndPt)</p>
<p>Dim strNewLoftLines : strNewLoftLines = Rhino.AddLine (arrNewLoftLineStPt, arrNewLoftLineEndPt)</p>
<p>Dim SurfaceLoft : SurfaceLoft = Rhino.AddLoftSrf (array(strNewLines,strNewLoftLines))</p>
<p>&#8216;Call rhino.DeleteObjects(arrIDLines(i))<br />
&#8216;Call rhino.DeleteObjects (arrNewLoftLines(j))</p>
<p>Dim dblLineLength : dblLineLength = Rhino.CurveLength(strNewLines)<br />
Dim dblExtend  : dblExtend  = .2<br />
Dim dblRadious : dblRadious = .1</p>
<p>arrNewLineStPt       = Rhino.CurveStartPoint(strNewLines)<br />
arrNewLineEndPt      = Rhino.CurveEndPoint(strNewLines)<br />
arrNewLoftLineStPt   = Rhino.CurveStartPoint(strNewLoftLines)<br />
arrNewLoftLineEndPt  = Rhino.CurveEndPoint(strNewLoftLines)</p>
<p>&#8216;redraw to xyplane<br />
Dim arrNewLinesxy           : arrNewLinesxy              = Rhino.AddLine (array(x,arrNewLineStPt(2),0), array(x + dblLineLength,arrNewLineEndPt(2),0))</p>
<p>Dim arrNewLoftLinesxy       : arrNewLoftLinesxy          = Rhino.AddLine (array(x,arrNewLoftLineStPt(2),0), array(x + dblLineLength,arrNewLoftLineEndPt(2),0))</p>
<p>&#8216;Dim arrNewLinesxyStSt       : arrNewLinesxyStSt          = Rhino.AddLine (array(x,arrNewLineStPt(2),0),array(x,arrNewLoftLineStPt(2),0))</p>
<p>Dim arrNewLinesxyStSt       : arrNewLinesxyStSt          = Rhino.AddLine (array(x+dblRadious,arrNewLineStPt(2)-dblExtend,0),array(x+dblRadious,arrNewLoftLineStPt(2)+dblExtend,0))</p>
<p>&#8216;Dim arrNewLoftLinesxyEndEnd : arrNewLoftLinesxyEndEnd    = Rhino.AddLine (array(x + dblLineLength,arrNewLineEndPt(2),0),array(x + dblLineLength,arrNewLoftLineEndPt(2),0))</p>
<p>Dim arrNewLoftLinesxyEndEnd : arrNewLoftLinesxyEndEnd    = Rhino.AddLine (array(x-dblRadious + dblLineLength,arrNewLineEndPt(2)-dblExtend,0),array(x-dblRadious + dblLineLength,arrNewLoftLineEndPt(2)+dblExtend,0))</p>
<p>x = x + dblLineLength + intSpread</p>
<p>Dim arrMidPt         : arrMidPt         = Rhino.CurveMidPoint (arrIDLines(i))<br />
Dim arrMidPt2         : arrMidPt2         = Rhino.CurveMidPoint (arrNewLinesxy)</p>
<p>&#8216;label peices and corresponding point in plan<br />
Dim strText : strText = Rhino.AddText (CStr(i), array(arrMidPt(0),arrMidPt(1)+ .01,0),.1)<br />
Dim strText2 : strText2 = Rhino.AddText (CStr(i), array(arrMidPt2(0),arrMidPt2(1)+ .02    ,0),.03    )</p>
<p>Next</p>
<p>End Function</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mccunication.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mccunication.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mccunication.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mccunication.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mccunication.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mccunication.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mccunication.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mccunication.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mccunication.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mccunication.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mccunication.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mccunication.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mccunication.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mccunication.wordpress.com/4/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mccunication.wordpress.com&amp;blog=5490620&amp;post=4&amp;subd=mccunication&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mccunication.wordpress.com/2008/11/13/light-basd-diffusion-limited-aggregation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7b230669398fea9562fc35adca0f095a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">michaelgmccune</media:title>
		</media:content>

		<media:content url="http://mccunication.files.wordpress.com/2008/11/lines-dla-layout1-1.jpg?w=127" medium="image">
			<media:title type="html">C:Documents and SettingsuserDesktoplines dla Layout1 (1)</media:title>
		</media:content>

		<media:content url="http://mccunication.files.wordpress.com/2008/11/plan-diagrams.jpg?w=120" medium="image">
			<media:title type="html">plan diagrams.ai</media:title>
		</media:content>

		<media:content url="http://mccunication.files.wordpress.com/2008/11/p1020300.jpg?w=150" medium="image">
			<media:title type="html">p1020300</media:title>
		</media:content>

		<media:content url="http://mccunication.files.wordpress.com/2008/11/3d-view-1-exp10-5.jpg?w=150" medium="image">
			<media:title type="html">3d-view-1-exp10-5</media:title>
		</media:content>

		<media:content url="http://mccunication.files.wordpress.com/2008/11/pict0086.jpg?w=150" medium="image">
			<media:title type="html">pict0086</media:title>
		</media:content>

		<media:content url="http://mccunication.files.wordpress.com/2008/11/surfaces.jpg?w=150" medium="image">
			<media:title type="html">surfaces</media:title>
		</media:content>
	</item>
	</channel>
</rss>
