GMU:Urban Development Kit/Urban Space for Mind: Difference between revisions

From Medien Wiki
mNo edit summary
Line 64: Line 64:
Below is a Program I have written that takes some of sciences dogmas today and by clicking your mouse you can mix up the original sentences by changing at random the Subject, descriptor and object, creating new dogmas, some that don't make compete grammatical sense. Yet.  
Below is a Program I have written that takes some of sciences dogmas today and by clicking your mouse you can mix up the original sentences by changing at random the Subject, descriptor and object, creating new dogmas, some that don't make compete grammatical sense. Yet.  


<html><body><pre>
'HTML code not displaying correctly.'
<span style="color: #666666;">//Declare</span>
<span style="color: #E2661A;">String</span> sentence1;
<span style="color: #666666;">//eleven</span>
<span style="color: #E2661A;">String</span>[] oBject = {
&nbsp;&nbsp;<span style="color: #7D4793;">&quot; mechanical&quot;</span>, <span style="color: #7D4793;">&quot; a machine&quot;</span>,<span style="color: #7D4793;">&quot; fixed&quot;</span>, <span style="color: #7D4793;">&quot; unconscious&quot;</span>, <span style="color: #7D4793;">&quot; nature&quot;</span>, <span style="color: #7D4793;">&quot; purpose&quot;</span>, <span style="color: #7D4793;">&quot; genes&quot;</span>, <span style="color: #7D4793;">&quot; brain&quot;</span>, <span style="color: #7D4793;">&quot; mind&quot;</span>, <span style="color: #7D4793;">&quot; head&quot;</span>, <span style="color: #7D4793;">&quot; impossible&quot;</span>, <span style="color: #7D4793;">&quot; that really works&quot;</span>
};
<span style="color: #666666;">//twelve</span>
<span style="color: #E2661A;">String</span>[] descriptor = {
&nbsp;&nbsp;<span style="color: #7D4793;">&quot;is&quot;</span>, <span style="color: #7D4793;">&quot;is like&quot;</span>, <span style="color: #7D4793;">&quot;is&quot;</span>, <span style="color: #7D4793;">&quot;are &quot;</span>, <span style="color: #7D4793;">&quot;has no&quot;</span>, <span style="color: #7D4793;">&quot;is in your&quot;</span>, <span style="color: #7D4793;">&quot;are stored in your&quot;</span>, <span style="color: #7D4793;">&quot;is in your&quot;</span>, <span style="color: #7D4793;">&quot;is the activity of your&quot;</span>, <span style="color: #7D4793;">&quot;are&quot;</span>, <span style="color: #7D4793;">&quot;is the only type&quot;</span>, <span style="color: #7D4793;">&quot;are in&quot;</span>
};
<span style="color: #666666;">//thirteen&nbsp;</span>
<span style="color: #E2661A;">String</span>[] subject = {
&nbsp;&nbsp;<span style="color: #7D4793;">&quot;Nature &quot;</span>, <span style="color: #7D4793;">&quot;The universe &quot;</span>, <span style="color: #7D4793;">&quot;Matter &quot;</span>, <span style="color: #7D4793;">&quot;The laws of nature &quot;</span>, <span style="color: #7D4793;">&quot;The total amount of matter &amp; energy &quot;</span>, <span style="color: #7D4793;">&quot;Evolution &quot;</span>, <span style="color: #7D4793;">&quot;Everything you inherit &quot;</span>, <span style="color: #7D4793;">&quot;Memories &quot;</span>, <span style="color: #7D4793;">&quot;Your brain &quot;</span>, <span style="color: #7D4793;">&quot;Your mind &quot;</span>, <span style="color: #7D4793;">&quot;Your consciousness &quot;</span>, <span style="color: #7D4793;">&quot;Psychic phenomena &quot;</span>, <span style="color: #7D4793;">&quot;Mechanistic medicine &quot;</span>
};


<span style="color: #33997E;">void</span> <span style="color: #006699;"><b>setup</b></span>() {
----------------------------------------------------------------------------
&nbsp;&nbsp;<span style="color: #006699;">size</span>(800, 250);
&nbsp;&nbsp;<span style="color: #006699;">background</span>(0, 15, 108);
&nbsp;&nbsp;<span style="color: #006699;">fill</span>(0);
&nbsp;&nbsp;<span style="color: #006699;">smooth</span>();
}


<span style="color: #33997E;">void</span> <span style="color: #006699;"><b>draw</b></span>() {
&nbsp;&nbsp;<span style="color: #006699;">frameRate</span>(10);


&nbsp;&nbsp;<span style="color: #E2661A;">int</span> i;
&nbsp;&nbsp;<span style="color: #669900;">if</span> (<span style="color: #D94A7A;">mousePressed</span>) {
&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #006699;">background</span>(0, 15, 108);
&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #669900;">for</span> (i=0; i &lt;= 2; i++) {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #E2661A;">int</span> random[] = {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #006699;">int</span>(<span style="color: #006699;">random</span>(subject.<span style="color: #33997E;">length</span>)),
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #006699;">int</span>(<span style="color: #006699;">random</span>(descriptor.<span style="color: #33997E;">length</span>)),
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #006699;">int</span>(<span style="color: #006699;">random</span>(oBject.<span style="color: #33997E;">length</span>)),
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;};
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #006699;">fill</span>(255);
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #006699;">textAlign</span>(<span style="color: #718A62;">CENTER</span>);
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #006699;">textSize</span>(18);
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #E2661A;">int</span> sentence1PosY = 40+80*i;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sentence1&nbsp;=&nbsp;subject[random[0]]&nbsp;+&nbsp;descriptor[random[1]]&nbsp;+&nbsp;oBject[random[2]];
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #006699;">text</span>(sentence1, <span style="color: #D94A7A;">width</span>/2, sentence1PosY);
&nbsp;&nbsp;&nbsp;&nbsp;}
&nbsp;&nbsp;}&nbsp;
&nbsp;&nbsp;<span style="color: #669900;">else</span> {
&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #006699;">redraw</span>();
&nbsp;&nbsp;}
}
</pre></body></html>


[[Category:Initial Beginnings]]
[[Category:Initial Beginnings]]