<?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/"
	>

<channel>
	<title>Code &#038; form &#187; Rhino</title>
	<atom:link href="http://workshop.evolutionzone.com/category/rhino/feed/" rel="self" type="application/rss+xml" />
	<link>http://workshop.evolutionzone.com</link>
	<description>Computational aesthetics and programming for artists and designers.</description>
	<lastBuildDate>Sun, 29 Jan 2012 07:00:06 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
		<item>
		<title>Interactive Parametrics Workshop w/ Studio Mode and MakerBot</title>
		<link>http://workshop.evolutionzone.com/2011/01/14/interactive-parametrics-workshop-w-studio-mode-and-makerbot/</link>
		<comments>http://workshop.evolutionzone.com/2011/01/14/interactive-parametrics-workshop-w-studio-mode-and-makerbot/#comments</comments>
		<pubDate>Fri, 14 Jan 2011 07:53:12 +0000</pubDate>
		<dc:creator>marius watz</dc:creator>
				<category><![CDATA[Processing / Java]]></category>
		<category><![CDATA[Rhino]]></category>
		<category><![CDATA[Workshops]]></category>
		<category><![CDATA[3D printing]]></category>
		<category><![CDATA[architecture]]></category>
		<category><![CDATA[digital-fabrication]]></category>
		<category><![CDATA[makerbot]]></category>
		<category><![CDATA[parametric-design]]></category>
		<category><![CDATA[processing.org]]></category>
		<category><![CDATA[studio mode]]></category>

		<guid isPermaLink="false">http://workshop.evolutionzone.com/?p=450</guid>
		<description><![CDATA[Interactive Parametrics Workshop with Studio Mode and MakerBot, NYC Feb 19-20/21 I&#8217;m excited to announce that I will be doing a workshop in interactive parametric modelling with Studio Mode and MakerBot in New York, Feb 19-20 (with an optional extra day on Feb 21). We will be using Processing along with CAD tools like Rhino3D [...]]]></description>
			<content:encoded><![CDATA[<div class="flickrImg"><a href="http://modelab.nu/?p=4152"><img src="http://modelab.nu/wp-content/uploads/2011/01/20110219_coLab_intParam01_950x250-590x155.jpg" width=500 alt="Interactive Parametrics Workshop" /></a></p>
<p><a href="http://modelab.nu/?p=4152">Interactive Parametrics Workshop</a> with Studio Mode and MakerBot, NYC Feb 19-20/21</div>
<p>I&#8217;m excited to announce that I will be doing a workshop in interactive parametric modelling with <a href="http://modelab.nu">Studio Mode</a> and <a href="http://makerbot.com/">MakerBot </a>in New York, Feb 19-20 (with an optional extra day on Feb 21). </p>
<p>We will be using Processing along with CAD tools like Rhino3D to produce parametric models to output 3D models for digital fabrication. MakerBot Industries have graciously offered to lend us some MakerBot Thing-o-matics to produce models from the workshop. Participants are also free to use on-site KNK High-Force cutters.</p>
<p>The full announcement follows below, please visit <a href="http://modelab.nu/?p=4152">Studio Mode&#8217;s announcement</a> for enrollment and more details. Also check out the <a href="http://modelab.nu/?tag=primer+processing">series of Processing primers</a> I&#8217;ve been writing in preparation for the workshop.</p>
<p><span id="more-450"></span>
<div class="mediumtitle">Interactive Parametrics Workshop </div>
<p>Studio Mode is pleased to announce the fourth installment of the coLab workshop series: Interactive Parametrics. Interactive Parametrics is a two-day Processing workshop (with an optional third day) focusing on dynamic sketches and prototyping. The workshop will be held in New York City during the weekend of February 19.</p>
<p><strong>Description: </strong>The paradigm of scripting within ubiquitous modeling platforms such as Rhino or Maya allows users to generate complex form by accessing an underlying geometry engine and performing iterative functions. This paradigm is typically based on run-once execution, making it unsuitable for designing interactive or time-based behaviors.  By implementing workflows that utilize Processing to create real-time software sketches, we can design dynamic systems that can act as standalone tools for parametric design, input mechanisms to feed other platforms, or processors of existing or sensor-based data sets.</p>
<p>This fast-paced workshop will focus on interactive parametric design strategies. Using Processing as our base platform, we will design real-time dynamic behavior systems, implement interfacing techniques for fluid use, and iteratively prototype the solutions in physical format through rapid prototyping and digital die-cutting. Through a series of focused exercises and design tasks, each attendee will build a stand-alone parametric design sketch and work through the process of prototyping, realizing a set of solutions through computer numerically controlled equipment (<a title="makerbot" href="http://www.makerbot.com/" target="_blank">Makerbot </a>&#8220;Thing-O-Matic&#8221; and KNK High-Force Cutters). An optional third workshop day is offered to those participants desiring further time to develop individual projects or lines of research.  As part of a larger online infrastructure, <a href="http://modelab.nu/" target="_blank">modeLab</a>, this workshop provides participants with continued support and knowledge to draw upon for future learning.</p>
<p>Attendance will be limited to provide each participant maximum dedicated time with instructors. Participants are encouraged to be familiar with the basic concepts of parametric design and interface of Processing.</p>
<p><em>Interactive Parametrics</em> was conceived through a collaboration between <a title="mode" href="http://studiomode.nu/" target="_blank">Studio Mode</a>/<a href="http://modelab.nu/" target="_blank">modeLab</a> and <a href="http://mariuswatz.com/">Marius Watz</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://workshop.evolutionzone.com/2011/01/14/interactive-parametrics-workshop-w-studio-mode-and-makerbot/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Processing intro on modeLab</title>
		<link>http://workshop.evolutionzone.com/2010/10/10/processing-intro-on-modelab/</link>
		<comments>http://workshop.evolutionzone.com/2010/10/10/processing-intro-on-modelab/#comments</comments>
		<pubDate>Sun, 10 Oct 2010 03:23:18 +0000</pubDate>
		<dc:creator>marius watz</dc:creator>
				<category><![CDATA[Processing / Java]]></category>
		<category><![CDATA[Rhino]]></category>
		<category><![CDATA[Workshops]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[digital-fabrication]]></category>
		<category><![CDATA[new york]]></category>
		<category><![CDATA[processing.org]]></category>
		<category><![CDATA[studio mode]]></category>

		<guid isPermaLink="false">http://workshop.evolutionzone.com/?p=433</guid>
		<description><![CDATA[Processing introduction post on Studio Mode&#8217;s modeLab blog. Exciting news: Studio Mode (aka Ronnie Parsons and Gil Akos) and I are working on plans for a parametric design workshop using Processing and Rhino/Grasshopper in New York later this year. Studio Mode have already conducted a series of successful workshops dealing with parametric design and digital [...]]]></description>
			<content:encoded><![CDATA[<div class="flickrImg"><img src="http://modelab.nu/wp-content/uploads/2010/10/modelab-ProcessingBasics.jpg" alt="modeLab: Processing Basics" /></p>
<p><a href="http://modelab.nu/?p=3933">Processing introduction</a> post on Studio Mode&#8217;s modeLab blog.</div>
<p>Exciting news: <a href="http://studiomode.nu/">Studio Mode</a> (aka Ronnie Parsons and Gil Akos) and I are working on plans for a parametric design workshop using Processing and Rhino/Grasshopper in New York later this year. Studio Mode have already conducted a series of successful workshops dealing with parametric design and digital fabrication. See <a href="http://studiomode.nu/mode/1597">Material Intelligence</a> and <a href="http://studiomode.nu/mode/1215">coLab Casting</a> for reference. </p>
<p>Our proposed collaboration will join knowledge of materials and manufacturing processes with the flexibility and real-time nature of Processing applications. Processing may lack the geometry functions of Rhino, but its capacity for interactive dynamic models makes it a powerful tool for parametric modelling.</p>
<p>Exact dates and format of the workshop are to be determined, but we&#8217;re hoping for early December. Watch this space.</p>
<p><strong>In anticipation of the workshop </strong> I will be posting a series of Processing tutorials on the modeLab.nu blog. <a href="http://modelab.nu/?p=3933">The first has now been posted</a>, featuring four examples that introduce basic syntax, variables, mouse movement, and for loops. Upcoming tutorials will explore more complex topics related to parametric design.</p>
]]></content:encoded>
			<wfw:commentRss>http://workshop.evolutionzone.com/2010/10/10/processing-intro-on-modelab/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Arc Drawings</title>
		<link>http://workshop.evolutionzone.com/2010/09/26/arc-drawings/</link>
		<comments>http://workshop.evolutionzone.com/2010/09/26/arc-drawings/#comments</comments>
		<pubDate>Sun, 26 Sep 2010 15:38:22 +0000</pubDate>
		<dc:creator>marius watz</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[Rhino]]></category>
		<category><![CDATA[Watz work]]></category>
		<category><![CDATA[art]]></category>
		<category><![CDATA[digital-fabrication]]></category>
		<category><![CDATA[drawing]]></category>
		<category><![CDATA[generative]]></category>
		<category><![CDATA[plotter]]></category>
		<category><![CDATA[sketch]]></category>
		<category><![CDATA[studio mode]]></category>

		<guid isPermaLink="false">http://workshop.evolutionzone.com/?p=415</guid>
		<description><![CDATA[Arc Drawing sketches in progress I&#8217;m working on a new series of three drawings titled &#8220;Arc Drawings&#8221;, made using a plotter technique that I&#8217;ve never tried before. The machine is not technically a plotter, it&#8217;s actually Studio Mode&#8217;s CNC cutting machine which they typically use for completely different purposes. But it can be fitted with [...]]]></description>
			<content:encoded><![CDATA[<div class="flickrImg"><object width="500" height="333"><param name="flashvars" value="offsite=true&#038;lang=en-us&#038;page_show_url=%2Fphotos%2Fwatz%2Ftags%2Farcdrawings%2Fshow%2F&#038;page_show_back_url=%2Fphotos%2Fwatz%2Ftags%2Farcdrawings%2F&#038;user_id=98203235@N00&#038;tags=arcdrawings&#038;jump_to=&#038;start_index="></param><param name="movie" value="http://www.flickr.com/apps/slideshow/show.swf?v=71649"></param><param name="allowFullScreen" value="true"></param><embed type="application/x-shockwave-flash" src="http://www.flickr.com/apps/slideshow/show.swf?v=71649" allowFullScreen="true" flashvars="offsite=true&#038;lang=en-us&#038;page_show_url=%2Fphotos%2Fwatz%2Ftags%2Farcdrawings%2Fshow%2F&#038;page_show_back_url=%2Fphotos%2Fwatz%2Ftags%2Farcdrawings%2F&#038;user_id=98203235@N00&#038;tags=arcdrawings&#038;jump_to=4948017667&#038;start_index=" width="500" height="333"></embed></object></p>
<p><a href="http://www.flickr.com/photos/watz/tags/arcdrawings/">Arc Drawing sketches</a> in progress</div>
<p>I&#8217;m working on a new series of three drawings titled &#8220;Arc Drawings&#8221;, made using a plotter technique that I&#8217;ve never tried before. The machine is not technically a plotter, it&#8217;s actually <a href="http://studiomode.nu/">Studio Mode&#8217;s</a> CNC cutting machine which they typically use for <a href="http://studiomode.nu/mode/1589">completely different purposes</a>. But it can be fitted with a pen instead of a knife, and so doing some plotter drawings seemed like an opportunity too good to pass up.</p>
<p>I&#8217;m excited by the chance to continue exploring machine-assisted line drawing, which for me started with the <a href="http://www.flickr.com/photos/watz/tags/griddistortion/">Grid Distortion</a> series. Just as the laser comes with its own material effects, the CNC cutter add some nice qualities to the drawn lines. In order to produce smooth motion the machine accelerates and decelerates at the start and end of every path, which causes a slight ink pooling at the extremes of the line. The drawings will be made on styrene sheets rather than paper, so the ink does not diffuse into the drawing surface.</p>
<p><strong>My thanks to <a href="http://studiomode.nu/">Studio Mode</a></strong> for letting me play with their machine and helping with fabrication. We&#8217;re planning to team up and do a workshop together later this year, as part of the great series of <a href="http://www.modelab.nu/">ModeLab workshops</a> they&#8217;ve been doing dealing with issues in digital fabrication. I look forward to working with them and maybe hook Processing up to Rhino and Grasshopper for some parametric mayhem.</p>
]]></content:encoded>
			<wfw:commentRss>http://workshop.evolutionzone.com/2010/09/26/arc-drawings/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rhino: randCube.rvb</title>
		<link>http://workshop.evolutionzone.com/2008/02/14/rhino-randcubervb/</link>
		<comments>http://workshop.evolutionzone.com/2008/02/14/rhino-randcubervb/#comments</comments>
		<pubDate>Thu, 14 Feb 2008 13:38:19 +0000</pubDate>
		<dc:creator>marius watz</dc:creator>
				<category><![CDATA[AHO]]></category>
		<category><![CDATA[Rhino]]></category>
		<category><![CDATA[landscape]]></category>
		<category><![CDATA[rhinoscript]]></category>
		<category><![CDATA[rvb]]></category>
		<category><![CDATA[Workshops]]></category>

		<guid isPermaLink="false">http://workshop.evolutionzone.com/2008/02/14/rhino-randcubervb/</guid>
		<description><![CDATA[This landscape of randomized cube-like structures proved popular with the students in the AHO workshop: Code: randCube.rvb Option Explicit 'Script written by Marius Watz 'Script version 14. februar 2008 10:56:41 Call Clear Call Main() Sub Main() Call rhino.enableRedraw(False) Dim i,j For i=0 To 10 For j=0 To 10 Call rndCube(i*15,j*15) Next Next Call rhino.enableRedraw(True) End [...]]]></description>
			<content:encoded><![CDATA[<p>This landscape of randomized cube-like structures proved popular with the students in the AHO workshop:</p>
<div class="mediumtitle">Code: randCube.rvb</div>
<p><span id="more-181"></span></p>
<pre name="code" class="vb">
Option Explicit
'Script written by Marius Watz
'Script version 14. februar 2008 10:56:41

Call Clear
Call Main()

Sub Main()
	Call rhino.enableRedraw(False)

	Dim i,j
	For i=0 To 10
		For j=0 To 10
			Call rndCube(i*15,j*15)
		Next
	Next

	Call rhino.enableRedraw(True)
End Sub

Function rndVec(range)
	rndVec=Array(Rnd*range-range/2,Rnd*range-range/2,Rnd*range-range/2)
End Function

Function rndCube(xpos,ypos) 

	Dim pt(8)
	Dim c1,c2

	Dim rad
	rad=5
	pt(0)=Array(-rad,-rad,rad)
	pt(1)=Array(rad,-rad,rad)
	pt(2)=Array(rad,rad,rad)
	pt(3)=Array(-rad,rad,rad)

	pt(4)=Array(-rad,-rad,-rad)
	pt(5)=Array(rad,-rad,-rad)
	pt(6)=Array(rad,rad,-rad)
	pt(7)=Array(-rad,rad,-rad)	

	Dim i,rndv,rndH
	rndH=Rnd*rad*2
	For i=0 To 3
		rndv=rndVec(4)
		rndv(2)=rndv(2)+rndH
		pt(i)=Rhino.VectorAdd(pt(i),rndv)
	Next

	For i=0 To 7
		pt(i)=Rhino.VectorAdd(pt(i),Array(xpos,ypos,0))
	Next

	Dim ln(8)
	For i=0 To 3
		ln(i)=Rhino.AddLine(pt(i),pt((i+1) Mod 4))
		ln(i+4)=Rhino.AddLine(pt(i+4),pt(((i+1) Mod 4)+4))
	Next

	Dim srf(6)
	For i=0 To 3
		srf(i)=Rhino.AddEdgeSrf(Array(ln(i),ln(i+4)))
	Next

	ln(0)=Rhino.AddLine(pt(1),pt(0))
	srf(4)=Rhino.AddEdgeSrf(Array(ln(0),ln(2)))
	srf(5)=Rhino.AddEdgeSrf(Array(ln(6),ln(4)))

	For i=0 To UBound(ln)-1
		Rhino.DeleteObject ln(i)
	Next

End Function

Sub Clear
	Rhino.Command "SelAll "
	Rhino.Command "Delete "
End Sub</pre>
]]></content:encoded>
			<wfw:commentRss>http://workshop.evolutionzone.com/2008/02/14/rhino-randcubervb/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>RhinoScript at MIT IAP</title>
		<link>http://workshop.evolutionzone.com/2008/02/11/rhinoscript-at-mit-iap/</link>
		<comments>http://workshop.evolutionzone.com/2008/02/11/rhinoscript-at-mit-iap/#comments</comments>
		<pubDate>Mon, 11 Feb 2008 20:40:01 +0000</pubDate>
		<dc:creator>marius watz</dc:creator>
				<category><![CDATA[AHO]]></category>
		<category><![CDATA[Rhino]]></category>
		<category><![CDATA[Workshops]]></category>
		<category><![CDATA[architecture]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[computational-architecture]]></category>
		<category><![CDATA[generative]]></category>
		<category><![CDATA[geometry]]></category>
		<category><![CDATA[rhinoscript]]></category>

		<guid isPermaLink="false">http://workshop.evolutionzone.com/2008/02/12/rhinoscript-at-mit-iap/</guid>
		<description><![CDATA[MIT IAP RhinoScript workshop &#8211; Danzer Variations While looking for RhinoScript resources for the Digital Architecture workshop at AHO I found a recent posting of the final projects from a RhinoScript workshop at MIT IAP. It features some very nice-looking work, including the Danzer tile forms shown above. It also provides the source code for [...]]]></description>
			<content:encoded><![CDATA[<div class="flickrImg"><a href="http://rhinoscripting.blogspot.com/2008/02/final-presentations.html"><img src="http://farm3.static.flickr.com/2235/2257464782_f40d30c713.jpg" alt="Danzer tiling" /></a></p>
<p>MIT IAP RhinoScript workshop &#8211; <a href="http://rhinoscripting.blogspot.com/2008/02/final-presentations.html">Danzer Variations</a></div>
<p>While looking for RhinoScript resources for the Digital Architecture workshop at AHO I found a recent <a href="http://rhinoscripting.blogspot.com/2008/02/final-presentations.html">posting of the final projects</a> from a RhinoScript workshop at MIT IAP. It features some very nice-looking work, including the Danzer tile forms shown above. It also provides the source code for most of the experiments, well worth checking out.</p>
<p>The resource page for a previous MIT workshop is still up, it has more scripts and some useful links: <a href="http://www.kaschaandjohn.com/rhinoscripting/index.html" title="Computational Design Solutions Part 1">Computational Design Solutions Part 1</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://workshop.evolutionzone.com/2008/02/11/rhinoscript-at-mit-iap/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Digital Architecture at AHO</title>
		<link>http://workshop.evolutionzone.com/2008/02/11/digital-architecture-at-aho/</link>
		<comments>http://workshop.evolutionzone.com/2008/02/11/digital-architecture-at-aho/#comments</comments>
		<pubDate>Mon, 11 Feb 2008 01:50:01 +0000</pubDate>
		<dc:creator>marius watz</dc:creator>
				<category><![CDATA[AHO]]></category>
		<category><![CDATA[Processing / Java]]></category>
		<category><![CDATA[Rhino]]></category>
		<category><![CDATA[Workshops]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[computational-architecture]]></category>
		<category><![CDATA[processing.org]]></category>
		<category><![CDATA[rhinoscript]]></category>

		<guid isPermaLink="false">http://workshop.evolutionzone.com/2008/02/11/digital-architecture-at-aho/</guid>
		<description><![CDATA[I am teaching a 3-day workshop in Digital Architecture at the Oslo School of Architecture &#038; Design (AHO) this week, as part of a course by Søren Sørensen. The workshop will give an introduction to Processing, with a focus on synthesis of spatial form. If time permits we&#8217;ll also look briefly at Rhinoscript. Be sure [...]]]></description>
			<content:encoded><![CDATA[<p>I am teaching a 3-day workshop in Digital Architecture at the Oslo School of Architecture &#038; Design (AHO) this week, as part of a course by Søren Sørensen. The workshop will give an introduction to Processing, with a focus on synthesis of spatial form. If time permits we&#8217;ll also look briefly at Rhinoscript.</p>
<p>Be sure to look at the page I have prepared with <a href="http://workshop.evolutionzone.com/computational-architecture/">links related to computational architecture</a>. Code will be uploaded to:<br />
<a href="http://workshop.evolutionzone.com/workshops/080211_aho">http://workshop.evolutionzone.com/workshops/080211_aho</a>.</p>
<div class="mediumtitle">Workshop contents</div>
<ul>
<li>Basic Processing syntax</li>
<li>Simple animation</li>
<li>Control structures: If / else, loops, keyPressed(), mousePressed()</li>
<li>Transformations: translate(), scale(), rotate()</li>
<li>Complex drawing: beginShape(), endShape()</li>
<li>Data structures: Arrays, classes</li>
<li>Polygon mesh generation</li>
<li>Output: PDF, STL, DXF</li>
</ul>
<div class="mediumtitle">Possible advanced topics</div>
<ul>
<li><a href="http://en.wiki.mcneel.com/default.aspx/McNeel/RhinoScript.html">RhinoScript</a></li>
<li><a href="http://hipstersinc.com/p5sunflow/">p5Sunflow</a>, a radiosity rendering library for Processing</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://workshop.evolutionzone.com/2008/02/11/digital-architecture-at-aho/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My first Rhinoscript&#8230;</title>
		<link>http://workshop.evolutionzone.com/2008/02/05/my-first-rhinoscript/</link>
		<comments>http://workshop.evolutionzone.com/2008/02/05/my-first-rhinoscript/#comments</comments>
		<pubDate>Tue, 05 Feb 2008 10:42:21 +0000</pubDate>
		<dc:creator>marius watz</dc:creator>
				<category><![CDATA[AHO]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Processing / Java]]></category>
		<category><![CDATA[Rhino]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[3d]]></category>
		<category><![CDATA[cad]]></category>
		<category><![CDATA[geometry]]></category>
		<category><![CDATA[rhinoscript]]></category>
		<category><![CDATA[rvb]]></category>
		<category><![CDATA[scripting]]></category>

		<guid isPermaLink="false">http://workshop.evolutionzone.com/2008/02/05/my-first-rhinoscript/</guid>
		<description><![CDATA[Rhinoscript sketch, extruding a revolution surface along random curves. Good cheesy fun. I had a chance to see a bit more of the impressive tool Rhino 4 during the Generator.x 2.0 workshop, and so I thought I&#8217;d have a go at making a simple sketch in Rhinoscript. As it turns out, the fact that Rhinoscript [...]]]></description>
			<content:encoded><![CDATA[<div class="flickrImg"><img src='http://workshop.evolutionzone.com/wp-content/uploads/2008/02/080205_rhinoscript.jpg' alt='080205_rhinoscript.jpg' /></p>
<p>Rhinoscript sketch, extruding a revolution surface along random curves. Good cheesy fun.</p></div>
<p>I had a chance to see a bit more of the impressive tool <a href="http://www.rhino3d.com/">Rhino 4</a> during the <a href="http://generatorx.no/gx20workshop">Generator.x 2.0 workshop</a>, and so I thought I&#8217;d have a go at making a simple sketch in Rhinoscript. As it turns out, the fact that Rhinoscript is based on VBScript makes coding feel horrible at first. Seriously, who would want to use syntax like that? It might be easy for beginners to pick up, but it quickly gets painful once you&#8217;re dealing with complex API calls and 100+ lines of code.</p>
<p>Nevertheless, frustration soon gives way to amazement at the built-in Rhino library and its vast array of heavy-duty functions for creating and manipulating curves, meshes and NURBS surfaces. In comparison, mesh generation in Processing is enough to give anyone a headache, and I seriously doubt anyone would even attempt to implement NURBS. Even Boolean mesh operations is a staggering task, with no good Java libraries readily available.</p>
<p>While Rhinoscript is firmly a non-realtime tool, its power for pure geometry is amazing. I would definitely use Rhino as a creative tool for digital fabrication projects, where animation is not the goal. There are some excellent RhinoScript resources online, for starters look at <a href="http://en.wiki.mcneel.com/default.aspx/McNeel/RhinoScript101">RhinoScript 101</a> and <a href="http://reconstructivism.net/">David Rutten&#8217;s tutorial</a>. I would also definitely recommend using the <a href="http://en.wiki.mcneel.com/default.aspx/McNeel/MonkeyForRhino4.html">Monkey Script editor</a> instead of the built-in editor, it&#8217;s more powerful and has a very useful documentation feature.</p>
<p>The script below gives a basic idea of the Rhino syntax, and while it is a basic sketch suffering from 3D clichées, it shows the power and versatility of Rhinoscript. I just wish it wasn&#8217;t Visual Basic.</p>
<div class="mediumtitle">Code: RandRail.rvb</div>
<p><span id="more-174"></span></p>
<pre name="code" class="vb">'RandRail.rvb
'Marius Watz, http://workshop.evolutionzone.com

Option Explicit

Sub Main
	Dim doRender : doRender=1
	Dim num : num=100
	Dim pt, curve(100)

	Call rhino.enableRedraw(False)
	Rhino.Print "--------------------------"

	' delete any existing objects
	Dim oldScene:oldScene=Rhino.AllObjects()
	If isArray(oldScene) Then
		Rhino.DeleteObjects Rhino.AllObjects()
		Rhino.DeleteObjects Rhino.LightObjects()
	End If

	' Set up scene
	Dim light
	light=Rhino.AddPointLight (Array(0,-200,0))
	light=Rhino.AddPointLight (Array(-100,-100,0))

	Rhino.RenderColor 1, RGB(50,50,50)
	Rhino.RenderResolution Array(1200,900)
	Rhino.RenderAntialias 2

	' Create random curves
	Dim cp(3),mult, i
	For i=0 To num
		mult=random(0.75,1.25)
		cp(0)=Array(0,0,0)
		If Rnd>0.5 Then
			cp(1)=Array(0,random(30,50),0)
		Else
			cp(1)=Array(0,random(-30,20),0)
		End If
		If Rnd>0.5 Then
			cp(2)=Array(random(-50,50)*mult,random(30,50),random(-50,50)*mult)
		Else
			cp(2)=Array(random(-50,50)*mult,random(-30,20),random(-50,50)*mult)
		End If
		cp(3)=Array(random(-50,50)*mult,random(-50,50),random(-50,50)*mult)
		curve(i)=Rhino.AddCurve(cp)
		'		Rhino.AddSphere cp(2), dblRadius
	Next

	' Create random rounded profile
	Dim numRot : numRot=Int(random(7,18))
	Dim j, rndCurve(10),profPt(),deg,offs
	ReDim profPt(numRot)

	For j=0 To Ubound(rndCurve)
		For i=0 To numRot
			deg=(2*Rhino.Pi/numRot)*i
			offs=random(5,7)*0.2
			If i Mod 2=0 Then
				offs=random(7,12)*0.2
			End If

			profPt(i)=Array(Cos(deg)*offs, 0 ,Sin(deg)*offs)
		Next
		rndCurve(j)=Rhino.AddCurve(profPt)
	Next

	' Create random RailRefSrf and ExtrudeCurve surfaces
	Dim railAxis(1)
	railAxis(0)=Array(0,0,0)
	railAxis(1)=Array(0,1,0)

	Dim srf,profCurve
	For i=0 To num
		profCurve=rndCurve(Int(random(0,Ubound(rndCurve))))
		srf=Rhino.AddRailRevSrf(curve(i),profCurve,railAxis)
		applyRndMaterial(srf)
		'		srf=Rhino.ExtrudeCurve(profCurve,curve(i))
		'		applyRndMaterial(srf)
	Next

	If doRender=1 Then
		renderView()
	End If

	Call rhino.enableRedraw(True)

End Sub

' Set random materials
Function applyRndMaterial(obj)
	Dim prob,col,material

	material=Rhino.AddMaterialToObject (obj)

	' Coloring: Pink, Orange
	prob=random(0,100)
	If prob<30 Then
		Rhino.MaterialColor material, RGB(255, 0, Int(random(100,150)))
	ElseIf prob<90 Then
		Rhino.MaterialColor material, RGB(255, Int(random(100,254)),0)
	Else
		Rhino.MaterialColor material, RGB(255, 255, 255)
	End If
End Function

Function random(min,max)
	random=Rnd*(max-min)+min
End Function

' Render current viewport
Function renderView()
	Dim view,filename

	view = Rhino.CurrentView
	Rhino.Command "_-Render"
	filename=getRenderFileName("RandRail")
	Dim cmd : cmd="_-SaveRenderWindowAs " &#038; Chr(34) &#038; filename &#038; Chr(34)
	Rhino.Command cmd
End Function

' Get auto-incremented filename
Function getRenderFileName(scriptName)
	Dim index,done, doc, file, temp,imgNum

	done=-1
	index=0
	Do While done=-1
		doc=Rhino.WorkingFolder &#038; "\" &#038; scriptName &#038; padStr(scriptName,index) &#038; ".png"
		file=Rhino.FindFile(doc)
		If IsNull(file)=True Then
			done=1
		Else
			index=index+1
		End If
	Loop

	getRenderFileName=doc
End Function

Function padStr(prefix,val)
	Dim l : l=Len(val)
	If l<1 Then
		padStr="000" &#038; val
	ElseIf l<2 Then
		padStr="00" &#038; val
	ElseIf l<3 Then
		padStr="0" &#038; val
	Else
		padStr="" &#038; val
	End If
End Function	

Main</pre>
]]></content:encoded>
			<wfw:commentRss>http://workshop.evolutionzone.com/2008/02/05/my-first-rhinoscript/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
	</channel>
</rss>

