

<?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>cwwang.com &#187; Software</title>
	<atom:link href="http://cwwang.com/category/software/feed/" rel="self" type="application/rss+xml" />
	<link>http://cwwang.com</link>
	<description>Che-Wei Wang</description>
	<lastBuildDate>Sat, 06 Nov 2010 15:58:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Time Scroll</title>
		<link>http://cwwang.com/2010/03/31/time-scroll/</link>
		<comments>http://cwwang.com/2010/03/31/time-scroll/#comments</comments>
		<pubDate>Wed, 31 Mar 2010 14:59:21 +0000</pubDate>
		<dc:creator>che-wei wang</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Time]]></category>
		<category><![CDATA[Websites]]></category>

		<guid isPermaLink="false">http://cwwang.com/?p=1400</guid>
		<description><![CDATA[Time Scroll is a web browser-based 24 hour clock. Every increment of the 24 cycle, down to the second, is rendered to the browser. It starts with 00:00:00 at the top and ends with 23:59:59 at the bottom. Each second, the browser scrolls one tick downward to change the display of the current time. The [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-large wp-image-1401" title="Screen shot 2010-03-31 at 10.41.17 AM" src="http://cwwang.com/wordpress/wp-content/uploads/Screen-shot-2010-03-31-at-10.41.17-AM-570x442.png" alt="" width="570" height="442" /></p>
<p><a href="http://cwwang.com/timescroll/">Time Scroll</a> is a web browser-based 24 hour clock.  Every increment of the 24 cycle, down to the second, is rendered to the browser.  It starts with 00:00:00 at the top and ends with 23:59:59 at the bottom.  Each second, the browser scrolls one tick downward to change the display of the current time.  The location of the browser&#8217;s scroll bar gives you a general sense of where we are in time relative to the 24 hour cycle.</p>
<p>Time Scroll is written in Javascript and PHP.</p>
<p>[<a href="http://cwwang.com/timescroll/">Time Scroll</a>]</p>
]]></content:encoded>
			<wfw:commentRss>http://cwwang.com/2010/03/31/time-scroll/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Time 00-XX</title>
		<link>http://cwwang.com/2010/01/06/time-00-xx/</link>
		<comments>http://cwwang.com/2010/01/06/time-00-xx/#comments</comments>
		<pubDate>Wed, 06 Jan 2010 15:36:13 +0000</pubDate>
		<dc:creator>che-wei wang</dc:creator>
				<category><![CDATA[Processing]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Time]]></category>
		<category><![CDATA[Websites]]></category>
		<category><![CDATA[Work in Progress]]></category>

		<guid isPermaLink="false">http://cwwang.com/?p=1395</guid>
		<description><![CDATA[Some clocks are functional, some are not very practical. This is an ongoing series of clock experiments. Each clock is written in Processing and presented here using processing.js. link: [time 00]]]></description>
			<content:encoded><![CDATA[<p><img src="http://cwwang.com/wordpress/wp-content/uploads/time.png" alt="" title="time" width="600" height="400" class="alignnone size-full wp-image-1393" /></p>
<p>Some clocks are functional, some are not very practical.  This is an ongoing series of clock experiments.</p>
<p>Each clock is written in Processing and presented here using processing.js.</p>
<p>link: [<a href="http://cwandt.com/time/00.php">time 00</a>]</p>
]]></content:encoded>
			<wfw:commentRss>http://cwwang.com/2010/01/06/time-00-xx/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Crow&#8217;s Flight</title>
		<link>http://cwwang.com/2009/10/04/crows-flight/</link>
		<comments>http://cwwang.com/2009/10/04/crows-flight/#comments</comments>
		<pubDate>Sun, 04 Oct 2009 23:15:05 +0000</pubDate>
		<dc:creator>che-wei wang</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://cwwang.com/?p=1367</guid>
		<description><![CDATA[Crow’s Flight is a GPS compass app for the Android platform. Enter an address and the GPS compass will continuously update your position and point towards the destination. Distance to the point is displayed in meters or kilometers along with a visual distance gauge. More info over at cwwandt.com/crows-flight]]></description>
			<content:encoded><![CDATA[<p><img src="http://cwwang.com/wordpress/wp-content/uploads/waxwing.png" alt="waxwing" title="waxwing" width="300" height="200" class="alignnone size-full wp-image-1370" /></p>
<p>Crow’s Flight is a GPS compass app for the Android platform. Enter an address and the GPS compass will continuously update your position and point towards the destination. Distance to the point is displayed in meters or kilometers along with a visual distance gauge.  More info over at <a href="http://cwandt.com/crows-flight/">cwwandt.com/crows-flight</a></p>
<p><span id="more-1367"></span><br />
<img src="http://cwwang.com/wordpress/wp-content/uploads/device2-200x300.png" alt="device2" title="device2" width="200" height="300" class="alignnone size-medium wp-image-1371" /> <img src="http://cwwang.com/wordpress/wp-content/uploads/device2-200x300.png" alt="device2" title="device2" width="200" height="300" class="alignnone size-medium wp-image-1371" /></p>
]]></content:encoded>
			<wfw:commentRss>http://cwwang.com/2009/10/04/crows-flight/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cinematic Timepiece</title>
		<link>http://cwwang.com/2009/05/05/cinematic-timepiece/</link>
		<comments>http://cwwang.com/2009/05/05/cinematic-timepiece/#comments</comments>
		<pubDate>Wed, 06 May 2009 01:34:19 +0000</pubDate>
		<dc:creator>che-wei wang</dc:creator>
				<category><![CDATA[ITP]]></category>
		<category><![CDATA[openFrameworks]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Time]]></category>
		<category><![CDATA[Work in Progress]]></category>

		<guid isPermaLink="false">http://cwwang.com/?p=1122</guid>
		<description><![CDATA[Time is our measure of a constant beat. We use seconds, minutes, hours, days, weeks, months, years, decades, centuries, etc. But what if we measured time against rituals, chores, tasks, stories, and narratives? How can we use our memory, prediction, familiar and unfamiliar narratives to tell time? As a child, I remember using the length [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://cwwang.com/wordpress/wp-content/uploads/picture-1cinematic-1024x640.png" alt="picture 1cinematic" title="picture 1cinematic" width="570" height="356" class="alignleft size-large wp-image-1184" /></p>
<p>Time is our measure of a constant beat.  We use seconds, minutes, hours, days, weeks, months, years, decades, centuries, etc.  But what if we measured time against rituals, chores, tasks, stories, and narratives?  How can we use our memory, prediction, familiar and unfamiliar narratives to tell time?</p>
<p>As a child, I remember using the length of songs as a way to measure how much time was left during a trip. A song was an appropriate period to easily multiply to get a grasp of any larger measure like the time left until we arrived to our grandmother’s place. The length of a song was also a measure I could digest and understand in an instant.</p>
<p>The first iteration of Cinematic Timepiece consists of 5 video loops playing at 5 different speeds on a single screen.  The video is of a person coloring in a large circle on a wall.</p>
<p>The frame furthest to the right is a video loop that completes a cycle in one minute.  The video to the left of the minute loop completes its cycle in one hour.  The next completes in a day, then a month, then a year.  </p>
<p>Through various iterations, we intend to experiment with various narratives and rituals captured in a video loop to be read as measures of time.</p>
<p>The software was written in OpenFrameworks for a single screen to be expanded in the future for multiple screens as a piece of hardware.</p>
<p>Cinematic Timepiece is being developed in collaboration with Taylor Levy.</p>
<p>Download the fullscreen app version [<a href="http://drop.io/cinematicTimepiece#">http://drop.io/cinematicTimepiece#</a>]</p>
<p><object width="571" height="157"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=4503148&amp;server=vimeo.com&amp;show_title=0&amp;show_byline=0&amp;show_portrait=0&amp;color=00adef&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=4503148&amp;server=vimeo.com&amp;show_title=0&amp;show_byline=0&amp;show_portrait=0&amp;color=00adef&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="571" height="157"></embed></object></p>
<p><object width="571" height="136"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=10915235&amp;server=vimeo.com&amp;show_title=0&amp;show_byline=0&amp;show_portrait=0&amp;color=00adef&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=10915235&amp;server=vimeo.com&amp;show_title=0&amp;show_byline=0&amp;show_portrait=0&amp;color=00adef&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="571" height="136"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://cwwang.com/2009/05/05/cinematic-timepiece/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Sprocket Rhinoscript</title>
		<link>http://cwwang.com/2009/04/01/sprocket-rhinoscript/</link>
		<comments>http://cwwang.com/2009/04/01/sprocket-rhinoscript/#comments</comments>
		<pubDate>Wed, 01 Apr 2009 05:15:09 +0000</pubDate>
		<dc:creator>che-wei wang</dc:creator>
				<category><![CDATA[Mechanisms]]></category>
		<category><![CDATA[Rhinoscript]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://cwwang.com/?p=1071</guid>
		<description><![CDATA[UPDATE: this script generates inaccurately spaced teeth. sorry! fixes in new version coming soon. (6.25.09) Here&#8217;s some basic rhinoscript code to draw your own sprockets based on the number of desired teeth, chain pitch and roller diameter. It&#8217;s very basic, but enough to draw what you want and get some custom sprockets lasercut. Draw a [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://cwwang.com/wordpress/wp-content/uploads/sprockets-converted-01.png" rel="lightbox[1071]" title="sprockets-converted-01" rel="lightbox"><img src="http://cwwang.com/wordpress/wp-content/uploads/sprockets-converted-01.thumbnail.png" alt="sprockets-converted-01" width="128" height="91" class="attachment wp-att-1072 " /></a></p>
<p>UPDATE: this script generates inaccurately spaced teeth. sorry!  fixes in new version coming soon. (6.25.09)</p>
<p>Here&#8217;s some basic rhinoscript code to draw your own sprockets based on the number of desired teeth, chain pitch and roller diameter. It&#8217;s very basic, but enough to draw what you want and get some custom sprockets lasercut.  Draw a circle that&#8217;s larger than what you think it&#8217;s going to be in top view, then run the code.<br />
<span id="more-1071"></span></p>
<pre><code>Option Explicit
'Script written by cw wang
'based on sprocket drawing instructions from http://www.gizmology.net/sprockets.htm
'Script copyrighted by cwwang.com
'Script version Sunday, March 29, 2009 7:12:48 PM

Call Main()
Sub Main()
	Dim circle:circle=Rhino.getobject("select circle",4)
	Dim teeth:teeth=Rhino.GetInteger("number of teeth",10)
	Dim pitch:pitch=RHino.GetReal("pitch",.25)
	Dim rollerD:rollerD=RHino.GetReal("roller diameter",.13)

	Dim center:center=Rhino.CircleCenterPoint(circle)
	Dim	radius:radius=Rhino.CircleRadius(circle)

	Dim ln(2)
	Dim lnOff(3)
	ln(0)=Rhino.AddLine(center,array(center(0),center(1)+radius,center(2)))
	lnOff(0)=Rhino.OffsetCurve(ln(0),center,pitch/2,array(0,0,-1))(0)
	lnOff(1)=Rhino.OffsetCurve(ln(0),center,pitch/2,array(0,0,1))(0)

	ln(1)=Rhino.RotateObject(ln(0),center,(360/teeth),,True)
	Dim offsetDir:offsetDir=rhino.CurveEndPoint(ln(0))
	lnOff(2)=Rhino.OffsetCurve(ln(1),offsetDir,pitch/2)(0)
	ln(2)=Rhino.RotateObject(ln(0),center,-1*(360/teeth),,True)
	lnOff(3)=Rhino.OffsetCurve(ln(2),offsetDir,pitch/2)(0)

	'draw rollers
	Dim intersection1:intersection1=rhino.curvecurveIntersection(lnOff(0),lnOff(3))
	Dim plane1:plane1=rhino.planeFromNormal(intersection1(0,1),array(0,0,1))
	Dim roller1:roller1= rhino.AddCircle(plane1,rollerD/2)
	Dim intersection2:intersection2=rhino.curvecurveIntersection(lnOff(1),lnOff(2))
	Dim plane2:plane2=rhino.planeFromNormal(intersection2(0,1),array(0,0,1))
	Dim roller2:roller2= rhino.AddCircle(plane2,rollerD/2)
	Dim interLn:interLn=rhino.AddLine(intersection1(0,1),intersection2(0,1))	

	'draw circles
	Dim rollerLineIntersection1:rollerLineIntersection1=Rhino.CurveCurveIntersection(interLn,roller1)
	Dim r1:r1=Rhino.Distance(intersection2(0,1),rollerLineIntersection1(0,1))
	Dim circle1:circle1=Rhino.addCircle(plane1,r1)

	Dim rollerLineIntersection2:rollerLineIntersection2=Rhino.CurveCurveIntersection(interLn,roller2)
	Dim r2:r2=Rhino.Distance(intersection2(0,1),rollerLineIntersection2(0,1))
	Dim circle2:circle2=Rhino.addCircle(plane2,r1)

	Dim tootharc(3)
	'trim sharp part
	Dim tip:tip=Rhino.CurveCurveIntersection(circle1,circle2)
	Dim arrinterval(1)
	arrInterval(0)=Rhino.CurveClosestPoint(circle1,	tip(0,1))
	arrInterval(1)=RHino.CurveClosestPoint(circle1, rollerLineIntersection1(0,1))
	toothArc(0)=Rhino.TrimCurve(circle1,arrInterval,True)

	arrInterval(1)=Rhino.CurveClosestPoint(circle2,	tip(0,1))
	arrInterval(0)=RHino.CurveClosestPoint(circle2, rollerLineIntersection2(0,1))
	toothArc(1)=Rhino.TrimCurve(circle2,arrInterval,True)

	'trim valley
	Dim intersection:intersection=Rhino.CurveCurveIntersection(roller1,lnOff(3))
	arrinterval(0)=Rhino.CurveClosestpoint(roller1,rollerLineIntersection1(0,1))
	arrInterval(1)=RHino.CurveClosestPoint(roller1,	 intersection(1,1))
	toothArc(2)=Rhino.TrimCurve(roller1,arrInterval,True)

	intersection=Rhino.CurveCurveIntersection(roller2,lnOff(1))
	arrinterval(1)=Rhino.CurveClosestpoint(roller2,rollerLineIntersection2(0,1))
	arrInterval(0)=RHino.CurveClosestPoint(roller2,	 intersection(1,1))
	toothArc(3)=Rhino.TrimCurve(roller2,arrInterval,True)

	'delete stuff
	Call Rhino.DeleteObjects(ln)
	Call Rhino.DeleteObjects(lnOff)
	Call RHino.DeleteObject(interLn)

	Dim sprocketCrv()
	ReDim sprocketCrv(1)

	sprocketCrv(0)=Rhino.JoinCurves(toothArc,True)(0)

	Dim i
	For i=1 To teeth-1
		ReDim Preserve sprocketCrv(i)
		sprocketCrv(i)= Rhino.RotateObject(sprocketCrv(0),center,i*360/teeth,,True)
	Next

	Call Rhino.JoinCurves(sprocketCrv,True)

	Call Rhino.AddText(teeth,center,pitch)

	Call Rhino.addPoint(center)

End Sub</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://cwwang.com/2009/04/01/sprocket-rhinoscript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sun Angle Script</title>
		<link>http://cwwang.com/2009/02/28/sun-angle-script/</link>
		<comments>http://cwwang.com/2009/02/28/sun-angle-script/#comments</comments>
		<pubDate>Sat, 28 Feb 2009 19:00:43 +0000</pubDate>
		<dc:creator>che-wei wang</dc:creator>
				<category><![CDATA[Rhinoscript]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://cwwang.com/?p=1015</guid>
		<description><![CDATA[The following rhinoscript code calculates and draws a series of sun angles based on the time, day and latitude. NOTE: in my test there&#8217;s something happening to the angles around noon causing them to be inaccurate because the calculations are based on cos values. All other times besides noon should be fine. Updated version with [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://cwwang.com/wordpress/wp-content/uploads/sun_angle.png" rel="lightbox[1015]" title="sun_angle" rel="lightbox"><img src="http://cwwang.com/wordpress/wp-content/uploads/sun_angle.thumbnail.png" alt="sun_angle" width="128" height="83" class="attachment wp-att-1016 " /></a></p>
<p>The following rhinoscript code calculates and draws a series of  sun angles based on the time, day and latitude.<br />
NOTE: in my test there&#8217;s something happening to the angles around noon causing them to be inaccurate because the calculations are based on cos values. All other times besides noon should be fine.</p>
<p>Updated version with nicer UI from <a href="http://algorithmicdesign.net">Ezio</a>. Thank you!<br />
Download:<a href='http://cwwang.com/wordpress/wp-content/uploads/sunbatchrender_ezb.rvb'>sunbatchrender_ezb.rvb</a></p>
<p><span id="more-1015"></span></p>
<pre><code>Option Explicit
'Script written by cwwang.com augmented by algorithmicdesign.net
'Script version Sunday, March 01, 2009 9:39:09 PM

Call Main()
Sub Main()

	Dim i,j,k
	Dim hour
	Dim arrSettings : arrSettings   = getSunSettings()
	Dim longitude	: longitude		= CDbl(arrSettings(0))
	Dim latitude	: latitude		= CDbl(arrSettings(1))
	Dim offset		: offset		= CDbl(arrSettings(2))
	'day number --&gt; January 1 = day 1, January 2 = day 2, etc.
	'March equinox 78
	'September equinox 264
	'June solstice 171
	'Dec solstice 354
	Dim startDay	: startDay		= CDbl(arrSettings(3))
	Dim endDay		: endDay		= CDbl(arrSettings(4))
	Dim dayIncrement: dayIncrement 	= CDbl(arrSettings(5))
	Dim startHour   : startHour     = CDbl(arrSettings(6))
	Dim endHour		: endHour		= CDbl(arrSettings(7))
	Dim increment	: increment		= CDbl(arrSettings(8))
	'Dim increment	: increment		=.1666666666666666666666666666666' 10/60=.16666 every ten  minutes
	'Dim increment	: increment		=.01666666666666666666666666666666' 1/60=.016666 every minute
	Dim pathFolder 	: pathFolder 	= Rhino.BrowseForFolder(,"Pick a destination folder", "Output Folder")
	Dim nTimes		: nTimes     	=(endHour-startHour)/increment
	Dim nDays		: nDays      	=(endDay-startDay)/dayIncrement

	ReDim analemmaPoints(CInt(nTimes),CInt(nDays))
	'ReDim analemmaPoints(150,50)

	Call Rhino.EnableRedraw(False)

	Dim count:count=0
	For i=startDay To endDay

		Dim count2:count2=0
		Dim paz:paz=0
		Dim switchaz:switchaz=False

		hour=startHour
		For k=0 To (endHour-hour)/increment

			Dim N:N=i 

			Dim g:g = (360/365.242199)*(N + hour/24.0)
			'Rhino.Print(g)

			'calculation of the declination of the sun
			Dim	D:D = 0.396372-22.91327*cos(Rhino.ToRadians(g))+4.02543*sin(Rhino.ToRadians(g))-0.387205*cos(Rhino.ToRadians(2*g))+0.051967*sin(Rhino.ToRadians(2*g))-0.154527*cos(Rhino.ToRadians(3*g)) + 0.084798*sin(Rhino.ToRadians(3*g))
			'Rhino.Print("Declination "&amp;d)

			'calculate the time correction For solar angle:
			Dim TC:TC = 0.004297+0.107029*cos(Rhino.ToRadians(g))-1.837877*sin(Rhino.ToRadians(g))-0.837378*cos(Rhino.ToRadians(2*g))-2.340475*sin(Rhino.ToRadians(2*g))
			'Rhino.Print("Time Correction " &amp;tc)

			'calculate the Solar Hour Angle (SHA)
			Dim SHA:SHA = (hour+offset-12)*15 + Longitude + TC
			'rhino.Print("Solar Hour Angle "&amp;sha)

			'Note that If SHA Is greater than 180, Then you must add (-360) To the
			'result And If SHA Is lower than -180, Then you must add 360 To the
			If (SHA&gt;180) Then
				SHA=SHA-360
			ElseIf(SHA&lt;-180)Then
				SHA=SHA+360
			End If
			'calculate the Sun Zenith Angle (SZA):
			Dim SZA:SZA = (sin(Rhino.ToRadians(Latitude))*sin(Rhino.ToRadians(D)) )+ (cos(Rhino.ToRadians(Latitude))*cos(Rhino.ToRadians(D))*cos(Rhino.ToRadians(SHA)))
			'rhino.Print("cos(sza) "&amp;sza)

			'NOTE: If cos(SZA) formula gives a figure greater than 1 use 1 And If
			'it gives you a figure lower than -1 use -1.
			'Dim SSZA:SSZA=SZA
			If(SZA&gt;=1) Then
				SZA=1
			ElseIf(SZA&lt;=-1) Then
				SZA=-1
			End If

			sza=ArcCos(sza)
			'SZA Is the complementary angle of the Sun Elevation Angle Or
			Dim sea:sea=90-sza

			'calculate the Azimuth Angle (AZ):
			Dim AZ
			AZ = (sin(Rhino.ToRadians(D))-sin(Rhino.ToRadians(Latitude))*cos(Rhino.ToRadians(SZA) ) )/(cos(Rhino.ToRadians(Latitude))*sin(Rhino.ToRadians(SZA))) 

			az=arccos(az)

			If(paz&gt;az And switchaz=False)Then
				switchAz=True
			End If
			paz=az

			If(switchaz=True)Then
				az=0-az
			End If

			'rhino.Print("Azimuth Angle "&amp; az)
			'rhino.Print("Zenith Angle "&amp; sza)
			'rhino.Print("Altitude Angle "&amp; sea)

			Dim ray:ray=Rhino.AddLine( Array(0,0,0),array(0,40,0) )
			ray= Rhino.RotateObject(ray,array(0,0,0),sea,array(1,0,0),False)
			ray= Rhino.RotateObject(ray,array(0,0,0),az,array(0,0,-1),False)

			analemmaPoints(count2,count)=rhino.CurveEndPoint(ray)
			Dim sun : sun = Rhino.AddDirectionalLight (rhino.CurveEndPoint(ray), rhino.CurveStartPoint(ray))
			Call BatchRender(i, k, pathFolder)
			Call Rhino.DeleteObject(sun)
			'Call rhino.AddText(cstr(hour),analemmaPoints(count),.04)
			count2=count2+1

			hour=hour+increment
			'Rhino.Print(hour)

		Next

		i=i+dayIncrement

		count=count+1

	Next
	'Call rhino.AddLine(analemmaPoints(0,0),analemmaPoints(0,1) )

	For i=0 To count2-1
		For j=0 To count-2			

			'Dim analemmaCurve:analemmaCurve=rhino.AddCurve(analemmaPoints(3),4 )
			Call rhino.AddLine(analemmaPoints(i,j),analemmaPoints(i,j+1) )
		Next	

	Next

	Call Rhino.EnableRedraw(True)
	Rhino.Print("---")
End Sub

Function ArcCos(ByVal X)
	If X &lt;&gt; 1 Then
		ArcCos =rhino.ToDegrees( Atn(-X / Sqr(-X * X + 1)) + 2 * Atn(1) )
	Else
		ArcCos = 0
	End If
End Function

Sub BatchRender(strDay, strHour, pathFolder)

	Dim FileName : FileName = Chr(34) &amp; pathFolder &amp; strDay &amp; "_" &amp; strHour &amp; ".jpg" &amp; Chr(34)
	Rhino.Command "-_Render "
	Rhino.Command "-_SaveRenderWindowAs " &amp; FileName &amp; " _Enter"
	Rhino.Command "-_CloseRenderWindow "
End Sub

Function getSunSettings()

	getSunSettings	= Null

	Dim arrSettings(8), arrPrompt(8)
	arrPrompt(0)   = "Longitude"
	arrPrompt(1)   = "Latitude"
	arrPrompt(2)   = "GMT"
	arrPrompt(3)   = "StartDay"
	arrPrompt(4)   = "EndDay"
	arrPrompt(5)   = "DayIncrement"
	arrPrompt(6)   = "StartHour"
	arrPrompt(7)   = "EndHour"
	arrPrompt(8)   = "HourIncrement"

	arrSettings(0) = Rhino.GetSettings(Rhino.InstallFolder &amp; "SunRender.ini", "SunRender", arrPrompt(0))
	If IsNull(arrSettings(0)) Then arrSettings(0) = -73.997
	arrSettings(1) = Rhino.GetSettings(Rhino.InstallFolder &amp; "SunRender.ini", "SunRender", arrPrompt(1))
	If IsNull(arrSettings(1)) Then arrSettings(1) = 40.73
	arrSettings(2) = Rhino.GetSettings(Rhino.InstallFolder &amp; "SunRender.ini", "SunRender", arrPrompt(2))
	If IsNull(arrSettings(2)) Then arrSettings(2) = 5
	arrSettings(3) = Rhino.GetSettings(Rhino.InstallFolder &amp; "SunRender.ini", "SunRender", arrPrompt(3))
	If IsNull(arrSettings(3)) Then arrSettings(3) = 0
	arrSettings(4) = Rhino.GetSettings(Rhino.InstallFolder &amp; "SunRender.ini", "SunRender", arrPrompt(4))
	If IsNull(arrSettings(4)) Then arrSettings(4) = 1
	arrSettings(5) = Rhino.GetSettings(Rhino.InstallFolder &amp; "SunRender.ini", "SunRender", arrPrompt(5))
	If IsNull(arrSettings(5)) Then arrSettings(5) = 5
	arrSettings(6) = Rhino.GetSettings(Rhino.InstallFolder &amp; "SunRender.ini", "SunRender", arrPrompt(6))
	If IsNull(arrSettings(6)) Then arrSettings(6) = 6.0
	arrSettings(7) = Rhino.GetSettings(Rhino.InstallFolder &amp; "SunRender.ini", "SunRender", arrPrompt(7))
	If IsNull(arrSettings(7)) Then arrSettings(7) = 18.0
	arrSettings(8) = Rhino.GetSettings(Rhino.InstallFolder &amp; "SunRender.ini", "SunRender", arrPrompt(8))
	If IsNull(arrSettings(8)) Then arrSettings(8) = 1
	'Dim increment	: increment		=.1666666666666666666666666666666' 10/60=.16666 every ten  minutes
	'Dim increment	: increment		=.01666666666666666666666666666666' 1/60=.016666 every minute
	'day number --&gt; January 1 = day 1, January 2 = day 2, etc.
	'March equinox 78
	'September equinox 264
	'June solstice 171
	'Dec solstice 354

	Dim arrReturnSettings : arrReturnSettings =	Rhino.PropertyListBox (arrPrompt,  arrSettings, "Please enter the appropriate values" ,"Sun Batch Render Settings")
	Dim i
	For i = 0 To Ubound(arrSettings)
		'write these settings to a file so that you don't have to re-enter them next time
		Rhino.SaveSettings Rhino.InstallFolder &amp; "SunRender.ini", "SunRender", arrPrompt(i), arrReturnSettings(i)
	Next

	getSunSettings = arrReturnSettings

End Function</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://cwwang.com/2009/02/28/sun-angle-script/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>P.Life V2</title>
		<link>http://cwwang.com/2008/11/25/plife-v2/</link>
		<comments>http://cwwang.com/2008/11/25/plife-v2/#comments</comments>
		<pubDate>Tue, 25 Nov 2008 05:01:37 +0000</pubDate>
		<dc:creator>che-wei wang</dc:creator>
				<category><![CDATA[2D Graphics]]></category>
		<category><![CDATA[Big Screens]]></category>
		<category><![CDATA[ITP]]></category>
		<category><![CDATA[openFrameworks]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://cwwang.com/?p=922</guid>
		<description><![CDATA[plife at IAC from che-wei wang on Vimeo. P.Life is a large scale interactive screen designed for the IAC’s 120′ wide video wall. In the world of P.Life, Ps run across the 120&#8242; screen frantically moving material from one house to another. Along the way, Ps exchange pleasantries (based on text message inputs) as they [...]]]></description>
			<content:encoded><![CDATA[<p><object width="480" height="320"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=3209054&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=0&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=3209054&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=0&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="480" height="320"></embed></object><br /><a href="http://vimeo.com/3209054">plife at IAC</a> from <a href="http://vimeo.com/user271044">che-wei wang</a> on <a href="http://vimeo.com">Vimeo</a>.</p>
<p><a href="http://cwwang.com/wordpress/wp-content/uploads/plife_06176.png" rel="lightbox[922]" title="plife_06176" rel="lightbox"><img src="http://cwwang.com/wordpress/wp-content/uploads/plife_06176.png" alt="plife_06176" width="500" height="46" class="attachment wp-att-951 " /></a></p>
<p><a href="http://cwwang.com/wordpress/wp-content/uploads/plife_04812.png" rel="lightbox[922]" title="plife_04812" rel="lightbox"><img src="http://cwwang.com/wordpress/wp-content/uploads/plife_04812.png" alt="plife_04812" width="500" height="46" class="attachment wp-att-949 " /></a></p>
<p><a href="http://cwwang.com/wordpress/wp-content/uploads/plife_04240.png" rel="lightbox[922]" title="plife_04240" rel="lightbox"><img src="http://cwwang.com/wordpress/wp-content/uploads/plife_04240.png" alt="plife_04240" width="500" height="46" class="attachment wp-att-948 " /></a></p>
<p><a href="http://cwwang.com/wordpress/wp-content/uploads/plife_03618.png" rel="lightbox[922]" title="plife_03618" rel="lightbox"><img src="http://cwwang.com/wordpress/wp-content/uploads/plife_03618.png" alt="plife_03618" width="500" height="46" class="attachment wp-att-947 " /></a></p>
<p><a href="http://cwwang.com/wordpress/wp-content/uploads/plife_02422.png" rel="lightbox[922]" title="plife_02422" rel="lightbox"><img src="http://cwwang.com/wordpress/wp-content/uploads/plife_02422.png" alt="plife_02422" width="500" height="46" class="attachment wp-att-944 " /></a></p>
<p><a href="http://cwwang.com/wordpress/wp-content/uploads/plife_01146.png" rel="lightbox[922]" title="plife_01146" rel="lightbox"><img src="http://cwwang.com/wordpress/wp-content/uploads/plife_01146.png" alt="plife_01146" width="500" height="46" class="attachment wp-att-941 " /></a></p>
<p><a href="http://cwwang.com/wordpress/wp-content/uploads/plife_00714.png" rel="lightbox[922]" title="plife_00714" rel="lightbox"><img src="http://cwwang.com/wordpress/wp-content/uploads/plife_00714.png" alt="plife_00714" width="500" height="46" class="attachment wp-att-940 " /></a></p>
<p><a href="http://cwwang.com/wordpress/wp-content/uploads/plife_05734.png" rel="lightbox[922]" title="plife_05734" rel="lightbox"><img src="http://cwwang.com/wordpress/wp-content/uploads/plife_05734.png" alt="plife_05734" width="500" height="46" class="attachment wp-att-950 " /></a></p>
<p>P.Life is a large scale interactive screen designed for the IAC’s 120′ wide video wall. In the world of P.Life, Ps run across the 120&#8242; screen frantically moving material from one house to another.  Along the way, Ps exchange pleasantries (based on text message inputs) as they pass by each other, offering a helping hand to those in need.  The landscape shifts and jolts based on audio input from the audience, tossing Ps into the air.  Playful jumps into midair often end in injury, forcing them to crawl until a fellow P comes by to help out. </p>
<p>Features<br />
Text messaging to create new characters of different sizes and dialogues.<br />
Audio input to influence landscape<br />
Performance backend to influence landscape<br />
Ps move with life-like motion as they walk, jump, fall, run skip, crawl, carry boxes, push boxes, etc.<br />
P.Life is written in OpenFrameworks and uses the Most Pixels Ever library</p>
<p>By Che-Wei Wang and Jiaxin Feng<br />
Live Music by <a href="http://www.possibledesignobject.com/">Taylor Levy</a></p>
<p><a href="http://cwwang.com/wordpress/wp-content/uploads/wuyingxian_3132028791_7cb2b3be0b_b.jpg" rel="lightbox[922]" title="wuyingxian_3132028791_7cb2b3be0b_b" rel="lightbox"><img src="http://cwwang.com/wordpress/wp-content/uploads/wuyingxian_3132028791_7cb2b3be0b_b.thumbnail.jpg" alt="wuyingxian_3132028791_7cb2b3be0b_b" width="128" height="85" class="attachment wp-att-995 " /></a><a href="http://cwwang.com/wordpress/wp-content/uploads/wuyingxian_3131974377_090d1153da_b.jpg" rel="lightbox[922]" title="wuyingxian_3131974377_090d1153da_b" rel="lightbox"><img src="http://cwwang.com/wordpress/wp-content/uploads/wuyingxian_3131974377_090d1153da_b.thumbnail.jpg" alt="wuyingxian_3131974377_090d1153da_b" width="128" height="85" class="attachment wp-att-994 " /></a><br />
photos by <a href="http://www.flickr.com/photos/23106106@N07/">wuyingxian</a></p>
]]></content:encoded>
			<wfw:commentRss>http://cwwang.com/2008/11/25/plife-v2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Elevator P</title>
		<link>http://cwwang.com/2008/11/20/elevator-p/</link>
		<comments>http://cwwang.com/2008/11/20/elevator-p/#comments</comments>
		<pubDate>Thu, 20 Nov 2008 20:27:00 +0000</pubDate>
		<dc:creator>che-wei wang</dc:creator>
				<category><![CDATA[ITP]]></category>
		<category><![CDATA[Live Web]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Websites]]></category>

		<guid isPermaLink="false">http://cwwang.com/?p=920</guid>
		<description><![CDATA[Elevator P interprets random conversation in an elevator into poetry and publishes them immediately on twitter. Using a hidden microphone, Elevator P captures unexpected chatter, un-staged and raw. The interpreter elevates mundane elevator conversations into beautiful flowing poetry capturing the deep essence of each dialogue. Haiku Poetry. http://twitter.com/chatterbot]]></description>
			<content:encoded><![CDATA[<p>Elevator P  interprets random conversation in an elevator into poetry and publishes them immediately on twitter.  Using a hidden microphone, Elevator P captures unexpected chatter, un-staged and raw.  The interpreter elevates mundane elevator conversations into beautiful flowing poetry capturing the deep essence of each dialogue.</p>
<p>Haiku Poetry.<br />
<a href="http://twitter.com/chatterbot">http://twitter.com/chatterbot</a></p>
]]></content:encoded>
			<wfw:commentRss>http://cwwang.com/2008/11/20/elevator-p/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>P.Life</title>
		<link>http://cwwang.com/2008/09/24/plife/</link>
		<comments>http://cwwang.com/2008/09/24/plife/#comments</comments>
		<pubDate>Thu, 25 Sep 2008 00:51:46 +0000</pubDate>
		<dc:creator>che-wei wang</dc:creator>
				<category><![CDATA[Big Screens]]></category>
		<category><![CDATA[ITP]]></category>
		<category><![CDATA[openFrameworks]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Work in Progress]]></category>

		<guid isPermaLink="false">http://cwwang.com/?p=864</guid>
		<description><![CDATA[P.Life is a large scale interactive screen designed for the IAC&#8217;s 120&#8242; wide video wall. In the world of P.Life, Ps run around growing, living, and dying, as the landscape continuously changes creating unexpected situations challenging their existence. Scenario Screen fades from black to dawn and rising sun along a horizon. The bottom third of [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://cwwang.com/wordpress/wp-content/uploads/p02.png" rel="lightbox[864]" title="p02" rel="lightbox"><img src="http://cwwang.com/wordpress/wp-content/uploads/p02.png" alt="p02" width="500" height="78" class="attachment wp-att-866 " /></a></p>
<p><strong>P.Life</strong> is a large scale interactive screen designed for the IAC&#8217;s 120&#8242; wide video wall.  In the world of P.Life, Ps run around growing, living, and dying, as the landscape continuously changes creating unexpected situations challenging their existence.</p>
<p><strong><br />
Scenario</strong><br />
Screen fades from black to dawn and rising sun along a horizon.  The bottom third of the screen shows a section through the landscape cutting through underground pipes, tunnels, reservoirs, etc. Towards the top the surface of the landscape is visible as it fades and blurs into the horizon and sky.<br />
A few Ps wander around the flat landscape.  A number appears on screen for participants to send an SMS message to with their name.  As participants send SMS messages, more groups of Ps appear on screen representing each SMS and wander across the landscape.  The landscape begins to undulate as the audience interacts with the screen, creating of hills, valleys, lakes, and cliffs.  Ps running across the landscape fall to their death as the ground beneath their feet drops or ride down the side of a hill like a wave as a hill moves a cross the screen like a wave.  Ps that fall to their death slowly sink into the ground and become fertilizer for plant-life, which is then eaten by other families of Ps allowing them to multiply.</p>
<p><a href="http://cwwang.com/wordpress/wp-content/uploads/p01.png" rel="lightbox[864]" title="p01" rel="lightbox"><img src="http://cwwang.com/wordpress/wp-content/uploads/p01.thumbnail.png" alt="p01" width="128" height="80" class="attachment wp-att-867 " /></a></p>
<p><strong>Features</strong><br />
SMS listener to make new families of Ps<br />
An array of IP cameras to transmit video for screen interaction<br />
Background subtraction to capture the audience&#8217;s gestures<br />
or Open CV with blob detection or face detection to capture the audience&#8217;s gestures<br />
or IR sensors  to capture the audience&#8217;s gestures<br />
or Lasers and photo-resistors to capture the audience&#8217;s gestures<br />
Multi-channel audio triggers for events in P-Life based on location<br />
Background elements and landscape speed through sunrise to sunset in a 3 minute sequence<br />
Ps with life like motion as they walk, jump, fall, grow, climb, swim, drowned, die, stumble, flip, run, etc.<br />
pixelated stick figures? large head?<br />
Simple 8bit game-like soundtrack<br />
Various plant-life grown from dead Ps</p>
<p><strong>Precedents</strong><br />
<a href="http://en.wikipedia.org/wiki/Lemmings_(video_game)">Lemmings</a>, <a href="http://www.thewayoftheninja.org/n.html">N for Ninja</a>, <a href="http://muonics.net/site_docs/work.php?id=41">Funky Forrest</a>, <a href="http://bigshadow.jp/entry/">Big Shadow</a>, <a href="http://hello.eboy.com/eboy/index.php">eBoy</a>, <a href="http://www.habbo.com/ ">Habbo</a></p>
<p><strong>Technical Requirements</strong><br />
IP camera array<br />
Mulit-channel audio output</p>
]]></content:encoded>
			<wfw:commentRss>http://cwwang.com/2008/09/24/plife/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MultiMesh</title>
		<link>http://cwwang.com/2008/08/09/multimesh/</link>
		<comments>http://cwwang.com/2008/08/09/multimesh/#comments</comments>
		<pubDate>Sun, 10 Aug 2008 00:51:02 +0000</pubDate>
		<dc:creator>che-wei wang</dc:creator>
				<category><![CDATA[Rhinoscript]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://cwwang.com/?p=811</guid>
		<description><![CDATA[Rhino loves to crash when it attempts to mesh a large set of surfaces in one shot. This often happens when you go to render and Rhino has to mesh all the objects in the scene. The MultiMesh plugin meshes multiple objects one at a time. By meshing your enormous elaborately detailed scene before you [...]]]></description>
			<content:encoded><![CDATA[<p>Rhino loves to crash when it attempts to mesh a large set of surfaces in one shot.  This often happens when you go to render and Rhino has to mesh all the objects in the scene.  The MultiMesh plugin meshes multiple objects one at a time.  By meshing your enormous elaborately detailed scene before you render, you save time and your sanity. </p>
<p>Version:0.03<br />
<a href="http://cwwang.com/wordpress/wp-content/rhino/MultiMesh.rhp.zip">MultiMesh.rhp.zip</a></p>
]]></content:encoded>
			<wfw:commentRss>http://cwwang.com/2008/08/09/multimesh/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

