<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"  xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:access="http://www.bloglines.com/about/specs/fac-1.0">
  <access:restriction relationship="allow" />
  <channel>
    <title>Wikispaces : Liberty BASIC Community Wiki - items matching description</title>
    <link>https://basic.wikispaces.com/space/view</link>
    <description>Filtered items at Wikispaces : Liberty BASIC Community Wiki</description>
    
    <webMaster>help@wikispaces.com (Wikispaces)</webMaster>
    <generator>https://www.wikispaces.com/</generator>
    <ttl>60</ttl>
    <atom:link href="https://basic.wikispaces.com/space/xmlo?v=rss_2_0" rel="self" type="application/rss+xml" />
    <image>
      <title>Wikispaces : Liberty BASIC Community Wiki - items matching description</title>
      <url>https://www.wikispaces.com/i/l.png</url>
      <link>https://basic.wikispaces.com/space/view</link>
      <width>140</width>
      <height>48</height>
      <description>Wikispaces</description>
    </image>

    <item>
      <title> OOP math</title>
      <link>https://basic.wikispaces.com/+OOP+math</link>
      <dc:creator>bluatigro</dc:creator>
      <guid isPermaLink="true">https://basic.wikispaces.com/+OOP+math</guid>
      <comments>https://basic.wikispaces.com/page/messages/+OOP+math</comments>
      <pubDate>Wed, 07 Apr 2010 12:51:46 GMT</pubDate>
      <description>&lt;a class=&quot;wiki_link&quot; href=&quot;/Complex&quot;&gt;Complex&lt;/a&gt; not jet there&lt;br /&gt;
&lt;a class=&quot;wiki_link&quot; href=&quot;/Fractions&quot;&gt;Fractions&lt;/a&gt; 7-apr-2010&lt;br /&gt;
&lt;a class=&quot;wiki_link&quot; href=&quot;/Vector3D&quot;&gt;Vector3D&lt;/a&gt; not jet there</description>
          </item>
    <item>
      <title> Vector 2d library (a library &amp; demonstrations)</title>
      <link>https://basic.wikispaces.com/+Vector+2d+library+%28a+library+%26+demonstrations%29</link>
      <dc:creator>tenochtitlanuk</dc:creator>
      <guid isPermaLink="true">https://basic.wikispaces.com/+Vector+2d+library+%28a+library+%26+demonstrations%29</guid>
      <comments>https://basic.wikispaces.com/page/messages/+Vector+2d+library+%28a+library+%26+demonstrations%29</comments>
      <pubDate>Sun, 04 Aug 2013 14:19:33 GMT</pubDate>
      <description>&lt;!-- ws:start:WikiTextHeadingRule:4:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc0&quot;&gt;&lt;a name=&quot;Vector 2d library&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:4 --&gt;Vector 2d library&lt;/h1&gt;
 &lt;!-- ws:start:WikiTextTocRule:10:&amp;lt;img id=&amp;quot;wikitext@@toc@@normal&amp;quot; class=&amp;quot;WikiMedia WikiMediaToc&amp;quot; title=&amp;quot;Table of Contents&amp;quot; src=&amp;quot;/site/embedthumbnail/toc/normal?w=225&amp;amp;h=100&amp;quot;/&amp;gt; --&gt;&lt;div id=&quot;toc&quot;&gt;&lt;h1 class=&quot;nopad&quot;&gt;Table of Contents&lt;/h1&gt;&lt;!-- ws:end:WikiTextTocRule:10 --&gt;&lt;!-- ws:start:WikiTextTocRule:11: --&gt;&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#Vector 2d library&quot;&gt;Vector 2d library&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:11 --&gt;&lt;!-- ws:start:WikiTextTocRule:12: --&gt;&lt;div style=&quot;margin-left: 2em;&quot;&gt;&lt;a href=&quot;#Vector 2d library-Console (text mode) demo&quot;&gt;Console (text mode) demo&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:12 --&gt;&lt;!-- ws:start:WikiTextTocRule:13: --&gt;&lt;div style=&quot;margin-left: 2em;&quot;&gt;&lt;a href=&quot;#Vector 2d library-Same demo but with graphics&quot;&gt;Same demo but with graphics&lt;/a&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:13 --&gt;&lt;!-- ws:start:WikiTextTocRule:14: --&gt;&lt;/div&gt;
&lt;!-- ws:end:WikiTextTocRule:14 --&gt;Closely related to &lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://libertybasic.conforums.com/index.cgi?board=LB3&amp;amp;action=display&amp;amp;num=1285066076&quot; rel=&quot;nofollow&quot;&gt;Complex numbers (a library &amp;amp; demonstrations)&lt;/a&gt; by &lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://www.diga.me.uk/index.html&quot; rel=&quot;nofollow&quot;&gt;tenochtitlanuk&lt;/a&gt;.&lt;br /&gt;
Uses ATAN2() function coded by Stefan Pendl (thread &lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://libertybasic.conforums.com/index.cgi?board=LB3&amp;amp;action=display&amp;amp;num=1290529526&quot; rel=&quot;nofollow&quot;&gt;Collision detection maths error&lt;/a&gt;, reply 6)&lt;br /&gt;
&lt;br /&gt;
There are times then you need add vectors, scale vectors, decompose vectors into normal and tangential parts.&lt;br /&gt;
In these times, this library might prove handy.&lt;br /&gt;
Of cource calling functions take time so everything works slower - but they say&lt;br /&gt;
&amp;quot;Make it RUN, make it run RIGHT, then make it run FAST&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Vectors are stored in a string as a space-separated pair of numbers.&lt;br /&gt;
So there is roundoff errors. Also, ther are no checks if length of vector is null - so function vectUnit$(v$) might fail on that.&lt;br /&gt;
As slight bonus, you can use vectors &amp;quot;as is&amp;quot; in graphic commands.&lt;br /&gt;
Like this&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:0:
&amp;lt;pre class=&amp;quot;lb&amp;quot;&amp;gt;v1$=vect$(100,100)&amp;lt;br/&amp;gt;v2$=vect$(300,200)&amp;lt;br/&amp;gt;main.graphicbox1 &amp;amp;quot;line &amp;amp;quot;;v1$;&amp;amp;quot; &amp;amp;quot;;v2$&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.lb  {font-family:monospace;}
.lb .imp {font-weight: bold; color: red;}
.lb .kw1 {color: #0000FF;}
.lb .kw2 {color: #AD0080;}
.lb .kw3 {color: #008080;}
.lb .co1 {color: #666666; font-style: italic;}
.lb .coMULTI {color: #666666; font-style: italic;}
.lb .es0 {color: #000099; font-weight: bold;}
.lb .br0 {color: #009900;}
.lb .sy1 {color: #339933;}
.lb .st0 {color: #008000;}
.lb .nu0 {color: #FF0000;}
.lb .me0 {color: #004000;}
.lb span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;lb&quot;&gt;v1$&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;vect$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;100&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;100&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
v2$&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;vect$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;300&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;200&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
main.graphicbox1 &lt;span class=&quot;st0&quot;&gt;&amp;quot;line &amp;quot;&lt;/span&gt;;v1$;&lt;span class=&quot;st0&quot;&gt;&amp;quot; &amp;quot;&lt;/span&gt;;v2$&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:0 --&gt;Or even like this&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:1:
&amp;lt;pre class=&amp;quot;lb&amp;quot;&amp;gt;offset$=vect$(100,100)&amp;lt;br/&amp;gt;v1$=vect$(1,1)&amp;lt;br/&amp;gt;v2$=vect$(3,2)&amp;lt;br/&amp;gt;main.graphicbox1 &amp;amp;quot;line &amp;amp;quot;;vectAdd$(offset$,vectScale$(10,v1$));&amp;amp;quot; &amp;amp;quot;;vectAdd$(offset$,vectScale$(10,v2$))&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.lb  {font-family:monospace;}
.lb .imp {font-weight: bold; color: red;}
.lb .kw1 {color: #0000FF;}
.lb .kw2 {color: #AD0080;}
.lb .kw3 {color: #008080;}
.lb .co1 {color: #666666; font-style: italic;}
.lb .coMULTI {color: #666666; font-style: italic;}
.lb .es0 {color: #000099; font-weight: bold;}
.lb .br0 {color: #009900;}
.lb .sy1 {color: #339933;}
.lb .st0 {color: #008000;}
.lb .nu0 {color: #FF0000;}
.lb .me0 {color: #004000;}
.lb span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;lb&quot;&gt;offset$&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;vect$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;100&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;100&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
v1$&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;vect$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
v2$&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;vect$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
main.graphicbox1 &lt;span class=&quot;st0&quot;&gt;&amp;quot;line &amp;quot;&lt;/span&gt;;vectAdd$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;offset$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;vectScale$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;v1$&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;span class=&quot;st0&quot;&gt;&amp;quot; &amp;quot;&lt;/span&gt;;vectAdd$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;offset$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;vectScale$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;v2$&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:1 --&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:6:&amp;lt;h2&amp;gt; --&gt;&lt;h2 id=&quot;toc1&quot;&gt;&lt;a name=&quot;Vector 2d library-Console (text mode) demo&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:6 --&gt;Console (text mode) demo&lt;/h2&gt;
 &lt;!-- ws:start:WikiTextCodeRule:2:
&amp;lt;pre class=&amp;quot;lb&amp;quot;&amp;gt;&#039;vector 2d lib demo&amp;lt;br/&amp;gt;&#039;vectors stored as &amp;amp;quot;x y&amp;amp;quot; pairs, (to be splitted by Word$)&amp;lt;br/&amp;gt;&#039;by tsh73, Feb 2013&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&#039;creating a vector&amp;lt;br/&amp;gt;v1$=vect$(3,4)&amp;lt;br/&amp;gt;print &amp;amp;quot;New vector created: &amp;amp;quot;;v1$&amp;lt;br/&amp;gt;print&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&#039;copying a vector. Just assign to string variable&amp;lt;br/&amp;gt;v2$=v1$&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;print &amp;amp;quot;Getting a components of a vector:&amp;amp;quot;&amp;lt;br/&amp;gt;print vectX(v1$)&amp;lt;br/&amp;gt;print vectY(v1$)&amp;lt;br/&amp;gt;print&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;print &amp;amp;quot;Length of a vector:&amp;amp;quot;&amp;lt;br/&amp;gt;print vectLen(v1$)&amp;lt;br/&amp;gt;print&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;print &amp;amp;quot;Unit vector (length=1) with same direction:&amp;amp;quot;&amp;lt;br/&amp;gt;u1$=vectUnit$(v1$)&amp;lt;br/&amp;gt;print u1$&amp;lt;br/&amp;gt;print &amp;amp;quot;and it&#039;s length is (as should be):&amp;amp;quot;&amp;lt;br/&amp;gt;print vectLen(u1$)&amp;lt;br/&amp;gt;print&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;print &amp;amp;quot;Adding vectors&amp;amp;quot;&amp;lt;br/&amp;gt;print &amp;amp;quot;let&#039;s make another vector&amp;amp;quot;&amp;lt;br/&amp;gt;v3$=vect$(1,-2)&amp;lt;br/&amp;gt;print v3$&amp;lt;br/&amp;gt;print &amp;amp;quot;The sum (&amp;amp;quot;;v1$;&amp;amp;quot;) + (&amp;amp;quot;;v3$;&amp;amp;quot;) is&amp;amp;quot;&amp;lt;br/&amp;gt;print vectAdd$(v1$,v3$)&amp;lt;br/&amp;gt;print&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;print &amp;amp;quot;Subtracting same two vectors&amp;amp;quot;&amp;lt;br/&amp;gt;print &amp;amp;quot;(&amp;amp;quot;;v1$;&amp;amp;quot;) - (&amp;amp;quot;;v3$;&amp;amp;quot;) is&amp;amp;quot;&amp;lt;br/&amp;gt;print vectSub$(v1$,v3$)&amp;lt;br/&amp;gt;print&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;print &amp;amp;quot;Dot product of same two vectors&amp;amp;quot;&amp;lt;br/&amp;gt;print &amp;amp;quot;(&amp;amp;quot;;v1$;&amp;amp;quot;)*(&amp;amp;quot;;v3$;&amp;amp;quot;) is&amp;amp;quot;&amp;lt;br/&amp;gt;print vectDotProduct(v1$,v3$)&amp;lt;br/&amp;gt;print &amp;amp;quot;as a side note, it is 0 for perpendicular vectors&amp;amp;quot;&amp;lt;br/&amp;gt;print&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;print &amp;amp;quot;Scaling a vector&amp;amp;quot;&amp;lt;br/&amp;gt;print &amp;amp;quot;by half&amp;amp;quot;&amp;lt;br/&amp;gt;print vectScale$(0.5,v1$)&amp;lt;br/&amp;gt;print &amp;amp;quot;3x&amp;amp;quot;&amp;lt;br/&amp;gt;print vectScale$(3,v1$)&amp;lt;br/&amp;gt;print &amp;amp;quot;reverse vector by multiplying it by -1&amp;amp;quot;&amp;lt;br/&amp;gt;print vectScale$(-1,v1$)&amp;lt;br/&amp;gt;print&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;print &amp;amp;quot;We can decompose any vector into sum &amp;amp;quot;&amp;lt;br/&amp;gt;print &amp;amp;quot;of normal and tangential parts along any direction&amp;amp;quot;&amp;lt;br/&amp;gt;print &amp;amp;quot;First, let&#039;s try along OX axis&amp;amp;quot;&amp;lt;br/&amp;gt;base$ = vect$(1,0)&amp;lt;br/&amp;gt;print &amp;amp;quot;The direction is &amp;amp;quot;; base$&amp;lt;br/&amp;gt;t$=vectTangent$(v1$,base$)&amp;lt;br/&amp;gt;print &amp;amp;quot;Tangential part is &amp;amp;quot;;t$&amp;lt;br/&amp;gt;n$=vectNorm$(v1$,base$)&amp;lt;br/&amp;gt;print &amp;amp;quot;Normal part is &amp;amp;quot;;n$&amp;lt;br/&amp;gt;print &amp;amp;quot;Their sum is &amp;amp;quot;; vectAdd$(t$,n$)&amp;lt;br/&amp;gt;print &amp;amp;quot;(same as initial vector)&amp;amp;quot;&amp;lt;br/&amp;gt;print&amp;lt;br/&amp;gt;print &amp;amp;quot;Now try it with another direction&amp;amp;quot;&amp;lt;br/&amp;gt;base$ = v3$&amp;lt;br/&amp;gt;print &amp;amp;quot;The direction is &amp;amp;quot;; base$&amp;lt;br/&amp;gt;t$=vectTangent$(v1$,base$)&amp;lt;br/&amp;gt;print &amp;amp;quot;Tangential part is &amp;amp;quot;;t$&amp;lt;br/&amp;gt;n$=vectNorm$(v1$,base$)&amp;lt;br/&amp;gt;print &amp;amp;quot;Normal part is &amp;amp;quot;;n$&amp;lt;br/&amp;gt;print &amp;amp;quot;Their sum is &amp;amp;quot;; vectAdd$(t$,n$)&amp;lt;br/&amp;gt;print &amp;amp;quot;(should be same as initial vector)&amp;amp;quot;&amp;lt;br/&amp;gt;print &amp;amp;quot;(Well, you see there is roundoff errors possible)&amp;amp;quot;&amp;lt;br/&amp;gt;print&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;print &amp;amp;quot;Angle between vector and OX axis, radians&amp;amp;quot;&amp;lt;br/&amp;gt;print vectAngle(v1$)&amp;lt;br/&amp;gt;print&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;print &amp;amp;quot;So with length and angle, we can convert to polar coords&amp;amp;quot;&amp;lt;br/&amp;gt;print &amp;amp;quot;Vector &amp;amp;quot;;v1$;&amp;amp;quot; is&amp;amp;quot;&amp;lt;br/&amp;gt;print &amp;amp;quot;Polar radius and angle &amp;amp;quot;&amp;lt;br/&amp;gt;r=vectLen(v1$)&amp;lt;br/&amp;gt;a=vectAngle(v1$)&amp;lt;br/&amp;gt;print r, a&amp;lt;br/&amp;gt;print&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;print &amp;amp;quot;There is a function to convert from polar to cartesian&amp;amp;quot;&amp;lt;br/&amp;gt;print vectFromPolar$(r, a)&amp;lt;br/&amp;gt;print &amp;amp;quot;(should be same as initial vector)&amp;amp;quot;&amp;lt;br/&amp;gt;print &amp;amp;quot;Some other vector: length 7 at angle 60 degrees&amp;amp;quot;&amp;lt;br/&amp;gt;r=7&amp;lt;br/&amp;gt;a=60*acs(-1)/180    &#039;acs(-1)==pi&amp;lt;br/&amp;gt;print vectFromPolar$(r, a)&amp;lt;br/&amp;gt;print&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;print &amp;amp;quot;Rotating vector by arbitrary agle&amp;amp;quot;&amp;lt;br/&amp;gt;print &amp;amp;quot;by 30 degrees&amp;amp;quot;&amp;lt;br/&amp;gt;print vectRotate$(v1$,30*acs(-1)/180)&amp;lt;br/&amp;gt;print &amp;amp;quot;by 90 degrees&amp;amp;quot;&amp;lt;br/&amp;gt;a=90*acs(-1)/180    &#039;acs(-1)==pi, so it&#039;s actually pi/2&amp;lt;br/&amp;gt;print vectRotate$(v1$,a)&amp;lt;br/&amp;gt;print &amp;amp;quot;by -90 degrees&amp;amp;quot;&amp;lt;br/&amp;gt;print vectRotate$(v1$,0-a)  &#039;JB doesn&#039;t allow &amp;amp;quot;-a&amp;amp;quot;&amp;lt;br/&amp;gt;print &amp;amp;quot;by 180 degrees&amp;amp;quot;&amp;lt;br/&amp;gt;print vectRotate$(v1$,180*acs(-1)/180)&amp;lt;br/&amp;gt;print &amp;amp;quot;(Well, easier to myltiply by -1)&amp;amp;quot;&amp;lt;br/&amp;gt;print&amp;lt;br/&amp;gt;print &amp;amp;quot;*That&#039;s all, folks.*&amp;amp;quot;&amp;lt;br/&amp;gt;end&amp;lt;br/&amp;gt;&#039;=================================&amp;lt;br/&amp;gt;&#039;vector 2d lib&amp;lt;br/&amp;gt;&#039;vectors as &amp;amp;quot;x y&amp;amp;quot; pairs, to be splitted by Word$&amp;lt;br/&amp;gt;&#039;by tsh73, Feb 2013&amp;lt;br/&amp;gt;function vect$(x,y)&amp;lt;br/&amp;gt;    vect$=x;&amp;amp;quot; &amp;amp;quot;;y&amp;lt;br/&amp;gt;end function&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;function vectX(v$)&amp;lt;br/&amp;gt;    vectX=val(word$(v$,1))&amp;lt;br/&amp;gt;end function&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;function vectY(v$)&amp;lt;br/&amp;gt;    vectY=val(word$(v$,2))&amp;lt;br/&amp;gt;end function&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;function vectLen(v$)&amp;lt;br/&amp;gt;    x=val(word$(v$,1))&amp;lt;br/&amp;gt;    y=val(word$(v$,2))&amp;lt;br/&amp;gt;    vectLen=sqr(x*x+y*y)&amp;lt;br/&amp;gt;end function&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;function vectUnit$(v$)&amp;lt;br/&amp;gt;    x=val(word$(v$,1))&amp;lt;br/&amp;gt;    y=val(word$(v$,2))&amp;lt;br/&amp;gt;    vectLen=sqr(x*x+y*y)&amp;lt;br/&amp;gt;    vectUnit$=x/vectLen;&amp;amp;quot; &amp;amp;quot;;y/vectLen&amp;lt;br/&amp;gt;end function&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;function vectAdd$(v1$,v2$)&amp;lt;br/&amp;gt;    x1=val(word$(v1$,1))&amp;lt;br/&amp;gt;    y1=val(word$(v1$,2))&amp;lt;br/&amp;gt;    x2=val(word$(v2$,1))&amp;lt;br/&amp;gt;    y2=val(word$(v2$,2))&amp;lt;br/&amp;gt;    vectAdd$=x1+x2;&amp;amp;quot; &amp;amp;quot;;y1+y2&amp;lt;br/&amp;gt;end function&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;function vectSub$(v1$,v2$)&amp;lt;br/&amp;gt;    x1=val(word$(v1$,1))&amp;lt;br/&amp;gt;    y1=val(word$(v1$,2))&amp;lt;br/&amp;gt;    x2=val(word$(v2$,1))&amp;lt;br/&amp;gt;    y2=val(word$(v2$,2))&amp;lt;br/&amp;gt;    vectSub$=x1-x2;&amp;amp;quot; &amp;amp;quot;;y1-y2&amp;lt;br/&amp;gt;end function&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;function vectDotProduct(v1$,v2$)&amp;lt;br/&amp;gt;    x1=val(word$(v1$,1))&amp;lt;br/&amp;gt;    y1=val(word$(v1$,2))&amp;lt;br/&amp;gt;    x2=val(word$(v2$,1))&amp;lt;br/&amp;gt;    y2=val(word$(v2$,2))&amp;lt;br/&amp;gt;    vectDotProduct=x1*x2+y1*y2&amp;lt;br/&amp;gt;end function&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;function vectScale$(a,v$)   &#039;a * vector v$&amp;lt;br/&amp;gt;    x=val(word$(v$,1))&amp;lt;br/&amp;gt;    y=val(word$(v$,2))&amp;lt;br/&amp;gt;    vectScale$=a*x;&amp;amp;quot; &amp;amp;quot;;a*y&amp;lt;br/&amp;gt;end function&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;function vectTangent$(v$,base$)&amp;lt;br/&amp;gt;    n$=vectUnit$(base$)&amp;lt;br/&amp;gt;    vectTangent$=vectScale$(vectDotProduct(n$,v$),n$)&amp;lt;br/&amp;gt;end function&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;function vectNorm$(v$,base$)&amp;lt;br/&amp;gt;    vectNorm$=vectSub$(v$,vectTangent$(v$,base$))&amp;lt;br/&amp;gt;end function&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;function vectAngle(v$)&amp;lt;br/&amp;gt;    x=val(word$(v$,1))&amp;lt;br/&amp;gt;    y=val(word$(v$,2))&amp;lt;br/&amp;gt;    vectAngle=atan2(y,x)&amp;lt;br/&amp;gt;end function&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;function vectFromPolar$(rho, phi)&amp;lt;br/&amp;gt;    vectFromPolar$=rho*cos(phi);&amp;amp;quot; &amp;amp;quot;;rho*sin(phi)&amp;lt;br/&amp;gt;end function&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;function vectRotate$(v$,alpha)&amp;lt;br/&amp;gt;    x=val(word$(v$,1))&amp;lt;br/&amp;gt;    y=val(word$(v$,2))&amp;lt;br/&amp;gt;    rho=sqr(x*x+y*y)&amp;lt;br/&amp;gt;    phi=atan2(y,x)+alpha&amp;lt;br/&amp;gt;    vectRotate$=rho*cos(phi);&amp;amp;quot; &amp;amp;quot;;rho*sin(phi)&amp;lt;br/&amp;gt;end function&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;function dePi$(x)   &#039;pure aestetics&amp;lt;br/&amp;gt;    pi = acs(-1)&amp;lt;br/&amp;gt;    dePi$=x/pi;&amp;amp;quot;Pi&amp;amp;quot;&amp;lt;br/&amp;gt;end function&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&#039;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;-&amp;lt;br/&amp;gt;function atan2(y,x)&amp;lt;br/&amp;gt;    pi = acs(-1)    &#039;could be made global to save some ticks&amp;lt;br/&amp;gt;    if x &amp;amp;lt;&amp;amp;gt; 0 then arctan = atn(y/x)&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;    select case&amp;lt;br/&amp;gt;        case x &amp;amp;gt; 0&amp;lt;br/&amp;gt;        atan2 = arctan&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;        case y&amp;amp;gt;=0 and x&amp;amp;lt;0&amp;lt;br/&amp;gt;        atan2 = pi + arctan&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;        case y&amp;amp;lt;0 and x&amp;amp;lt;0&amp;lt;br/&amp;gt;        atan2 = arctan - pi&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;        case y&amp;amp;gt;0 and x=0&amp;lt;br/&amp;gt;        atan2 = pi / 2&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;        case y&amp;amp;lt;0 and x=0&amp;lt;br/&amp;gt;        atan2 = pi / -2&amp;lt;br/&amp;gt;    end select&amp;lt;br/&amp;gt;end function&amp;lt;br/&amp;gt;&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.lb  {font-family:monospace;}
.lb .imp {font-weight: bold; color: red;}
.lb .kw1 {color: #0000FF;}
.lb .kw2 {color: #AD0080;}
.lb .kw3 {color: #008080;}
.lb .co1 {color: #666666; font-style: italic;}
.lb .coMULTI {color: #666666; font-style: italic;}
.lb .es0 {color: #000099; font-weight: bold;}
.lb .br0 {color: #009900;}
.lb .sy1 {color: #339933;}
.lb .st0 {color: #008000;}
.lb .nu0 {color: #FF0000;}
.lb .me0 {color: #004000;}
.lb span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;lb&quot;&gt;&lt;span class=&quot;co1&quot;&gt;&#039;vector 2d lib demo&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;&#039;vectors stored as &amp;quot;x y&amp;quot; pairs, (to be splitted by Word$)&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;&#039;by tsh73, Feb 2013&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;co1&quot;&gt;&#039;creating a vector&lt;/span&gt;
v1$&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;vect$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;New vector created: &amp;quot;&lt;/span&gt;;v1$
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;co1&quot;&gt;&#039;copying a vector. Just assign to string variable&lt;/span&gt;
v2$&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;v1$
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Getting a components of a vector:&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; vectX&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v1$&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; vectY&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v1$&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Length of a vector:&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; vectLen&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v1$&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Unit vector (length=1) with same direction:&amp;quot;&lt;/span&gt;
u1$&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;vectUnit$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v1$&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; u1$
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;and it&#039;s length is (as should be):&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; vectLen&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;u1$&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Adding vectors&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;let&#039;s make another vector&amp;quot;&lt;/span&gt;
v3$&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;vect$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,-&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; v3$
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;The sum (&amp;quot;&lt;/span&gt;;v1$;&lt;span class=&quot;st0&quot;&gt;&amp;quot;) + (&amp;quot;&lt;/span&gt;;v3$;&lt;span class=&quot;st0&quot;&gt;&amp;quot;) is&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; vectAdd$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v1$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;v3$&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Subtracting same two vectors&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;(&amp;quot;&lt;/span&gt;;v1$;&lt;span class=&quot;st0&quot;&gt;&amp;quot;) - (&amp;quot;&lt;/span&gt;;v3$;&lt;span class=&quot;st0&quot;&gt;&amp;quot;) is&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; vectSub$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v1$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;v3$&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Dot product of same two vectors&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;(&amp;quot;&lt;/span&gt;;v1$;&lt;span class=&quot;st0&quot;&gt;&amp;quot;)*(&amp;quot;&lt;/span&gt;;v3$;&lt;span class=&quot;st0&quot;&gt;&amp;quot;) is&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; vectDotProduct&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v1$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;v3$&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;as a side note, it is 0 for perpendicular vectors&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Scaling a vector&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;by half&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; vectScale$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0.5&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;v1$&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;3x&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; vectScale$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;v1$&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;reverse vector by multiplying it by -1&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; vectScale$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;v1$&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;We can decompose any vector into sum &amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;of normal and tangential parts along any direction&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;First, let&#039;s try along OX axis&amp;quot;&lt;/span&gt;
base$ &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; vect$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;The direction is &amp;quot;&lt;/span&gt;; base$
t$&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;vectTangent$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v1$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;base$&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Tangential part is &amp;quot;&lt;/span&gt;;t$
n$&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;vectNorm$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v1$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;base$&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Normal part is &amp;quot;&lt;/span&gt;;n$
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Their sum is &amp;quot;&lt;/span&gt;; vectAdd$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;t$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;n$&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;(same as initial vector)&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Now try it with another direction&amp;quot;&lt;/span&gt;
base$ &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; v3$
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;The direction is &amp;quot;&lt;/span&gt;; base$
t$&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;vectTangent$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v1$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;base$&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Tangential part is &amp;quot;&lt;/span&gt;;t$
n$&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;vectNorm$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v1$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;base$&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Normal part is &amp;quot;&lt;/span&gt;;n$
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Their sum is &amp;quot;&lt;/span&gt;; vectAdd$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;t$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;n$&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;(should be same as initial vector)&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;(Well, you see there is roundoff errors possible)&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Angle between vector and OX axis, radians&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; vectAngle&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v1$&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;So with length and angle, we can convert to polar coords&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Vector &amp;quot;&lt;/span&gt;;v1$;&lt;span class=&quot;st0&quot;&gt;&amp;quot; is&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Polar radius and angle &amp;quot;&lt;/span&gt;
r&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;vectLen&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v1$&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
a&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;vectAngle&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v1$&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; r&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; a
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;There is a function to convert from polar to cartesian&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; vectFromPolar$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;r&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; a&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;(should be same as initial vector)&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Some other vector: length 7 at angle 60 degrees&amp;quot;&lt;/span&gt;
r&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;7&lt;/span&gt;
a&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;60&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;acs&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;180&lt;/span&gt;    &lt;span class=&quot;co1&quot;&gt;&#039;acs(-1)==pi&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; vectFromPolar$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;r&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; a&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Rotating vector by arbitrary agle&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;by 30 degrees&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; vectRotate$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v1$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;30&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;acs&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;180&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;by 90 degrees&amp;quot;&lt;/span&gt;
a&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;90&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;acs&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;180&lt;/span&gt;    &lt;span class=&quot;co1&quot;&gt;&#039;acs(-1)==pi, so it&#039;s actually pi/2&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; vectRotate$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v1$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;a&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;by -90 degrees&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; vectRotate$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v1$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;a&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;  &lt;span class=&quot;co1&quot;&gt;&#039;JB doesn&#039;t allow &amp;quot;-a&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;by 180 degrees&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; vectRotate$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v1$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;180&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;acs&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;180&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;(Well, easier to myltiply by -1)&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;*That&#039;s all, folks.*&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;end&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;&#039;=================================&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;&#039;vector 2d lib&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;&#039;vectors as &amp;quot;x y&amp;quot; pairs, to be splitted by Word$&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;&#039;by tsh73, Feb 2013&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;function&lt;/span&gt; vect$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;y&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    vect$&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;x;&lt;span class=&quot;st0&quot;&gt;&amp;quot; &amp;quot;&lt;/span&gt;;y
&lt;span class=&quot;kw1&quot;&gt;end&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;function&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;function&lt;/span&gt; vectX&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v$&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    vectX&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;val&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;word&lt;/span&gt;$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;end&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;function&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;function&lt;/span&gt; vectY&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v$&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    vectY&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;val&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;word&lt;/span&gt;$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;end&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;function&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;function&lt;/span&gt; vectLen&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v$&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    x&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;val&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;word&lt;/span&gt;$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    y&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;val&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;word&lt;/span&gt;$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    vectLen&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;sqr&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;+&lt;/span&gt;y&lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;y&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;end&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;function&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;function&lt;/span&gt; vectUnit$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v$&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    x&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;val&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;word&lt;/span&gt;$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    y&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;val&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;word&lt;/span&gt;$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    vectLen&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;sqr&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;+&lt;/span&gt;y&lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;y&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    vectUnit$&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;vectLen;&lt;span class=&quot;st0&quot;&gt;&amp;quot; &amp;quot;&lt;/span&gt;;y&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;vectLen
&lt;span class=&quot;kw1&quot;&gt;end&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;function&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;function&lt;/span&gt; vectAdd$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v1$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;v2$&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    x1&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;val&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;word&lt;/span&gt;$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v1$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    y1&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;val&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;word&lt;/span&gt;$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v1$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    x2&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;val&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;word&lt;/span&gt;$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v2$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    y2&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;val&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;word&lt;/span&gt;$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v2$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    vectAdd$&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;x1&lt;span class=&quot;sy0&quot;&gt;+&lt;/span&gt;x2;&lt;span class=&quot;st0&quot;&gt;&amp;quot; &amp;quot;&lt;/span&gt;;y1&lt;span class=&quot;sy0&quot;&gt;+&lt;/span&gt;y2
&lt;span class=&quot;kw1&quot;&gt;end&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;function&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;function&lt;/span&gt; vectSub$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v1$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;v2$&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    x1&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;val&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;word&lt;/span&gt;$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v1$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    y1&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;val&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;word&lt;/span&gt;$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v1$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    x2&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;val&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;word&lt;/span&gt;$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v2$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    y2&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;val&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;word&lt;/span&gt;$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v2$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    vectSub$&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;x1&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;x2;&lt;span class=&quot;st0&quot;&gt;&amp;quot; &amp;quot;&lt;/span&gt;;y1&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;y2
&lt;span class=&quot;kw1&quot;&gt;end&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;function&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;function&lt;/span&gt; vectDotProduct&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v1$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;v2$&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    x1&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;val&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;word&lt;/span&gt;$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v1$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    y1&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;val&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;word&lt;/span&gt;$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v1$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    x2&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;val&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;word&lt;/span&gt;$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v2$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    y2&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;val&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;word&lt;/span&gt;$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v2$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    vectDotProduct&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;x1&lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;x2&lt;span class=&quot;sy0&quot;&gt;+&lt;/span&gt;y1&lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;y2
&lt;span class=&quot;kw1&quot;&gt;end&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;function&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;function&lt;/span&gt; vectScale$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;a&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;v$&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;   &lt;span class=&quot;co1&quot;&gt;&#039;a * vector v$&lt;/span&gt;
    x&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;val&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;word&lt;/span&gt;$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    y&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;val&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;word&lt;/span&gt;$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    vectScale$&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;a&lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;x;&lt;span class=&quot;st0&quot;&gt;&amp;quot; &amp;quot;&lt;/span&gt;;a&lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;y
&lt;span class=&quot;kw1&quot;&gt;end&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;function&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;function&lt;/span&gt; vectTangent$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;base$&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    n$&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;vectUnit$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;base$&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    vectTangent$&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;vectScale$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;vectDotProduct&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;n$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;v$&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;n$&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;end&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;function&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;function&lt;/span&gt; vectNorm$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;base$&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    vectNorm$&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;vectSub$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;vectTangent$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;base$&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;end&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;function&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;function&lt;/span&gt; vectAngle&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v$&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    x&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;val&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;word&lt;/span&gt;$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    y&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;val&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;word&lt;/span&gt;$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    vectAngle&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;atan2&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;y&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;end&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;function&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;function&lt;/span&gt; vectFromPolar$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;rho&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; phi&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    vectFromPolar$&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;rho&lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;cos&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;phi&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;span class=&quot;st0&quot;&gt;&amp;quot; &amp;quot;&lt;/span&gt;;rho&lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;sin&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;phi&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;end&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;function&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;function&lt;/span&gt; vectRotate$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;alpha&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    x&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;val&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;word&lt;/span&gt;$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    y&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;val&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;word&lt;/span&gt;$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    rho&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;sqr&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;+&lt;/span&gt;y&lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;y&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    phi&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;atan2&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;y&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;+&lt;/span&gt;alpha
    vectRotate$&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;rho&lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;cos&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;phi&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;span class=&quot;st0&quot;&gt;&amp;quot; &amp;quot;&lt;/span&gt;;rho&lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;sin&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;phi&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;end&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;function&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;function&lt;/span&gt; dePi$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;x&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;   &lt;span class=&quot;co1&quot;&gt;&#039;pure aestetics&lt;/span&gt;
    pi &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;acs&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    dePi$&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;pi;&lt;span class=&quot;st0&quot;&gt;&amp;quot;Pi&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;end&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;function&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;co1&quot;&gt;&#039;---------------------------&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;function&lt;/span&gt; atan2&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;y&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    pi &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;acs&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;    &lt;span class=&quot;co1&quot;&gt;&#039;could be made global to save some ticks&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; x &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt; arctan &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;atn&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;y&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;x&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;kw1&quot;&gt;select&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;case&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;case&lt;/span&gt; x &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;
        atan2 &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; arctan
&amp;nbsp;
        &lt;span class=&quot;kw1&quot;&gt;case&lt;/span&gt; y&lt;span class=&quot;sy0&quot;&gt;&amp;gt;=&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;and&lt;/span&gt; x&lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;
        atan2 &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; pi &lt;span class=&quot;sy0&quot;&gt;+&lt;/span&gt; arctan
&amp;nbsp;
        &lt;span class=&quot;kw1&quot;&gt;case&lt;/span&gt; y&lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;and&lt;/span&gt; x&lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;
        atan2 &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; arctan &lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt; pi
&amp;nbsp;
        &lt;span class=&quot;kw1&quot;&gt;case&lt;/span&gt; y&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;and&lt;/span&gt; x&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;
        atan2 &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; pi &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;
&amp;nbsp;
        &lt;span class=&quot;kw1&quot;&gt;case&lt;/span&gt; y&lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;and&lt;/span&gt; x&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;
        atan2 &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; pi &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;end&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;select&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;end&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;function&lt;/span&gt;
&amp;nbsp;&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:2 --&gt;&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:8:&amp;lt;h2&amp;gt; --&gt;&lt;h2 id=&quot;toc2&quot;&gt;&lt;a name=&quot;Vector 2d library-Same demo but with graphics&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:8 --&gt;Same demo but with graphics&lt;/h2&gt;
 &lt;!-- ws:start:WikiTextCodeRule:3:
&amp;lt;pre class=&amp;quot;lb&amp;quot;&amp;gt;&#039;vector 2d lib demo&amp;lt;br/&amp;gt;&#039; - Graphic part&amp;lt;br/&amp;gt;&#039;by tsh73, Feb 2013&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;global offset$, scale&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&#039;window and instructions&amp;lt;br/&amp;gt;gosub [initWindow]&amp;lt;br/&amp;gt;call waitClick&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&#039;creating a vector&amp;lt;br/&amp;gt;v1$=vect$(3,4)&amp;lt;br/&amp;gt;print &amp;amp;quot;New vector created: &amp;amp;quot;;v1$&amp;lt;br/&amp;gt;print&amp;lt;br/&amp;gt;&#039;   drawing part&amp;lt;br/&amp;gt;gosub [axes]&amp;lt;br/&amp;gt;call drawVector v1$&amp;lt;br/&amp;gt;call waitClick&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&#039;copying a vector. Just assign to string variable&amp;lt;br/&amp;gt;v2$=v1$&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;print &amp;amp;quot;Getting a components of a vector:&amp;amp;quot;&amp;lt;br/&amp;gt;print vectX(v1$)&amp;lt;br/&amp;gt;print vectY(v1$)&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;#gr &amp;amp;quot;color green&amp;amp;quot;&amp;lt;br/&amp;gt;call drawVector vect$(vectX(v1$), 0)&amp;lt;br/&amp;gt;#gr &amp;amp;quot;color blue&amp;amp;quot;&amp;lt;br/&amp;gt;call drawVector vect$(0, vectY(v1$))&amp;lt;br/&amp;gt;call waitClick&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;print &amp;amp;quot;Length of a vector:&amp;amp;quot;&amp;lt;br/&amp;gt;print vectLen(v1$)&amp;lt;br/&amp;gt;print&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;print &amp;amp;quot;Unit vector (length=1) with same direction:&amp;amp;quot;&amp;lt;br/&amp;gt;u1$=vectUnit$(v1$)&amp;lt;br/&amp;gt;print u1$&amp;lt;br/&amp;gt;print &amp;amp;quot;and it&#039;s length is (as should be):&amp;amp;quot;&amp;lt;br/&amp;gt;print vectLen(u1$)&amp;lt;br/&amp;gt;print&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;#gr &amp;amp;quot;color cyan&amp;amp;quot;&amp;lt;br/&amp;gt;call drawVector u1$&amp;lt;br/&amp;gt;call waitClick&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;print &amp;amp;quot;Adding vectors&amp;amp;quot;&amp;lt;br/&amp;gt;print &amp;amp;quot;let&#039;s make another vector&amp;amp;quot;&amp;lt;br/&amp;gt;v3$=vect$(1,-2)&amp;lt;br/&amp;gt;print v3$&amp;lt;br/&amp;gt;print &amp;amp;quot;The sum (&amp;amp;quot;;v1$;&amp;amp;quot;) + (&amp;amp;quot;;v3$;&amp;amp;quot;) is&amp;amp;quot;&amp;lt;br/&amp;gt;print vectAdd$(v1$,v3$)&amp;lt;br/&amp;gt;print&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;gosub [axes]&amp;lt;br/&amp;gt;call drawVector v1$&amp;lt;br/&amp;gt;#gr &amp;amp;quot;color green&amp;amp;quot;&amp;lt;br/&amp;gt;call drawVector v3$&amp;lt;br/&amp;gt;#gr &amp;amp;quot;color blue&amp;amp;quot;&amp;lt;br/&amp;gt;call waitClick&amp;lt;br/&amp;gt;call drawVector vectAdd$(v1$,v3$)&amp;lt;br/&amp;gt;call waitClick&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;print &amp;amp;quot;Subtracting same two vectors&amp;amp;quot;&amp;lt;br/&amp;gt;print &amp;amp;quot;(&amp;amp;quot;;v1$;&amp;amp;quot;) - (&amp;amp;quot;;v3$;&amp;amp;quot;) is&amp;amp;quot;&amp;lt;br/&amp;gt;print vectSub$(v1$,v3$)&amp;lt;br/&amp;gt;print&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;gosub [axes]&amp;lt;br/&amp;gt;call drawVector v1$&amp;lt;br/&amp;gt;#gr &amp;amp;quot;color green&amp;amp;quot;&amp;lt;br/&amp;gt;call drawVector v3$&amp;lt;br/&amp;gt;call waitClick&amp;lt;br/&amp;gt;#gr &amp;amp;quot;color blue&amp;amp;quot;&amp;lt;br/&amp;gt;call drawVector vectSub$(v1$,v3$)&amp;lt;br/&amp;gt;call waitClick&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;print &amp;amp;quot;Dot product of same two vectors&amp;amp;quot;&amp;lt;br/&amp;gt;print &amp;amp;quot;(&amp;amp;quot;;v1$;&amp;amp;quot;)*(&amp;amp;quot;;v3$;&amp;amp;quot;) is&amp;amp;quot;&amp;lt;br/&amp;gt;print vectDotProduct(v1$,v3$)&amp;lt;br/&amp;gt;print &amp;amp;quot;as a side note, it is 0 for perpendicular vectors&amp;amp;quot;&amp;lt;br/&amp;gt;print&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;print &amp;amp;quot;Scaling a vector&amp;amp;quot;&amp;lt;br/&amp;gt;print &amp;amp;quot;by half&amp;amp;quot;&amp;lt;br/&amp;gt;print vectScale$(0.5,v1$)&amp;lt;br/&amp;gt;print &amp;amp;quot;3x&amp;amp;quot;&amp;lt;br/&amp;gt;print vectScale$(3,v1$)&amp;lt;br/&amp;gt;print &amp;amp;quot;reverse vector by multiplying it by -1&amp;amp;quot;&amp;lt;br/&amp;gt;print vectScale$(-1,v1$)&amp;lt;br/&amp;gt;print&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;gosub [axes]&amp;lt;br/&amp;gt;call drawVector v1$&amp;lt;br/&amp;gt;#gr &amp;amp;quot;color green&amp;amp;quot;&amp;lt;br/&amp;gt;#gr &amp;amp;quot;size 3&amp;amp;quot;&amp;lt;br/&amp;gt;call drawVector vectScale$(0.5,v1$)&amp;lt;br/&amp;gt;call waitClick&amp;lt;br/&amp;gt;#gr &amp;amp;quot;color blue&amp;amp;quot;&amp;lt;br/&amp;gt;#gr &amp;amp;quot;size 1&amp;amp;quot;&amp;lt;br/&amp;gt;call drawVector vectScale$(3,v1$)&amp;lt;br/&amp;gt;call waitClick&amp;lt;br/&amp;gt;#gr &amp;amp;quot;color cyan&amp;amp;quot;&amp;lt;br/&amp;gt;#gr &amp;amp;quot;size 2&amp;amp;quot;&amp;lt;br/&amp;gt;call drawVector vectScale$(-1,v1$)&amp;lt;br/&amp;gt;call waitClick&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;print &amp;amp;quot;We can decompose any vector into sum &amp;amp;quot;&amp;lt;br/&amp;gt;print &amp;amp;quot;of normal and tangential parts along any direction&amp;amp;quot;&amp;lt;br/&amp;gt;print &amp;amp;quot;First, let&#039;s try along OX axis&amp;amp;quot;&amp;lt;br/&amp;gt;base$ = vect$(1,0)&amp;lt;br/&amp;gt;print &amp;amp;quot;The direction is &amp;amp;quot;; base$&amp;lt;br/&amp;gt;t$=vectTangent$(v1$,base$)&amp;lt;br/&amp;gt;print &amp;amp;quot;Tangential part is &amp;amp;quot;;t$&amp;lt;br/&amp;gt;n$=vectNorm$(v1$,base$)&amp;lt;br/&amp;gt;print &amp;amp;quot;Normal part is &amp;amp;quot;;n$&amp;lt;br/&amp;gt;print &amp;amp;quot;Their sum is &amp;amp;quot;; vectAdd$(t$,n$)&amp;lt;br/&amp;gt;print &amp;amp;quot;(same as initial vector)&amp;amp;quot;&amp;lt;br/&amp;gt;print&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;gosub [axes]&amp;lt;br/&amp;gt;call drawVector v1$&amp;lt;br/&amp;gt;#gr &amp;amp;quot;size 4&amp;amp;quot;&amp;lt;br/&amp;gt;#gr &amp;amp;quot;color cyan&amp;amp;quot;&amp;lt;br/&amp;gt;call drawVector base$&amp;lt;br/&amp;gt;call waitClick&amp;lt;br/&amp;gt;#gr &amp;amp;quot;size 2&amp;amp;quot;&amp;lt;br/&amp;gt;#gr &amp;amp;quot;color blue&amp;amp;quot;&amp;lt;br/&amp;gt;call drawVector t$&amp;lt;br/&amp;gt;call waitClick&amp;lt;br/&amp;gt;#gr &amp;amp;quot;color green&amp;amp;quot;&amp;lt;br/&amp;gt;call drawVector n$&amp;lt;br/&amp;gt;call waitClick&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;print &amp;amp;quot;Now try it with another direction&amp;amp;quot;&amp;lt;br/&amp;gt;base$ = v3$&amp;lt;br/&amp;gt;print &amp;amp;quot;The direction is &amp;amp;quot;; base$&amp;lt;br/&amp;gt;t$=vectTangent$(v1$,base$)&amp;lt;br/&amp;gt;print &amp;amp;quot;Tangential part is &amp;amp;quot;;t$&amp;lt;br/&amp;gt;n$=vectNorm$(v1$,base$)&amp;lt;br/&amp;gt;print &amp;amp;quot;Normal part is &amp;amp;quot;;n$&amp;lt;br/&amp;gt;print &amp;amp;quot;Their sum is &amp;amp;quot;; vectAdd$(t$,n$)&amp;lt;br/&amp;gt;print &amp;amp;quot;(should be same as initial vector)&amp;amp;quot;&amp;lt;br/&amp;gt;print &amp;amp;quot;(Well, you see there is roundoff errors possible)&amp;amp;quot;&amp;lt;br/&amp;gt;print&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;gosub [axes]&amp;lt;br/&amp;gt;call drawVector v1$&amp;lt;br/&amp;gt;#gr &amp;amp;quot;size 4&amp;amp;quot;&amp;lt;br/&amp;gt;#gr &amp;amp;quot;color cyan&amp;amp;quot;&amp;lt;br/&amp;gt;call drawVector base$&amp;lt;br/&amp;gt;call waitClick&amp;lt;br/&amp;gt;#gr &amp;amp;quot;size 2&amp;amp;quot;&amp;lt;br/&amp;gt;#gr &amp;amp;quot;color blue&amp;amp;quot;&amp;lt;br/&amp;gt;call drawVector t$&amp;lt;br/&amp;gt;call waitClick&amp;lt;br/&amp;gt;#gr &amp;amp;quot;color green&amp;amp;quot;&amp;lt;br/&amp;gt;call drawVector n$&amp;lt;br/&amp;gt;call waitClick&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;print &amp;amp;quot;Angle between vector and OX axis, radians&amp;amp;quot;&amp;lt;br/&amp;gt;print vectAngle(v1$)&amp;lt;br/&amp;gt;print&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;print &amp;amp;quot;So with length and angle, we can convert to polar coords&amp;amp;quot;&amp;lt;br/&amp;gt;print &amp;amp;quot;Vector &amp;amp;quot;;v1$;&amp;amp;quot; is&amp;amp;quot;&amp;lt;br/&amp;gt;print &amp;amp;quot;Polar radius and angle &amp;amp;quot;&amp;lt;br/&amp;gt;r=vectLen(v1$)&amp;lt;br/&amp;gt;a=vectAngle(v1$)&amp;lt;br/&amp;gt;print r, a&amp;lt;br/&amp;gt;print&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;print &amp;amp;quot;There is a function to convert from polar to cartesian&amp;amp;quot;&amp;lt;br/&amp;gt;print vectFromPolar$(r, a)&amp;lt;br/&amp;gt;print &amp;amp;quot;(should be same as initial vector)&amp;amp;quot;&amp;lt;br/&amp;gt;print &amp;amp;quot;Some other vector: length 7 at angle 60 degrees&amp;amp;quot;&amp;lt;br/&amp;gt;r=7&amp;lt;br/&amp;gt;a=60*acs(-1)/180    &#039;acs(-1)==pi&amp;lt;br/&amp;gt;print vectFromPolar$(r, a)&amp;lt;br/&amp;gt;print&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;gosub [axes]&amp;lt;br/&amp;gt;call drawVector v1$&amp;lt;br/&amp;gt;call waitClick&amp;lt;br/&amp;gt;#gr &amp;amp;quot;color blue&amp;amp;quot;&amp;lt;br/&amp;gt;call drawVector vectFromPolar$(r, a)&amp;lt;br/&amp;gt;call waitClick&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;print &amp;amp;quot;Rotating vector by arbitrary agle&amp;amp;quot;&amp;lt;br/&amp;gt;print &amp;amp;quot;by 30 degrees&amp;amp;quot;&amp;lt;br/&amp;gt;print vectRotate$(v1$,30*acs(-1)/180)&amp;lt;br/&amp;gt;print &amp;amp;quot;by 90 degrees&amp;amp;quot;&amp;lt;br/&amp;gt;a=90*acs(-1)/180    &#039;acs(-1)==pi, so it&#039;s actually pi/2&amp;lt;br/&amp;gt;print vectRotate$(v1$,a)&amp;lt;br/&amp;gt;print &amp;amp;quot;by -90 degrees&amp;amp;quot;&amp;lt;br/&amp;gt;print vectRotate$(v1$,0-a)  &#039;JB doesn&#039;t allow &amp;amp;quot;-a&amp;amp;quot;&amp;lt;br/&amp;gt;print &amp;amp;quot;by 180 degrees&amp;amp;quot;&amp;lt;br/&amp;gt;print vectRotate$(v1$,180*acs(-1)/180)&amp;lt;br/&amp;gt;print &amp;amp;quot;(Well, easier to myltiply by -1)&amp;amp;quot;&amp;lt;br/&amp;gt;print&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;gosub [axes]&amp;lt;br/&amp;gt;call drawVector v1$&amp;lt;br/&amp;gt;#gr &amp;amp;quot;color green&amp;amp;quot;&amp;lt;br/&amp;gt;call drawVector vectRotate$(v1$,30*acs(-1)/180)&amp;lt;br/&amp;gt;call waitClick&amp;lt;br/&amp;gt;#gr &amp;amp;quot;color blue&amp;amp;quot;&amp;lt;br/&amp;gt;call drawVector vectRotate$(v1$,a)&amp;lt;br/&amp;gt;call waitClick&amp;lt;br/&amp;gt;#gr &amp;amp;quot;color cyan&amp;amp;quot;&amp;lt;br/&amp;gt;call drawVector vectRotate$(v1$,0-a)&amp;lt;br/&amp;gt;call waitClick&amp;lt;br/&amp;gt;#gr &amp;amp;quot;color black&amp;amp;quot;&amp;lt;br/&amp;gt;call drawVector vectRotate$(v1$,180*acs(-1)/180)&amp;lt;br/&amp;gt;call waitClick&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;#gr &amp;amp;quot;place 70 200&amp;amp;quot;&amp;lt;br/&amp;gt;#gr &amp;amp;quot;\&amp;amp;quot;;&amp;amp;quot;*That&#039;s all, folks.*&amp;amp;quot;&amp;lt;br/&amp;gt;print &amp;amp;quot;*That&#039;s all, folks.*&amp;amp;quot;&amp;lt;br/&amp;gt;wait&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&#039;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;-&amp;lt;br/&amp;gt;&#039;parts related to graphic part of the demo&amp;lt;br/&amp;gt;[initWindow]&amp;lt;br/&amp;gt;    UpperLeftX = 1&amp;lt;br/&amp;gt;    UpperLeftY = 1&amp;lt;br/&amp;gt;    WindowWidth = 400&amp;lt;br/&amp;gt;    WindowHeight = 400&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;    open &amp;amp;quot;Vector demo&amp;amp;quot; for graphics_nsb_nf as #gr&amp;lt;br/&amp;gt;    #gr &amp;amp;quot;trapclose [quit]&amp;amp;quot;&amp;lt;br/&amp;gt;    #gr &amp;amp;quot;home; down; posxy cx cy&amp;amp;quot;&amp;lt;br/&amp;gt;    &#039;print cx, cy&amp;lt;br/&amp;gt;    offset$ = vect$(cx, cy)&amp;lt;br/&amp;gt;    scale = 20&amp;lt;br/&amp;gt;    #gr &amp;amp;quot;place 70, 120&amp;amp;quot;&amp;lt;br/&amp;gt;    #gr &amp;amp;quot;\&amp;amp;quot;;&amp;amp;quot;Please align this window&amp;amp;quot;&amp;lt;br/&amp;gt;    #gr &amp;amp;quot;\&amp;amp;quot;;&amp;amp;quot;along with mainwin (console).&amp;amp;quot;&amp;lt;br/&amp;gt;    #gr &amp;amp;quot;\&amp;amp;quot;;&amp;amp;quot;It will print stuff to mainwin, &amp;amp;quot;&amp;lt;br/&amp;gt;    #gr &amp;amp;quot;\&amp;amp;quot;;&amp;amp;quot;while drawing in this window.&amp;amp;quot;&amp;lt;br/&amp;gt;    #gr &amp;amp;quot;\&amp;amp;quot;;&amp;amp;quot;&amp;amp;quot;&amp;lt;br/&amp;gt;    #gr &amp;amp;quot;\&amp;amp;quot;;&amp;amp;quot;Use left mouse button click&amp;amp;quot;&amp;lt;br/&amp;gt;    #gr &amp;amp;quot;\&amp;amp;quot;;&amp;amp;quot;to advance.&amp;amp;quot;&amp;lt;br/&amp;gt;return&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;sub waitClick&amp;lt;br/&amp;gt;    #gr &amp;amp;quot;flush&amp;amp;quot;&amp;lt;br/&amp;gt;    #gr &amp;amp;quot;when leftButtonDown [cont]&amp;amp;quot;&amp;lt;br/&amp;gt;    wait&amp;lt;br/&amp;gt;[cont]&amp;lt;br/&amp;gt;    #gr &amp;amp;quot;when leftButtonDown&amp;amp;quot;&amp;lt;br/&amp;gt;    exit sub&amp;lt;br/&amp;gt;[quit] &#039;and we could close while waiting&amp;lt;br/&amp;gt;    close #gr&amp;lt;br/&amp;gt;    print &amp;amp;quot;*program ended, you can close this window*&amp;amp;quot;&amp;lt;br/&amp;gt;    end&amp;lt;br/&amp;gt;end sub&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;function fix$(v$)   &#039;&amp;amp;quot;fixes&amp;amp;quot; coords of vector to use on screen:&amp;lt;br/&amp;gt;&#039;applies scaling and offset.&amp;lt;br/&amp;gt;    &#039;fix$ = vectAdd$(offset$, vectScale$(scale,v$))&amp;lt;br/&amp;gt;    &#039;really simple, isn&#039;t?&amp;lt;br/&amp;gt;    &#039;Well, almost. &amp;amp;quot;Y&amp;amp;quot; should be reversed&amp;lt;br/&amp;gt;    fix$=vectAdd$(offset$, vectScale$(scale, reverseY$(v$)))&amp;lt;br/&amp;gt;end function&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;function reverseY$(v$)&amp;lt;br/&amp;gt;    x=val(word$(v$,1))&amp;lt;br/&amp;gt;    y=val(word$(v$,2))&amp;lt;br/&amp;gt;    reverseY$=x;&amp;amp;quot; &amp;amp;quot;;0-y&amp;lt;br/&amp;gt;end function&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;[axes]&amp;lt;br/&amp;gt;&#039;axes&amp;lt;br/&amp;gt;    bounds = 7  &#039;like, -7 .. 7&amp;lt;br/&amp;gt;    #gr &amp;amp;quot;cls&amp;amp;quot;&amp;lt;br/&amp;gt;    #gr &amp;amp;quot;color black; size 1&amp;amp;quot;&amp;lt;br/&amp;gt;    #gr &amp;amp;quot;line &amp;amp;quot;;fix$(vect$(-1-bounds,0));&amp;amp;quot; &amp;amp;quot;;fix$(vect$(1+bounds,0))&amp;lt;br/&amp;gt;    #gr &amp;amp;quot;line &amp;amp;quot;;fix$(vect$(0,-1-bounds));&amp;amp;quot; &amp;amp;quot;;fix$(vect$(0,1+bounds))&amp;lt;br/&amp;gt;    for i = 0-bounds to bounds&amp;lt;br/&amp;gt;        #gr &amp;amp;quot;line &amp;amp;quot;;fix$(vect$(i,-0.1));&amp;amp;quot; &amp;amp;quot;;fix$(vect$(i,0.1))&amp;lt;br/&amp;gt;        #gr &amp;amp;quot;line &amp;amp;quot;;fix$(vect$(-0.1,i));&amp;amp;quot; &amp;amp;quot;;fix$(vect$(0.1,i))&amp;lt;br/&amp;gt;    next&amp;lt;br/&amp;gt;    #gr &amp;amp;quot;size 2&amp;amp;quot;&amp;lt;br/&amp;gt;    #gr &amp;amp;quot;color red&amp;amp;quot; &#039;default first vector will be red, width 2&amp;lt;br/&amp;gt;    #gr &amp;amp;quot;flush&amp;amp;quot;&amp;lt;br/&amp;gt;return&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;sub drawVector v$&amp;lt;br/&amp;gt;    #gr &amp;amp;quot;line &amp;amp;quot;;fix$(vect$(0,0));&amp;amp;quot; &amp;amp;quot;;fix$(v$)&amp;lt;br/&amp;gt;end sub&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;[quit] close #gr&amp;lt;br/&amp;gt;    print &amp;amp;quot;*program ended, you can close this window*&amp;amp;quot;&amp;lt;br/&amp;gt;    end&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&#039;=================================&amp;lt;br/&amp;gt;&#039;vector 2d lib&amp;lt;br/&amp;gt;&#039;vectors as &amp;amp;quot;x y&amp;amp;quot; pairs, to be splitted by Word$&amp;lt;br/&amp;gt;&#039;by tsh73, Feb 2013&amp;lt;br/&amp;gt;function vect$(x,y)&amp;lt;br/&amp;gt;    vect$=x;&amp;amp;quot; &amp;amp;quot;;y&amp;lt;br/&amp;gt;end function&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;function vectX(v$)&amp;lt;br/&amp;gt;    vectX=val(word$(v$,1))&amp;lt;br/&amp;gt;end function&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;function vectY(v$)&amp;lt;br/&amp;gt;    vectY=val(word$(v$,2))&amp;lt;br/&amp;gt;end function&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;function vectLen(v$)&amp;lt;br/&amp;gt;    x=val(word$(v$,1))&amp;lt;br/&amp;gt;    y=val(word$(v$,2))&amp;lt;br/&amp;gt;    vectLen=sqr(x*x+y*y)&amp;lt;br/&amp;gt;end function&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;function vectUnit$(v$)&amp;lt;br/&amp;gt;    x=val(word$(v$,1))&amp;lt;br/&amp;gt;    y=val(word$(v$,2))&amp;lt;br/&amp;gt;    vectLen=sqr(x*x+y*y)&amp;lt;br/&amp;gt;    vectUnit$=x/vectLen;&amp;amp;quot; &amp;amp;quot;;y/vectLen&amp;lt;br/&amp;gt;end function&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;function vectAdd$(v1$,v2$)&amp;lt;br/&amp;gt;    x1=val(word$(v1$,1))&amp;lt;br/&amp;gt;    y1=val(word$(v1$,2))&amp;lt;br/&amp;gt;    x2=val(word$(v2$,1))&amp;lt;br/&amp;gt;    y2=val(word$(v2$,2))&amp;lt;br/&amp;gt;    vectAdd$=x1+x2;&amp;amp;quot; &amp;amp;quot;;y1+y2&amp;lt;br/&amp;gt;end function&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;function vectSub$(v1$,v2$)&amp;lt;br/&amp;gt;    x1=val(word$(v1$,1))&amp;lt;br/&amp;gt;    y1=val(word$(v1$,2))&amp;lt;br/&amp;gt;    x2=val(word$(v2$,1))&amp;lt;br/&amp;gt;    y2=val(word$(v2$,2))&amp;lt;br/&amp;gt;    vectSub$=x1-x2;&amp;amp;quot; &amp;amp;quot;;y1-y2&amp;lt;br/&amp;gt;end function&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;function vectDotProduct(v1$,v2$)&amp;lt;br/&amp;gt;    x1=val(word$(v1$,1))&amp;lt;br/&amp;gt;    y1=val(word$(v1$,2))&amp;lt;br/&amp;gt;    x2=val(word$(v2$,1))&amp;lt;br/&amp;gt;    y2=val(word$(v2$,2))&amp;lt;br/&amp;gt;    vectDotProduct=x1*x2+y1*y2&amp;lt;br/&amp;gt;end function&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;function vectScale$(a,v$)   &#039;a * vector v$&amp;lt;br/&amp;gt;    x=val(word$(v$,1))&amp;lt;br/&amp;gt;    y=val(word$(v$,2))&amp;lt;br/&amp;gt;    vectScale$=a*x;&amp;amp;quot; &amp;amp;quot;;a*y&amp;lt;br/&amp;gt;end function&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;function vectTangent$(v$,base$)&amp;lt;br/&amp;gt;    n$=vectUnit$(base$)&amp;lt;br/&amp;gt;    vectTangent$=vectScale$(vectDotProduct(n$,v$),n$)&amp;lt;br/&amp;gt;end function&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;function vectNorm$(v$,base$)&amp;lt;br/&amp;gt;    vectNorm$=vectSub$(v$,vectTangent$(v$,base$))&amp;lt;br/&amp;gt;end function&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;function vectAngle(v$)&amp;lt;br/&amp;gt;    x=val(word$(v$,1))&amp;lt;br/&amp;gt;    y=val(word$(v$,2))&amp;lt;br/&amp;gt;    vectAngle=atan2(y,x)&amp;lt;br/&amp;gt;end function&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;function vectFromPolar$(rho, phi)&amp;lt;br/&amp;gt;    vectFromPolar$=rho*cos(phi);&amp;amp;quot; &amp;amp;quot;;rho*sin(phi)&amp;lt;br/&amp;gt;end function&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;function vectRotate$(v$,alpha)&amp;lt;br/&amp;gt;    x=val(word$(v$,1))&amp;lt;br/&amp;gt;    y=val(word$(v$,2))&amp;lt;br/&amp;gt;    rho=sqr(x*x+y*y)&amp;lt;br/&amp;gt;    phi=atan2(y,x)+alpha&amp;lt;br/&amp;gt;    vectRotate$=rho*cos(phi);&amp;amp;quot; &amp;amp;quot;;rho*sin(phi)&amp;lt;br/&amp;gt;end function&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;function dePi$(x)   &#039;pure aestetics&amp;lt;br/&amp;gt;    pi = acs(-1)&amp;lt;br/&amp;gt;    dePi$=x/pi;&amp;amp;quot;Pi&amp;amp;quot;&amp;lt;br/&amp;gt;end function&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&#039;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;&amp;amp;#45;-&amp;lt;br/&amp;gt;function atan2(y,x)&amp;lt;br/&amp;gt;    pi = acs(-1)    &#039;could be made global to save some ticks&amp;lt;br/&amp;gt;    if x &amp;amp;lt;&amp;amp;gt; 0 then arctan = atn(y/x)&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;    select case&amp;lt;br/&amp;gt;        case x &amp;amp;gt; 0&amp;lt;br/&amp;gt;        atan2 = arctan&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;        case y&amp;amp;gt;=0 and x&amp;amp;lt;0&amp;lt;br/&amp;gt;        atan2 = pi + arctan&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;        case y&amp;amp;lt;0 and x&amp;amp;lt;0&amp;lt;br/&amp;gt;        atan2 = arctan - pi&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;        case y&amp;amp;gt;0 and x=0&amp;lt;br/&amp;gt;        atan2 = pi / 2&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;        case y&amp;amp;lt;0 and x=0&amp;lt;br/&amp;gt;        atan2 = pi / -2&amp;lt;br/&amp;gt;    end select&amp;lt;br/&amp;gt;end function&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.lb  {font-family:monospace;}
.lb .imp {font-weight: bold; color: red;}
.lb .kw1 {color: #0000FF;}
.lb .kw2 {color: #AD0080;}
.lb .kw3 {color: #008080;}
.lb .co1 {color: #666666; font-style: italic;}
.lb .coMULTI {color: #666666; font-style: italic;}
.lb .es0 {color: #000099; font-weight: bold;}
.lb .br0 {color: #009900;}
.lb .sy1 {color: #339933;}
.lb .st0 {color: #008000;}
.lb .nu0 {color: #FF0000;}
.lb .me0 {color: #004000;}
.lb span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;lb&quot;&gt;&lt;span class=&quot;co1&quot;&gt;&#039;vector 2d lib demo&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;&#039; - Graphic part&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;&#039;by tsh73, Feb 2013&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;global&lt;/span&gt; offset$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; scale
&amp;nbsp;
&lt;span class=&quot;co1&quot;&gt;&#039;window and instructions&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;gosub&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;initWindow&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;call&lt;/span&gt; waitClick
&amp;nbsp;
&lt;span class=&quot;co1&quot;&gt;&#039;creating a vector&lt;/span&gt;
v1$&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;vect$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;New vector created: &amp;quot;&lt;/span&gt;;v1$
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;&#039;   drawing part&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;gosub&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;axes&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;call&lt;/span&gt; drawVector v1$
&lt;span class=&quot;kw1&quot;&gt;call&lt;/span&gt; waitClick
&amp;nbsp;
&lt;span class=&quot;co1&quot;&gt;&#039;copying a vector. Just assign to string variable&lt;/span&gt;
v2$&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;v1$
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Getting a components of a vector:&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; vectX&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v1$&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; vectY&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v1$&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;gr &lt;span class=&quot;st0&quot;&gt;&amp;quot;color green&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;call&lt;/span&gt; drawVector vect$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;vectX&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v1$&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;gr &lt;span class=&quot;st0&quot;&gt;&amp;quot;color blue&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;call&lt;/span&gt; drawVector vect$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; vectY&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v1$&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;call&lt;/span&gt; waitClick
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Length of a vector:&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; vectLen&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v1$&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Unit vector (length=1) with same direction:&amp;quot;&lt;/span&gt;
u1$&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;vectUnit$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v1$&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; u1$
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;and it&#039;s length is (as should be):&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; vectLen&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;u1$&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;gr &lt;span class=&quot;st0&quot;&gt;&amp;quot;color cyan&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;call&lt;/span&gt; drawVector u1$
&lt;span class=&quot;kw1&quot;&gt;call&lt;/span&gt; waitClick
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Adding vectors&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;let&#039;s make another vector&amp;quot;&lt;/span&gt;
v3$&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;vect$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,-&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; v3$
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;The sum (&amp;quot;&lt;/span&gt;;v1$;&lt;span class=&quot;st0&quot;&gt;&amp;quot;) + (&amp;quot;&lt;/span&gt;;v3$;&lt;span class=&quot;st0&quot;&gt;&amp;quot;) is&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; vectAdd$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v1$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;v3$&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;gosub&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;axes&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;call&lt;/span&gt; drawVector v1$
&lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;gr &lt;span class=&quot;st0&quot;&gt;&amp;quot;color green&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;call&lt;/span&gt; drawVector v3$
&lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;gr &lt;span class=&quot;st0&quot;&gt;&amp;quot;color blue&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;call&lt;/span&gt; waitClick
&lt;span class=&quot;kw1&quot;&gt;call&lt;/span&gt; drawVector vectAdd$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v1$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;v3$&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;call&lt;/span&gt; waitClick
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Subtracting same two vectors&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;(&amp;quot;&lt;/span&gt;;v1$;&lt;span class=&quot;st0&quot;&gt;&amp;quot;) - (&amp;quot;&lt;/span&gt;;v3$;&lt;span class=&quot;st0&quot;&gt;&amp;quot;) is&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; vectSub$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v1$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;v3$&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;gosub&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;axes&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;call&lt;/span&gt; drawVector v1$
&lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;gr &lt;span class=&quot;st0&quot;&gt;&amp;quot;color green&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;call&lt;/span&gt; drawVector v3$
&lt;span class=&quot;kw1&quot;&gt;call&lt;/span&gt; waitClick
&lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;gr &lt;span class=&quot;st0&quot;&gt;&amp;quot;color blue&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;call&lt;/span&gt; drawVector vectSub$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v1$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;v3$&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;call&lt;/span&gt; waitClick
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Dot product of same two vectors&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;(&amp;quot;&lt;/span&gt;;v1$;&lt;span class=&quot;st0&quot;&gt;&amp;quot;)*(&amp;quot;&lt;/span&gt;;v3$;&lt;span class=&quot;st0&quot;&gt;&amp;quot;) is&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; vectDotProduct&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v1$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;v3$&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;as a side note, it is 0 for perpendicular vectors&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Scaling a vector&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;by half&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; vectScale$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0.5&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;v1$&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;3x&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; vectScale$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;v1$&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;reverse vector by multiplying it by -1&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; vectScale$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;v1$&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;gosub&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;axes&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;call&lt;/span&gt; drawVector v1$
&lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;gr &lt;span class=&quot;st0&quot;&gt;&amp;quot;color green&amp;quot;&lt;/span&gt;
&lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;gr &lt;span class=&quot;st0&quot;&gt;&amp;quot;size 3&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;call&lt;/span&gt; drawVector vectScale$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0.5&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;v1$&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;call&lt;/span&gt; waitClick
&lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;gr &lt;span class=&quot;st0&quot;&gt;&amp;quot;color blue&amp;quot;&lt;/span&gt;
&lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;gr &lt;span class=&quot;st0&quot;&gt;&amp;quot;size 1&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;call&lt;/span&gt; drawVector vectScale$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;v1$&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;call&lt;/span&gt; waitClick
&lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;gr &lt;span class=&quot;st0&quot;&gt;&amp;quot;color cyan&amp;quot;&lt;/span&gt;
&lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;gr &lt;span class=&quot;st0&quot;&gt;&amp;quot;size 2&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;call&lt;/span&gt; drawVector vectScale$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;v1$&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;call&lt;/span&gt; waitClick
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;We can decompose any vector into sum &amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;of normal and tangential parts along any direction&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;First, let&#039;s try along OX axis&amp;quot;&lt;/span&gt;
base$ &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; vect$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;The direction is &amp;quot;&lt;/span&gt;; base$
t$&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;vectTangent$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v1$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;base$&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Tangential part is &amp;quot;&lt;/span&gt;;t$
n$&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;vectNorm$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v1$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;base$&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Normal part is &amp;quot;&lt;/span&gt;;n$
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Their sum is &amp;quot;&lt;/span&gt;; vectAdd$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;t$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;n$&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;(same as initial vector)&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;gosub&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;axes&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;call&lt;/span&gt; drawVector v1$
&lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;gr &lt;span class=&quot;st0&quot;&gt;&amp;quot;size 4&amp;quot;&lt;/span&gt;
&lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;gr &lt;span class=&quot;st0&quot;&gt;&amp;quot;color cyan&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;call&lt;/span&gt; drawVector base$
&lt;span class=&quot;kw1&quot;&gt;call&lt;/span&gt; waitClick
&lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;gr &lt;span class=&quot;st0&quot;&gt;&amp;quot;size 2&amp;quot;&lt;/span&gt;
&lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;gr &lt;span class=&quot;st0&quot;&gt;&amp;quot;color blue&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;call&lt;/span&gt; drawVector t$
&lt;span class=&quot;kw1&quot;&gt;call&lt;/span&gt; waitClick
&lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;gr &lt;span class=&quot;st0&quot;&gt;&amp;quot;color green&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;call&lt;/span&gt; drawVector n$
&lt;span class=&quot;kw1&quot;&gt;call&lt;/span&gt; waitClick
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Now try it with another direction&amp;quot;&lt;/span&gt;
base$ &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; v3$
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;The direction is &amp;quot;&lt;/span&gt;; base$
t$&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;vectTangent$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v1$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;base$&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Tangential part is &amp;quot;&lt;/span&gt;;t$
n$&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;vectNorm$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v1$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;base$&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Normal part is &amp;quot;&lt;/span&gt;;n$
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Their sum is &amp;quot;&lt;/span&gt;; vectAdd$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;t$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;n$&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;(should be same as initial vector)&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;(Well, you see there is roundoff errors possible)&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;gosub&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;axes&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;call&lt;/span&gt; drawVector v1$
&lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;gr &lt;span class=&quot;st0&quot;&gt;&amp;quot;size 4&amp;quot;&lt;/span&gt;
&lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;gr &lt;span class=&quot;st0&quot;&gt;&amp;quot;color cyan&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;call&lt;/span&gt; drawVector base$
&lt;span class=&quot;kw1&quot;&gt;call&lt;/span&gt; waitClick
&lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;gr &lt;span class=&quot;st0&quot;&gt;&amp;quot;size 2&amp;quot;&lt;/span&gt;
&lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;gr &lt;span class=&quot;st0&quot;&gt;&amp;quot;color blue&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;call&lt;/span&gt; drawVector t$
&lt;span class=&quot;kw1&quot;&gt;call&lt;/span&gt; waitClick
&lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;gr &lt;span class=&quot;st0&quot;&gt;&amp;quot;color green&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;call&lt;/span&gt; drawVector n$
&lt;span class=&quot;kw1&quot;&gt;call&lt;/span&gt; waitClick
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Angle between vector and OX axis, radians&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; vectAngle&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v1$&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;So with length and angle, we can convert to polar coords&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Vector &amp;quot;&lt;/span&gt;;v1$;&lt;span class=&quot;st0&quot;&gt;&amp;quot; is&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Polar radius and angle &amp;quot;&lt;/span&gt;
r&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;vectLen&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v1$&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
a&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;vectAngle&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v1$&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; r&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; a
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;There is a function to convert from polar to cartesian&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; vectFromPolar$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;r&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; a&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;(should be same as initial vector)&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Some other vector: length 7 at angle 60 degrees&amp;quot;&lt;/span&gt;
r&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;7&lt;/span&gt;
a&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;60&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;acs&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;180&lt;/span&gt;    &lt;span class=&quot;co1&quot;&gt;&#039;acs(-1)==pi&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; vectFromPolar$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;r&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; a&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;gosub&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;axes&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;call&lt;/span&gt; drawVector v1$
&lt;span class=&quot;kw1&quot;&gt;call&lt;/span&gt; waitClick
&lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;gr &lt;span class=&quot;st0&quot;&gt;&amp;quot;color blue&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;call&lt;/span&gt; drawVector vectFromPolar$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;r&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; a&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;call&lt;/span&gt; waitClick
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Rotating vector by arbitrary agle&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;by 30 degrees&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; vectRotate$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v1$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;30&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;acs&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;180&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;by 90 degrees&amp;quot;&lt;/span&gt;
a&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;90&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;acs&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;180&lt;/span&gt;    &lt;span class=&quot;co1&quot;&gt;&#039;acs(-1)==pi, so it&#039;s actually pi/2&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; vectRotate$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v1$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;a&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;by -90 degrees&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; vectRotate$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v1$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;a&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;  &lt;span class=&quot;co1&quot;&gt;&#039;JB doesn&#039;t allow &amp;quot;-a&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;by 180 degrees&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; vectRotate$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v1$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;180&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;acs&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;180&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;(Well, easier to myltiply by -1)&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;gosub&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;axes&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;call&lt;/span&gt; drawVector v1$
&lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;gr &lt;span class=&quot;st0&quot;&gt;&amp;quot;color green&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;call&lt;/span&gt; drawVector vectRotate$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v1$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;30&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;acs&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;180&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;call&lt;/span&gt; waitClick
&lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;gr &lt;span class=&quot;st0&quot;&gt;&amp;quot;color blue&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;call&lt;/span&gt; drawVector vectRotate$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v1$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;a&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;call&lt;/span&gt; waitClick
&lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;gr &lt;span class=&quot;st0&quot;&gt;&amp;quot;color cyan&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;call&lt;/span&gt; drawVector vectRotate$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v1$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;a&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;call&lt;/span&gt; waitClick
&lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;gr &lt;span class=&quot;st0&quot;&gt;&amp;quot;color black&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;call&lt;/span&gt; drawVector vectRotate$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v1$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;180&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;acs&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;180&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;call&lt;/span&gt; waitClick
&amp;nbsp;
&lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;gr &lt;span class=&quot;st0&quot;&gt;&amp;quot;place 70 200&amp;quot;&lt;/span&gt;
&lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;gr &lt;span class=&quot;st0&quot;&gt;&amp;quot;\&amp;quot;&lt;/span&gt;;&lt;span class=&quot;st0&quot;&gt;&amp;quot;*That&#039;s all, folks.*&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;*That&#039;s all, folks.*&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;wait&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;co1&quot;&gt;&#039;----------------------------------------&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;&#039;parts related to graphic part of the demo&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;initWindow&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;
    &lt;span class=&quot;kw3&quot;&gt;UpperLeftX&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;
    &lt;span class=&quot;kw3&quot;&gt;UpperLeftY&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;
    &lt;span class=&quot;kw3&quot;&gt;WindowWidth&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;400&lt;/span&gt;
    &lt;span class=&quot;kw3&quot;&gt;WindowHeight&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;400&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;kw1&quot;&gt;open&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Vector demo&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;for&lt;/span&gt; graphics_nsb_nf &lt;span class=&quot;kw1&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;gr
    &lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;gr &lt;span class=&quot;st0&quot;&gt;&amp;quot;trapclose [quit]&amp;quot;&lt;/span&gt;
    &lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;gr &lt;span class=&quot;st0&quot;&gt;&amp;quot;home; down; posxy cx cy&amp;quot;&lt;/span&gt;
    &lt;span class=&quot;co1&quot;&gt;&#039;print cx, cy&lt;/span&gt;
    offset$ &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; vect$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;cx&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; cy&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    scale &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;20&lt;/span&gt;
    &lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;gr &lt;span class=&quot;st0&quot;&gt;&amp;quot;place 70, 120&amp;quot;&lt;/span&gt;
    &lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;gr &lt;span class=&quot;st0&quot;&gt;&amp;quot;\&amp;quot;&lt;/span&gt;;&lt;span class=&quot;st0&quot;&gt;&amp;quot;Please align this window&amp;quot;&lt;/span&gt;
    &lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;gr &lt;span class=&quot;st0&quot;&gt;&amp;quot;\&amp;quot;&lt;/span&gt;;&lt;span class=&quot;st0&quot;&gt;&amp;quot;along with mainwin (console).&amp;quot;&lt;/span&gt;
    &lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;gr &lt;span class=&quot;st0&quot;&gt;&amp;quot;\&amp;quot;&lt;/span&gt;;&lt;span class=&quot;st0&quot;&gt;&amp;quot;It will print stuff to mainwin, &amp;quot;&lt;/span&gt;
    &lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;gr &lt;span class=&quot;st0&quot;&gt;&amp;quot;\&amp;quot;&lt;/span&gt;;&lt;span class=&quot;st0&quot;&gt;&amp;quot;while drawing in this window.&amp;quot;&lt;/span&gt;
    &lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;gr &lt;span class=&quot;st0&quot;&gt;&amp;quot;\&amp;quot;&lt;/span&gt;;&lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;quot;&lt;/span&gt;
    &lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;gr &lt;span class=&quot;st0&quot;&gt;&amp;quot;\&amp;quot;&lt;/span&gt;;&lt;span class=&quot;st0&quot;&gt;&amp;quot;Use left mouse button click&amp;quot;&lt;/span&gt;
    &lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;gr &lt;span class=&quot;st0&quot;&gt;&amp;quot;\&amp;quot;&lt;/span&gt;;&lt;span class=&quot;st0&quot;&gt;&amp;quot;to advance.&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;sub&lt;/span&gt; waitClick
    &lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;gr &lt;span class=&quot;st0&quot;&gt;&amp;quot;flush&amp;quot;&lt;/span&gt;
    &lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;gr &lt;span class=&quot;st0&quot;&gt;&amp;quot;when leftButtonDown [cont]&amp;quot;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;wait&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;cont&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;
    &lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;gr &lt;span class=&quot;st0&quot;&gt;&amp;quot;when leftButtonDown&amp;quot;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;exit&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;sub&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;quit&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;&#039;and we could close while waiting&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;close&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;gr
    &lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;*program ended, you can close this window*&amp;quot;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;end&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;end&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;sub&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;function&lt;/span&gt; fix$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v$&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;   &lt;span class=&quot;co1&quot;&gt;&#039;&amp;quot;fixes&amp;quot; coords of vector to use on screen:&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;&#039;applies scaling and offset.&lt;/span&gt;
    &lt;span class=&quot;co1&quot;&gt;&#039;fix$ = vectAdd$(offset$, vectScale$(scale,v$))&lt;/span&gt;
    &lt;span class=&quot;co1&quot;&gt;&#039;really simple, isn&#039;t?&lt;/span&gt;
    &lt;span class=&quot;co1&quot;&gt;&#039;Well, almost. &amp;quot;Y&amp;quot; should be reversed&lt;/span&gt;
    fix$&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;vectAdd$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;offset$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; vectScale$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;scale&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; reverseY$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v$&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;end&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;function&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;function&lt;/span&gt; reverseY$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v$&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    x&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;val&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;word&lt;/span&gt;$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    y&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;val&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;word&lt;/span&gt;$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    reverseY$&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;x;&lt;span class=&quot;st0&quot;&gt;&amp;quot; &amp;quot;&lt;/span&gt;;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;y
&lt;span class=&quot;kw1&quot;&gt;end&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;function&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;axes&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;&#039;axes&lt;/span&gt;
    bounds &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;7&lt;/span&gt;  &lt;span class=&quot;co1&quot;&gt;&#039;like, -7 .. 7&lt;/span&gt;
    &lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;gr &lt;span class=&quot;st0&quot;&gt;&amp;quot;cls&amp;quot;&lt;/span&gt;
    &lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;gr &lt;span class=&quot;st0&quot;&gt;&amp;quot;color black; size 1&amp;quot;&lt;/span&gt;
    &lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;gr &lt;span class=&quot;st0&quot;&gt;&amp;quot;line &amp;quot;&lt;/span&gt;;fix$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;vect$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;bounds&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;span class=&quot;st0&quot;&gt;&amp;quot; &amp;quot;&lt;/span&gt;;fix$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;vect$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;+&lt;/span&gt;bounds&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    &lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;gr &lt;span class=&quot;st0&quot;&gt;&amp;quot;line &amp;quot;&lt;/span&gt;;fix$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;vect$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,-&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;bounds&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;span class=&quot;st0&quot;&gt;&amp;quot; &amp;quot;&lt;/span&gt;;fix$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;vect$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;+&lt;/span&gt;bounds&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;for&lt;/span&gt; i &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;bounds &lt;span class=&quot;kw1&quot;&gt;to&lt;/span&gt; bounds
        &lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;gr &lt;span class=&quot;st0&quot;&gt;&amp;quot;line &amp;quot;&lt;/span&gt;;fix$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;vect$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;i&lt;span class=&quot;sy0&quot;&gt;,-&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0.1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;span class=&quot;st0&quot;&gt;&amp;quot; &amp;quot;&lt;/span&gt;;fix$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;vect$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;i&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0.1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
        &lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;gr &lt;span class=&quot;st0&quot;&gt;&amp;quot;line &amp;quot;&lt;/span&gt;;fix$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;vect$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0.1&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;i&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;span class=&quot;st0&quot;&gt;&amp;quot; &amp;quot;&lt;/span&gt;;fix$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;vect$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0.1&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;i&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;next&lt;/span&gt;
    &lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;gr &lt;span class=&quot;st0&quot;&gt;&amp;quot;size 2&amp;quot;&lt;/span&gt;
    &lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;gr &lt;span class=&quot;st0&quot;&gt;&amp;quot;color red&amp;quot;&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;&#039;default first vector will be red, width 2&lt;/span&gt;
    &lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;gr &lt;span class=&quot;st0&quot;&gt;&amp;quot;flush&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;sub&lt;/span&gt; drawVector v$
    &lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;gr &lt;span class=&quot;st0&quot;&gt;&amp;quot;line &amp;quot;&lt;/span&gt;;fix$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;vect$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;span class=&quot;st0&quot;&gt;&amp;quot; &amp;quot;&lt;/span&gt;;fix$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v$&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;end&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;sub&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;quit&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;close&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;gr
    &lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;*program ended, you can close this window*&amp;quot;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;end&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;co1&quot;&gt;&#039;=================================&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;&#039;vector 2d lib&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;&#039;vectors as &amp;quot;x y&amp;quot; pairs, to be splitted by Word$&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;&#039;by tsh73, Feb 2013&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;function&lt;/span&gt; vect$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;y&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    vect$&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;x;&lt;span class=&quot;st0&quot;&gt;&amp;quot; &amp;quot;&lt;/span&gt;;y
&lt;span class=&quot;kw1&quot;&gt;end&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;function&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;function&lt;/span&gt; vectX&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v$&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    vectX&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;val&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;word&lt;/span&gt;$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;end&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;function&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;function&lt;/span&gt; vectY&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v$&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    vectY&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;val&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;word&lt;/span&gt;$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;end&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;function&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;function&lt;/span&gt; vectLen&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v$&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    x&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;val&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;word&lt;/span&gt;$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    y&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;val&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;word&lt;/span&gt;$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    vectLen&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;sqr&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;+&lt;/span&gt;y&lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;y&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;end&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;function&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;function&lt;/span&gt; vectUnit$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v$&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    x&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;val&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;word&lt;/span&gt;$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    y&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;val&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;word&lt;/span&gt;$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    vectLen&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;sqr&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;+&lt;/span&gt;y&lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;y&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    vectUnit$&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;vectLen;&lt;span class=&quot;st0&quot;&gt;&amp;quot; &amp;quot;&lt;/span&gt;;y&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;vectLen
&lt;span class=&quot;kw1&quot;&gt;end&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;function&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;function&lt;/span&gt; vectAdd$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v1$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;v2$&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    x1&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;val&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;word&lt;/span&gt;$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v1$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    y1&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;val&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;word&lt;/span&gt;$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v1$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    x2&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;val&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;word&lt;/span&gt;$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v2$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    y2&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;val&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;word&lt;/span&gt;$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v2$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    vectAdd$&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;x1&lt;span class=&quot;sy0&quot;&gt;+&lt;/span&gt;x2;&lt;span class=&quot;st0&quot;&gt;&amp;quot; &amp;quot;&lt;/span&gt;;y1&lt;span class=&quot;sy0&quot;&gt;+&lt;/span&gt;y2
&lt;span class=&quot;kw1&quot;&gt;end&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;function&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;function&lt;/span&gt; vectSub$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v1$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;v2$&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    x1&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;val&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;word&lt;/span&gt;$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v1$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    y1&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;val&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;word&lt;/span&gt;$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v1$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    x2&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;val&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;word&lt;/span&gt;$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v2$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    y2&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;val&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;word&lt;/span&gt;$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v2$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    vectSub$&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;x1&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;x2;&lt;span class=&quot;st0&quot;&gt;&amp;quot; &amp;quot;&lt;/span&gt;;y1&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;y2
&lt;span class=&quot;kw1&quot;&gt;end&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;function&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;function&lt;/span&gt; vectDotProduct&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v1$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;v2$&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    x1&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;val&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;word&lt;/span&gt;$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v1$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    y1&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;val&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;word&lt;/span&gt;$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v1$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    x2&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;val&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;word&lt;/span&gt;$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v2$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    y2&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;val&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;word&lt;/span&gt;$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v2$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    vectDotProduct&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;x1&lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;x2&lt;span class=&quot;sy0&quot;&gt;+&lt;/span&gt;y1&lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;y2
&lt;span class=&quot;kw1&quot;&gt;end&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;function&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;function&lt;/span&gt; vectScale$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;a&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;v$&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;   &lt;span class=&quot;co1&quot;&gt;&#039;a * vector v$&lt;/span&gt;
    x&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;val&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;word&lt;/span&gt;$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    y&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;val&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;word&lt;/span&gt;$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    vectScale$&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;a&lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;x;&lt;span class=&quot;st0&quot;&gt;&amp;quot; &amp;quot;&lt;/span&gt;;a&lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;y
&lt;span class=&quot;kw1&quot;&gt;end&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;function&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;function&lt;/span&gt; vectTangent$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;base$&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    n$&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;vectUnit$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;base$&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    vectTangent$&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;vectScale$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;vectDotProduct&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;n$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;v$&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;n$&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;end&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;function&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;function&lt;/span&gt; vectNorm$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;base$&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    vectNorm$&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;vectSub$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;vectTangent$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;base$&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;end&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;function&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;function&lt;/span&gt; vectAngle&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v$&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    x&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;val&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;word&lt;/span&gt;$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    y&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;val&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;word&lt;/span&gt;$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    vectAngle&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;atan2&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;y&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;end&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;function&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;function&lt;/span&gt; vectFromPolar$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;rho&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; phi&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    vectFromPolar$&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;rho&lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;cos&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;phi&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;span class=&quot;st0&quot;&gt;&amp;quot; &amp;quot;&lt;/span&gt;;rho&lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;sin&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;phi&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;end&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;function&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;function&lt;/span&gt; vectRotate$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;alpha&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    x&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;val&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;word&lt;/span&gt;$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    y&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;val&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw1&quot;&gt;word&lt;/span&gt;$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;v$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    rho&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;sqr&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;+&lt;/span&gt;y&lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;y&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    phi&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;atan2&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;y&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;+&lt;/span&gt;alpha
    vectRotate$&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;rho&lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;cos&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;phi&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;span class=&quot;st0&quot;&gt;&amp;quot; &amp;quot;&lt;/span&gt;;rho&lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;sin&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;phi&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;end&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;function&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;function&lt;/span&gt; dePi$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;x&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;   &lt;span class=&quot;co1&quot;&gt;&#039;pure aestetics&lt;/span&gt;
    pi &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;acs&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    dePi$&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;pi;&lt;span class=&quot;st0&quot;&gt;&amp;quot;Pi&amp;quot;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;end&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;function&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;co1&quot;&gt;&#039;---------------------------&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;function&lt;/span&gt; atan2&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;y&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    pi &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;acs&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;    &lt;span class=&quot;co1&quot;&gt;&#039;could be made global to save some ticks&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; x &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt; arctan &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;atn&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;y&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;x&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;kw1&quot;&gt;select&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;case&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;case&lt;/span&gt; x &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;
        atan2 &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; arctan
&amp;nbsp;
        &lt;span class=&quot;kw1&quot;&gt;case&lt;/span&gt; y&lt;span class=&quot;sy0&quot;&gt;&amp;gt;=&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;and&lt;/span&gt; x&lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;
        atan2 &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; pi &lt;span class=&quot;sy0&quot;&gt;+&lt;/span&gt; arctan
&amp;nbsp;
        &lt;span class=&quot;kw1&quot;&gt;case&lt;/span&gt; y&lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;and&lt;/span&gt; x&lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;
        atan2 &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; arctan &lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt; pi
&amp;nbsp;
        &lt;span class=&quot;kw1&quot;&gt;case&lt;/span&gt; y&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;and&lt;/span&gt; x&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;
        atan2 &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; pi &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;
&amp;nbsp;
        &lt;span class=&quot;kw1&quot;&gt;case&lt;/span&gt; y&lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;and&lt;/span&gt; x&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;
        atan2 &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; pi &lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;end&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;select&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;end&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;function&lt;/span&gt;&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:3 --&gt;</description>
          </item>
    <item>
      <title>#2 Music Programs.zip</title>
      <link>https://basic.wikispaces.com/file/detail/%232+Music+Programs.zip</link>
      <dc:creator>eagle11</dc:creator>
      <guid isPermaLink="true">https://basic.wikispaces.com/file/detail/%232+Music+Programs.zip</guid>
      <comments>https://basic.wikispaces.com/file/messages/%232+Music+Programs.zip</comments>
      <pubDate>Sun, 16 Dec 2007 03:56:25 GMT</pubDate>
      <description></description>
              <enclosure url="https://basic.wikispaces.com/file/view/%232+Music+Programs.zip"
        length="46446"
        type="application/zip"
        ></enclosure>
          </item>
    <item>
      <title>03302007</title>
      <link>https://basic.wikispaces.com/03302007</link>
      <dc:creator>Alyce</dc:creator>
      <guid isPermaLink="true">https://basic.wikispaces.com/03302007</guid>
      <comments>https://basic.wikispaces.com/page/messages/03302007</comments>
      <pubDate>Fri, 30 Mar 2007 18:41:10 GMT</pubDate>
      <description>&lt;!-- ws:start:WikiTextHeadingRule:0:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc0&quot;&gt;&lt;a name=&quot;March 30, 2007 Chat with Carl About Run BASIC&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:0 --&gt;March 30, 2007 Chat with Carl About Run BASIC&lt;/h1&gt;
&lt;br /&gt;
&lt;br /&gt;
[BillB] Good morning Jerry.&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] Hey guys!&lt;br /&gt;
&lt;br /&gt;
[BillB] Hello Carl.&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] I see we&#039;re a few minutes early. Jerry, I thought you couldn&#039;t make it?&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] Hold on, I&#039;ll be back in a couple of minutes.&lt;br /&gt;
&lt;br /&gt;
[jmuelver] I strongarmed a computer connection on a forged login....&lt;br /&gt;
&lt;br /&gt;
[BillB] You know what they say about those who can&#039;t take a joke.&lt;br /&gt;
&lt;br /&gt;
[jmuelver] Yes, I do, but I promised to withhold political comments today.&lt;br /&gt;
&lt;br /&gt;
[BillB] This chat time is probably a little late for Asia, &#039;bout right for Europe and too early for the western hemisphere.&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] Okay. I&#039;m back now. Did you miss me?&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] You guys wanna buy a bridge? ;-)&lt;br /&gt;
&lt;br /&gt;
[BillB] Yes&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] That&#039;s what I thought.&lt;br /&gt;
&lt;br /&gt;
[BillB] as in guitar, buss, brooklyn, dental appliance, transportation span?&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] You guys wanna buy an BASIC web app server?&lt;br /&gt;
&lt;br /&gt;
[BillB] How close are you with the release?&lt;br /&gt;
&lt;br /&gt;
[BillB] I&#039;ve a little utilized linux system I&#039;d like to play with.&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] We&#039;re hoping to start testing it in a few weeks. Release will probably be a couple of months after that.&lt;br /&gt;
&lt;br /&gt;
[Jerry] I&#039;m in the market for web app server. I can test on Win, Mac OSX, Linux....&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] The initial release will be a personal license. Later we plan on a more professional level system.&lt;br /&gt;
&lt;br /&gt;
[Jerry] &amp;quot;Personal&amp;quot;... Runs on my PC, or on sweb server?&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] Personal means has fewer features and costs less. You will still be able to use it to host apps on the internet or on your local lan.&lt;br /&gt;
&lt;br /&gt;
[Jerry] Okay. So it needs a server. Runs on its own, or on top of Apache or SII?&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] For example Jerry, we had batted about the idea of database connectivity for the product. The personal license might not have that, or it might have something simple like SQLLite.&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] Run BASIC is a web server. You can hide it behind Apache or something similar of course if you need/want to.&lt;br /&gt;
&lt;br /&gt;
[BillB] If you want to mirror the online version, you have mucho space available at lbdepot.info&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] I&#039;m currently running the free Run BASIC site behind Apache, but I could also just expose Run BASIC to the internet at large and it would still work.&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] Thanks Bill. I&#039;ll let you know if I need to do something like that. &lt;br /&gt;
&lt;br /&gt;
[Jerry] Deploys, how? Seaside image?&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] Run BASIC will deploy as a VM and an image. When you start it you will not see any Smalltalk or Seaside related things.&lt;br /&gt;
&lt;br /&gt;
[Jerry] How do I upload it to my ISP account?&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] I&#039;m not sure what you mean. You can use FTP, for example.&lt;br /&gt;
&lt;br /&gt;
[Jerry] Or, for K12 setting, to my OS X server?&lt;br /&gt;
&lt;br /&gt;
[Jerry] Well, PHP scripts have got to hav PHP enabled on the server. Does RunBASIC need anything enabled on the server?&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] No. Run BASIC is a standalone system.&lt;br /&gt;
&lt;br /&gt;
[Jerry] Could, for instance, poke it into my BanPro or GoDaddy hoting accounts?&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] That&#039;s one of the nice things about it. You don&#039;t need anything else.&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] I have no idea what your TOS is for BanPro or GoDaddy.&lt;br /&gt;
&lt;br /&gt;
[Jerry] Spooky. What can we play with &amp;quot;Personal&amp;quot;?&lt;br /&gt;
&lt;br /&gt;
[Jerry] I&#039;ll have to explore the TOS thing. I own the TOS on the Mac servers at school.&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] Not yet. I am still tying some loose ends together. Like I said, testing will start in a few weeks. I&#039;ll shoot for end of April.&lt;br /&gt;
&lt;br /&gt;
[Jerry] I meant, when can get personal? &lt;br /&gt;
&lt;br /&gt;
[CarlGundel] You can use Run BASIC Personal in a school to create applications, but it will only have one password protected account so it won&#039;t be suitable for classroom instruction.&lt;br /&gt;
&lt;br /&gt;
[Jerry] For database, TDB (Trivial DB) would be good enough.&lt;br /&gt;
&lt;br /&gt;
[Jerry] Could write apps that require login to run, though.&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] Is that a product?&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] Sure you can. Have you seen the blog app screencast yet?&lt;br /&gt;
&lt;br /&gt;
[Jerry] It&#039;s an ancient philosophy. Sequential text file, records tagged with fieldnames.&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] Gotcha. Yup, I&#039;ve written a lot of programs that use TDB. &lt;br /&gt;
&lt;br /&gt;
[Jerry] Haven&#039;t seen the screencast.&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] Too bad.&lt;br /&gt;
&lt;br /&gt;
[BillB] (?)nix machines could probably use http redirects through .htpassword. Something similar through IIS.&lt;br /&gt;
&lt;br /&gt;
[Jerry] When will the free version have some storage on-server, like maybe user accounts? Log in, get a list of your apps on-file....&lt;br /&gt;
&lt;br /&gt;
[Jerry] Will the Beta have RunBASIC widgets for all the HTML form controls?&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] Well Jerry, I&#039;m not sure how to approach that. On the one hand that might make the site more popular. On the other hand it could bring the site to its knees if too many people decide to use it all the time.&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] I suppose that could be considered a good problem to have. &lt;br /&gt;
&lt;br /&gt;
[Jerry] Multiple RB engines?&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] Yes, we&#039;ll be adding lists and checkboxes. An image map of some kind, etc.&lt;br /&gt;
&lt;br /&gt;
[BillB] I suspect there&#039;s a point of deminishing return if the &amp;quot;free&amp;quot; version gets too robust.&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] I could easily run more RB engines I suppose. It would be easier to justify if it would make $$$.&lt;br /&gt;
&lt;br /&gt;
[Jerry] When an RB program is compiled, does it run on its own, or does the interpreter have to keep a hand in things?&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] Yes, the free version is supposed to attract interest.&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] Compiled Run BASIC programs are manifested as an executable object model. So there&#039;s a complete Smalltalk support system there to make it all work.&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] This is similar to the legacy LB stuff, but more sophisticated.&lt;br /&gt;
&lt;br /&gt;
[Jerry] Can RB &amp;quot;talk&amp;quot; to JavaScript, pass variable values back and forth?&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] Run BASIC uses Seaside to do that. I don&#039;t usually need to worry about that stuff because I just build the web UI out of Smalltalk objects. On the other hand, sometimes I do need to know a bit about what&#039;s going on, but not usually.&lt;br /&gt;
&lt;br /&gt;
[Jerry] Can I &amp;quot;call&amp;quot; RB programs directly through the web, like calling a PHP file on a site?&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] I haven&#039;t designed a feature like that, but I imagine that it can be done.&lt;br /&gt;
&lt;br /&gt;
[Jerry] So, can I intercept a Submit with JS onClick, vett the form&#039;s control contents, and pass the control values to RB?&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] Why do you want to do that when it is done for you automatically?&lt;br /&gt;
&lt;br /&gt;
[Jerry] Like, &lt;!-- ws:start:WikiTextUrlRule:686:http://hytext.com/rb.html --&gt;&lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://hytext.com/rb.html&quot; rel=&quot;nofollow&quot;&gt;http://hytext.com/rb.html&lt;/a&gt;&lt;!-- ws:end:WikiTextUrlRule:686 --&gt; and up pops a RB program asking for my credit card number?&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] You will probably be able to do that, but you won&#039;t need to deal with JS or forms or whatever.&lt;br /&gt;
&lt;br /&gt;
[Jerry] I&#039;m not clear on the &amp;quot;automatic&amp;quot; part. I know how RB handles form controls. I guess I&#039;m looking for how to handle the form controls that RB doesn&#039;t handle yet.&lt;br /&gt;
&lt;br /&gt;
[Jerry] You&#039;re saying I can already get and assign form values, and don&#039;t need to fret with JavaScript, right? Perfect!&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] It isn&#039;t clear to me how you would do that Jerry. Perhaps once we&#039;ve got this system all working I&#039;ll have some cycles to invest to make things open enough so that webheads like you can have your cake and eat it too.&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] No promises though. Seaside may get in the way. We&#039;ll see.&lt;br /&gt;
&lt;br /&gt;
[Jerry] I don&#039;t think we&#039;ve pushed Seaside anywhere near its capabilities, yet. So, I&#039;m not worried.&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] The real goal of Run BASIC is a web programming system for people who know *nothing* about web programming. Know a little BASIC? You&#039;re all set!&lt;br /&gt;
&lt;br /&gt;
[BillB] So, where&#039;s the support network going to come from?&lt;br /&gt;
&lt;br /&gt;
[Jerry] I seem to be developing a mixed-language programming style for RB apps, intermingling HTML and RB coding, at least for page payout and presentation. Is that the optimal method? Or will RB handle all layout demainds?&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] It&#039;s been an interesting experience trying to present Run BASIC to the programming community. It isn&#039;t like anything else. In some ways it&#039;s even easier than Smalltalk+Seaside.&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] testing&lt;br /&gt;
&lt;br /&gt;
[Jerry] Okay. Do it all in RB. I&#039;m already think about an RB preprocessor, for people who know nothing about HTML and less about BASIC.....&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] testing&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] Okay, I was having some problems with the chat system. Seems okay know.&lt;br /&gt;
&lt;br /&gt;
[Jerry] Yeah. We stuffed a buffer a bit....&lt;br /&gt;
&lt;br /&gt;
[Jerry] PHP does that, sometimes. RB, of course, won&#039;t have that problem....&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] What do you mean Bill?&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] Verizon maybe? &lt;br /&gt;
&lt;br /&gt;
[CarlGundel] Once we start beta testing we should definitely open a Just BASIC forum instead of just having a spot on the LB conforums site.&lt;br /&gt;
&lt;br /&gt;
[Jerry] Yeah! Who&#039;s going to answer all the questions?&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] You are.&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] &lt;br /&gt;
&lt;br /&gt;
[Jerry] How about a subscription mentoring service?&lt;br /&gt;
&lt;br /&gt;
[BillB] Presently, every &amp;quot;programmer&amp;quot; wants to aquire LB and start writing the next MS replacement. You know there&#039;ll be many more questions about RB&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] Maybe I should do that for LB?&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] Hi Bill&lt;br /&gt;
&lt;br /&gt;
[BillW] Hey Carl, all&lt;br /&gt;
&lt;br /&gt;
[BillW] can&#039;t stay long, just checking in from the Apple Store &lt;br /&gt;
&lt;br /&gt;
[CarlGundel] Well, to see the whole chat so far you might try typing /show 500&lt;br /&gt;
&lt;br /&gt;
[BillW] it&#039;s looking pretty interesting&lt;br /&gt;
&lt;br /&gt;
[BillW] well, I&#039;ll look more when I get back home&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] Well, about LB, we should be able to start working on that in earnest in a few months.&lt;br /&gt;
&lt;br /&gt;
[BillW] I&#039;m supposed to be pricing a new Mac for dev purposes&lt;br /&gt;
&lt;br /&gt;
[Jerry] I&#039;d like to develop a features and advantages comparison chart, positioning RB against other web-based scripting options, and the whole category against desktop programming endeavors. The idea is to get a feel for which way to jump, depending on what the app requires.&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] Can you pick one of those 15&amp;quot; MacBook Pros up for me while you&#039;re there?\&lt;br /&gt;
&lt;br /&gt;
[Jerry] For instance, what can you do in RB that you can&#039;t in PHP, or vice versa?&lt;br /&gt;
&lt;br /&gt;
[Jerry] Or, is the main point simply that you can do all the same stuff, but a lot easier?&lt;br /&gt;
&lt;br /&gt;
[BillW] Carl, if you could answer this sometime before the chat is done... what sort of overhead does the RB server require?&lt;br /&gt;
&lt;br /&gt;
[BillW] going now&lt;br /&gt;
&lt;br /&gt;
[Jerry] And, what do you have to give up, if anything, for that enhanced ease-of-use?&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] Bye Bill&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] Hi Alyce!&lt;br /&gt;
&lt;br /&gt;
[Alyce] hi&lt;br /&gt;
&lt;br /&gt;
[Jerry] Everybody hide your stuff! Alyce is here!&lt;br /&gt;
&lt;br /&gt;
[BillB] I don&#039;t have any stuff.&lt;br /&gt;
&lt;br /&gt;
[Jerry] Somebody hand Bill some stuff.&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] It&#039;s hard to say precisely Bill because we currently run it in a full blown Smalltalk development image. So, right now when Run BASIC is started it immediately consumes 40MB of RAM. The final system will consume less.&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] Okay, all hidden.&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] It&#039;s hard for me to compare RB against PHP because I don&#039;t know PHP.&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] The programming and deployment model is simpler in RB than in the standard CGI style of programming which you use whether it&#039;s with Perl, PHP, Ruby, etc.&lt;br /&gt;
&lt;br /&gt;
[Jerry] Well, I do. So I suppose I should start laying out the parameters.&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] Also, you don&#039;t need to learn multi paradigm system programming with RB. All you need to learn is one application, and a simple BASIC programming language.&lt;br /&gt;
&lt;br /&gt;
[BillB] So Carl, are you and Scott going to have the horses to bring LB5, LB4.xx, RB Free, RB Personal, RB PRo to the unwashed masses in 30 days?&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] Nope.&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] I wish it were so.&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] Hi Chris&lt;br /&gt;
&lt;br /&gt;
[ChrisI] hi&lt;br /&gt;
&lt;br /&gt;
[BillB] Is RB taking priority?&lt;br /&gt;
&lt;br /&gt;
[BillB] Seems like your excitement lies in that direction.&lt;br /&gt;
&lt;br /&gt;
[Jerry] Can I &amp;quot;chain&amp;quot; RB apps, feeding data from one into the other?&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] What do you have to give up for the ease of use? Some flexibility I suppose. I think that Run BASIC will be good at what BASIC has always been good for. Easy programming for the average person, but for the web. Will it displace the currently popular ways of doing things?&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] Perhaps in a small way, but mostly it will just enable new kinds of people and new kinds of projects.&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] RB is taking priority for the moment, yes.&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] We&#039;ll have to see about the chaining feature Jerry. It isn&#039;t in there at this time.&lt;br /&gt;
&lt;br /&gt;
[Jerry] Well, if I can store a file, then open a new RB app and read that file....&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] You can.&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] Or rather I should say that it shouldn&#039;t be a problem doing that.&lt;br /&gt;
&lt;br /&gt;
[Jerry] It might be good enough to have a menu of apps, available to choose from, like you examples list on the RB site.&lt;br /&gt;
&lt;br /&gt;
[BillB] you&#039;d have to add some seaaion like legs to the virtual files as the free vesion presently creates.&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] The free site virtualizes the file system only to prevent abuse of our system.&lt;br /&gt;
&lt;br /&gt;
[Jerry] Can RB grab a data file from another server on the web? For instance, draw from a common databank of subs and routines and format files?&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] The commercial versions won&#039;t have a virtualized file name.&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] file system, I mean.&lt;br /&gt;
&lt;br /&gt;
[BillB] Do you really feel that the web user who buys a 4.95/mo website will need/want/use anything other than the content manager/ template library that comes with the basic site?&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] I&#039;m working on that sort of thing Jerry. At the very least you will be able to fetch a file from a URL.&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] It won&#039;t be hard to write an RSS feed reader or aggregator for example.&lt;br /&gt;
&lt;br /&gt;
[Jerry] Perfect. You can put text files at a URL for fetching.&lt;br /&gt;
&lt;br /&gt;
[ChrisI] wow&lt;br /&gt;
&lt;br /&gt;
[ChrisI] this is looking good so far&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] Bill, the average user does not write programs, so to answer your question, no.&lt;br /&gt;
&lt;br /&gt;
[Jerry] Interesting point, Bill. The old &amp;quot;you can lead a horse to water&amp;quot; concept....&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] The same sort of personality who enjoys programming in QBasic or LB or some similar language will also enjoy RB. I have no doubt.&lt;br /&gt;
&lt;br /&gt;
[ChrisI] I know I&#039;ll have fun with it...&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] Also, the core technology in RB will make an excellent platform for web based programming instruction. &lt;br /&gt;
&lt;br /&gt;
[Jerry] Consider, though, the options for those who want to do interactive stuff. I&#039;ve been there, done that, with Perl, PHP, JavaScript, Java.... Gruesome....&lt;br /&gt;
&lt;br /&gt;
[Alyce] I&#039;m having trouble scrolling up to read the earlier part of the chat, so forgive me if this has been asked already...&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] I&#039;m hoping that we can sell site licenses to schools.&lt;br /&gt;
&lt;br /&gt;
[Alyce] Will there be a way to display image files like GIF, play midi, etc.&lt;br /&gt;
&lt;br /&gt;
[Jerry] You should have a wrapper app already done for them, to jumpstart the operation for instructional development.&lt;br /&gt;
&lt;br /&gt;
[BillB] alyce did you /show 1000?&lt;br /&gt;
&lt;br /&gt;
[Alyce] Yes, Bill, but it keeps jumping back to the bottom when somebody enters&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] You can already display GIF images by embedding HTML. I would gess that you can play MIDI the same way. Perhaps we will also add native commands for these things also. We&#039;ll see.&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] Just copy and paste the text into notepad.&lt;br /&gt;
&lt;br /&gt;
[ChrisI] that&#039;s a good idea... wish I had done it :P&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] Jerry, yes we intend to build a complete system for classroom instruction.&lt;br /&gt;
&lt;br /&gt;
[ChrisI] will there be a way to pass variables into an RB program?&lt;br /&gt;
&lt;br /&gt;
[Jerry] Moodle-like?&lt;br /&gt;
&lt;br /&gt;
[ChrisI] I mean, similar to what PHP does&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] Don&#039;t know Moodle.&lt;br /&gt;
&lt;br /&gt;
[ChrisI] e.g. the ?var1=2&amp;amp;var3=whee&lt;br /&gt;
&lt;br /&gt;
[ChrisI] some way to have a LB program be able to pass variables to an RB program.&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] Chris, you mean in the URL? Yes. We will support that.&lt;br /&gt;
&lt;br /&gt;
[ChrisI] cool&lt;br /&gt;
&lt;br /&gt;
[Jerry] Moodle is in PHP, about 900 pages of HTML files, handles everything from student registration to lessons to quizzes to branching PI to grading to forums.... Sheesh.... Too intimidating.&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] We haven&#039;t really considered any sort of LB to RB bridge.&lt;br /&gt;
&lt;br /&gt;
[ChrisI] Just wondering, I&#039;ve done similar stuff with PHP files.&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] We&#039;ll start small. It will also specialize in teaching programming interactively, which I believe it can do better than other products.&lt;br /&gt;
&lt;br /&gt;
[ChrisI] sweet&lt;br /&gt;
&lt;br /&gt;
[Jerry] RB is, indeed, LOGO-like. It will make an excellent tinro to programming tool.&lt;br /&gt;
&lt;br /&gt;
[Alyce] Hi Jan&lt;br /&gt;
&lt;br /&gt;
[BillB] sounds like a major development target will be an interactive debugger.&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] Debugging will be interesting. Probably won&#039;t be very fancy at first.&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] We don&#039;t have a debugger at this time.&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] Well, actually we do if I consider the LB5 debugger. But that doesn&#039;t run in a web browser. Perhaps we can use it anyway.&lt;br /&gt;
&lt;br /&gt;
[BillB] maybe have errors bounce into the help file... that&#039;d be one way to get it read.&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] I think we may be able to do something effective in the browser though. We&#039;re going to give it a try.&lt;br /&gt;
&lt;br /&gt;
[BillW] well, if it&#039;s a home server, the LB5 debugger could work&lt;br /&gt;
&lt;br /&gt;
[Jan] Hi, everyone. I don&#039;t want to interrupt.&lt;br /&gt;
&lt;br /&gt;
[BillW] have you considered the ability to virtualize URLs?&lt;br /&gt;
&lt;br /&gt;
[BillW] ala mod_rewrite under apache&lt;br /&gt;
&lt;br /&gt;
[ChrisI] Hi, jan&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] No Bill, but I&#039;m open to suggestions.&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] I see. Probably if people want to rewrite URLs in that way they should consider running Apache. That&#039;s what I do. Perhaps once we get the core features of RB done I can consider such things.&lt;br /&gt;
&lt;br /&gt;
[BillB] so Carl, sneak peek into time line. You said late April for some form of personal RB, what about other stuff on your plate.&lt;br /&gt;
&lt;br /&gt;
[BillW] Wait... is this run through Apache or something?&lt;br /&gt;
&lt;br /&gt;
[ChrisI] it can be, as I understand it&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] Run BASIC does not require Apache.&lt;br /&gt;
&lt;br /&gt;
[ChrisI] it can also be run stand-alone&lt;br /&gt;
&lt;br /&gt;
[BillW] but it can be run through apache?&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] However it can be run behind Apache.&lt;br /&gt;
&lt;br /&gt;
[BillW] sweet!&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] Apache can be set up as a proxy for any other kind of web server, including another running instance of Apache if you like. &lt;br /&gt;
&lt;br /&gt;
[BillW] I&#039;ll have to look into that &lt;br /&gt;
&lt;br /&gt;
[CarlGundel] As for other things on my plate, right now I am investing cycles in LB v4.04, especially since Vista was released.&lt;br /&gt;
&lt;br /&gt;
[BillW] will we see any new features in 4.04? just wondering...&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] I do have a Vista machine now to do my testing on. I was holding off since I read so many horror stories about upgrading. Finally I got the sense that this is immediately impacting our sales. So I caved.&lt;br /&gt;
&lt;br /&gt;
[Jerry] Can I park the RB image on top of my Squeak VM, or should I grab Seaside to do the job?&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] LB v4.04 is a bugfix release. No new features.&lt;br /&gt;
&lt;br /&gt;
[BillW] ok&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] You don&#039;t need a copy of Squeak or Seaside to use RB. It will come all in one.&lt;br /&gt;
&lt;br /&gt;
[Jerry] Great. Let know when, and I can break into someone&#039;s broadband for the download.&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] testing&lt;br /&gt;
&lt;br /&gt;
[BillB] all is well.&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] One thing that I haven&#039;t given much thought to is whether or not to offer a trial version of RB.&lt;br /&gt;
&lt;br /&gt;
[BillB] Would you need more than the free version?&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] I&#039;ve been mostly thinking that the free site and some well don&#039;t screencasts will suffice.&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] well done&lt;br /&gt;
&lt;br /&gt;
[Alyce] The free site is enough.&lt;br /&gt;
&lt;br /&gt;
[Alyce] Just my opinion, of course.&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] On the other hand selling to schools will probably require lots of direct selling.&lt;br /&gt;
&lt;br /&gt;
[Jan] I would think as well.&lt;br /&gt;
&lt;br /&gt;
[Jan] It might do well to have a few educational applications for samples.&lt;br /&gt;
&lt;br /&gt;
[Alyce] Personal license, professional license... is the pro license the one schools would use?&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] Also a few well done web applications that people can try will probably also do a great deal to promote RB.&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] Schools would use an educational license. This is different than the personal or pro system. It would integrate account management for instructors and students with interactive lessons and quizzes, etc.&lt;br /&gt;
&lt;br /&gt;
[Jan] The timing is certainly right. There&#039;s a big push to demonstrate technology is being integrated into the classroom right now.&lt;br /&gt;
&lt;br /&gt;
[BillB] I&#039;d think the biggest need for schools would be a good textbook with teacher guides that could be dropped in as boilerplate to the curriculum.&lt;br /&gt;
&lt;br /&gt;
[Jan] You&#039;re right, but beaurocracy dictates differently.&lt;br /&gt;
&lt;br /&gt;
[Alyce] If only we knew a tech writer who has an interest in schools..&lt;br /&gt;
&lt;br /&gt;
[Jan] So, essentially, non web-literate teachers are grabbing at anything &#039;simple&#039; they can to be in compliance.&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] Yeah, who could do that kind of writing....? &lt;br /&gt;
&lt;br /&gt;
[Alyce] &amp;quot;Creating Cool Web Pages Without Perl&amp;quot; -- maybe I&#039;ll give it a try? &lt;br /&gt;
&lt;br /&gt;
[CarlGundel] Bill and Jan. I&#039;m not sure what you guys are getting at?&lt;br /&gt;
&lt;br /&gt;
[Alyce] Some teachers are trying to teach when they don&#039;t know diddly about programming&lt;br /&gt;
&lt;br /&gt;
[Jan] I think a good program, such as Run BASIC, is timely right now.&lt;br /&gt;
&lt;br /&gt;
[Alyce] I agree, Jan.&lt;br /&gt;
&lt;br /&gt;
[Jan] I&#039;ve been to a couple of tech inservices and blogging is being pushed.&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] Well, that&#039;s true. On the other hand RB will be good for the teachers to learn programming too. &lt;br /&gt;
&lt;br /&gt;
[Jan] While I think reflection is a great learning tool, I&#039;m not sure this is what technology embraces.&lt;br /&gt;
&lt;br /&gt;
[Alyce] Right, Carl, that&#039;s the point... something the teachers can learn easily.&lt;br /&gt;
&lt;br /&gt;
[BillB] Selling web development to the educational community won&#039;t fly unless it&#039;s transparent to, quoting Janet, non web-literate faculty&lt;br /&gt;
&lt;br /&gt;
[Jan] Exactly, Carl, so Run BASIC will appeal to those teachers who haven&#039;t programmed, are learning a little HTML and they can actually produce something quuickly.&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] You mean blogging is being pushed as something to teach to children? Can&#039;t they just include that as a creating writing elective? OTOH kids probably know more about blogging than the teachers do.&lt;br /&gt;
&lt;br /&gt;
[Jan] Ya think? My space comes to mind.&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] Well, I admit that selling RB to k12 would be appealing, but my primary focus is on the adult education sector.&lt;br /&gt;
&lt;br /&gt;
[Alyce] Jan, would RB be of use to you as a teacher?&lt;br /&gt;
&lt;br /&gt;
[Jan] It wouldn&#039;t to me because my students are very specific. but..&lt;br /&gt;
&lt;br /&gt;
[Jan] I could certainly see this as a tool for grades 6 - 12.&lt;br /&gt;
&lt;br /&gt;
[BillB] brb... gonna check the other names are clear in db so they can get back in.&lt;br /&gt;
&lt;br /&gt;
[Jan] Just the ability to post practice test questions, etc. would be benefiical.&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] Making it easy for teachers to customize and add to the materials is definitely important.&lt;br /&gt;
&lt;br /&gt;
[Jan] And having been to a couple of tech inservices with HS teachers, yeah, I think RB would be attractive to some.&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] I&#039;d be interested in attending an appropriate conference or two. Are there any high profile conferences I should consider? Anyone know?&lt;br /&gt;
&lt;br /&gt;
[Jan] There&#039;s a teacher&#039;s organization, MassONE, that&#039;s an e-newlstter for educators K-12.&lt;br /&gt;
&lt;br /&gt;
[Alyce] NEA?&lt;br /&gt;
&lt;br /&gt;
[Jan] I&#039;ll check them out and send you a few links.&lt;br /&gt;
&lt;br /&gt;
[StefanP] Hello Girls and boys ;-)&lt;br /&gt;
&lt;br /&gt;
[Jan] Hi, Stefan. Is it in the middle of the night for you?&lt;br /&gt;
&lt;br /&gt;
[StefanP] No just 7:30 PM&lt;br /&gt;
&lt;br /&gt;
[Alyce] Hi Stefan&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] Hi Stefan&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] Thanks for the pointers. I realize that I have a lot to learn about selling to schools.&lt;br /&gt;
&lt;br /&gt;
[Jan] The important thing is you have a product that is just what they need -- easy to learn and effective. Truly, the timing couldn&#039;t be any better.&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] That&#039;s exciting. I think that I&#039;ve learned though that you can have a solution to everyone&#039;s problems but if you can&#039;t make them understand that you&#039;re sunk. So, learning how to get the message across to the right people is the critical thing.&lt;br /&gt;
&lt;br /&gt;
[Jan] I have to run now. I&#039;ll get together a few Massachusetts links / contacts sent to you.&lt;br /&gt;
&lt;br /&gt;
[Jan] Bye all.&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] Thanks Jan!&lt;br /&gt;
&lt;br /&gt;
[BillB] and keep IT happy. Like Blackboard, give each teacher their &amp;quot;space&amp;quot; and forget them. They&#039;ll do their own development.&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] Run BASIC will be very simple to administer. I think the IT people will like it.&lt;br /&gt;
&lt;br /&gt;
[Alyce] Talk to you later! Bye&lt;br /&gt;
&lt;br /&gt;
[StefanP] Since I am in the IT, will I like it ???&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] You&#039;d better!&lt;br /&gt;
&lt;br /&gt;
[BillB] Same here...&lt;br /&gt;
&lt;br /&gt;
[BillB] okay folks, getting about that time... missed lunch. catch ya&#039;ll later.&lt;br /&gt;
&lt;br /&gt;
[StefanP] I have some things I would realy like to use RB for, to keep me from learning HTML and Java Script.&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] Okay, bye Bill!&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] Well Stefan, you&#039;ve come to the right place. &lt;br /&gt;
&lt;br /&gt;
[BillB] I&#039;ll be back later to collect the transcript for Alyce.&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] It&#039;s just you and me Stefan.&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] Any specific questions?&lt;br /&gt;
&lt;br /&gt;
[StefanP] I can do them in LB right now, but the need to have a network share to have access for more people and have only one place to maintain the apps is not the best way.&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] I see, so you&#039;d like to convert some of your LB apps to web apps?&lt;br /&gt;
&lt;br /&gt;
[StefanP] RB offers to have acces from any place without the need to use a network share, THATS useability and easy maintenance.&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] Yes. I&#039;m happy to see that you understand the appeal of RB! &lt;br /&gt;
&lt;br /&gt;
[CarlGundel] Have you seen the blog app screencast?&lt;br /&gt;
&lt;br /&gt;
[StefanP] Your blog example inspired me to create a bug report page, because now I have to run through the whole place and ask people if they have problems.&lt;br /&gt;
&lt;br /&gt;
[StefanP] Sure they have, but writting an e-mail addressed to me with the problem is SOOOO hard to do, when you just have to open explorer and go to the Exchange page ....&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] That&#039;s cool. I&#039;m thinking about creating a TODO list manager (like a mini project manager) to help me and my wife keep in sync. I&#039;m excited to use RB myself.&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] With a system like Run BASIC it will be easy to capitalize on new hi tech phones like the iPhone.&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] That phone has a real browser and should run RB apps nicely.&lt;br /&gt;
&lt;br /&gt;
[StefanP] Do you have a schedule for RB 2.20, 2.19 with the links is awesome.&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] The 2.19 site actually has all the language features of the 2.20 demonstrated in the screencast. We&#039;ll come out with a new build pretty soon though I&#039;m sure.&lt;br /&gt;
&lt;br /&gt;
[StefanPend] Well our company network does not like to chat I think : &lt;br /&gt;
&lt;br /&gt;
[CarlGundel] Oh. Did you lose your session?&lt;br /&gt;
&lt;br /&gt;
[StefanPend] Yes Firewall connection error ;-D&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] We will put together another screencast sometime soon. I wan&#039;t to show how to style the blog application using CSS.&lt;br /&gt;
&lt;br /&gt;
[StefanPend] Didn&#039;t know that, I just thought only the links have already been implemented, as you responded on conforum.&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] Did I say that? Hmm. Open mouth, insert foot.&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] You can use the password and textarea commands now.&lt;br /&gt;
&lt;br /&gt;
[StefanPend] The videos are worth a thousend pages written.&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] Oh, the password command is actually passwordbox&lt;br /&gt;
&lt;br /&gt;
[StefanPend] Hope I will have some time in the next days to do some more testing of RB, currently work is flushing me away, so that I usualy only answer my mails and hurry through the forums. not the best for an Admin and Mod :-(&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] Do you have a blog?&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] Hi again.&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] Hey, you&#039;re the IT. Fix that firewall. &lt;br /&gt;
&lt;br /&gt;
[StefanP] I don&#039;t have a blog nor a diary. I am making up my mind privatly &lt;br /&gt;
&lt;br /&gt;
[CarlGundel] I only asked because I want to encourage people who like LB and RB to blog about it. But you don&#039;t blog.&lt;br /&gt;
&lt;br /&gt;
[StefanP] Well it is M$ ISA Server first release, we will try to upgrade to release 2007.&lt;br /&gt;
&lt;br /&gt;
[StefanP] I am responsible for CAD and CAM manly, internet is for my department manager ;D&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] Does he use LB?&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] Or is he a she?&lt;br /&gt;
&lt;br /&gt;
[StefanP] He is a he and use VB, I am the only one using about 5 different languages a week.&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] So you should hide his copy of VB and change his browser home to &lt;!-- ws:start:WikiTextUrlRule:687:http://www.libertybasic.com --&gt;&lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://www.libertybasic.com&quot; rel=&quot;nofollow&quot;&gt;http://www.libertybasic.com&lt;/a&gt;&lt;!-- ws:end:WikiTextUrlRule:687 --&gt; ;)&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] Anyways I&#039;m just kidding of course.&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] Do you think that RB would be useful to others where you work?&lt;br /&gt;
&lt;br /&gt;
[StefanP] Sorry, I do not even know where he has put it and I do not crack passwords either, but there seam to be some members entering LB world from time to time doing bad things.&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] Well, there doesn&#039;t seem that we can do much about that.&lt;br /&gt;
&lt;br /&gt;
[StefanP] For a personal tool to get back to programming witout the need to install anything, yes.&lt;br /&gt;
&lt;br /&gt;
[StefanP] We can ban them or offer them our copy of ISA &lt;br /&gt;
&lt;br /&gt;
[CarlGundel] Do you think that a subscription service would be interesting?&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] I&#039;m skeptical that this is a good business model, but I&#039;m curious what others think.&lt;br /&gt;
&lt;br /&gt;
[StefanP] I do use CITRIX Presentation Server which uses a subscription and I think it is good.&lt;br /&gt;
&lt;br /&gt;
[StefanP] You pay for one year and can decide if you like to pay for another one, but get free updates even for major releases.&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] Yes, but what do you pay for that? I&#039;m not sure I could make money selling RB as a service.&lt;br /&gt;
&lt;br /&gt;
[StefanP] This is a per user payment, so you pay for concurrent use.&lt;br /&gt;
&lt;br /&gt;
[CarlGundel] To be clear I mean subscription in the sense that we would host RB on our network. The customer would always be using RB remotely.&lt;br /&gt;
&lt;br /&gt;
[Carl] Happened to me too that time&lt;br /&gt;
&lt;br /&gt;
[Carl] This model means of course that the user really never would have to install anything.&lt;br /&gt;
&lt;br /&gt;
[Carl] Hi Bill. Having some problems here. &lt;br /&gt;
&lt;br /&gt;
[PendlS] Now I am trying IE6 instead of FF2, huray crashing servers the new competition &lt;br /&gt;
&lt;br /&gt;
[Carl] funny.&lt;br /&gt;
&lt;br /&gt;
[PendlS] As a remote service you would need a per user licensing system, every connected user will count till no license is left.&lt;br /&gt;
&lt;br /&gt;
[CarlG] I see. This works well for customers that don&#039;t cause heavy loading.&lt;br /&gt;
&lt;br /&gt;
[CarlG] Well, I should get going. Thanks for coming to the chat!&lt;br /&gt;
&lt;br /&gt;
[PendlS] An application server is always hard to manage, because usage is very alternating. I had to increase resources myself this week, because of increasing traffic.&lt;br /&gt;
&lt;br /&gt;
[CarlG] Yes.&lt;br /&gt;
&lt;br /&gt;
[CarlG] Well, I&#039;ve got to go.&lt;br /&gt;
&lt;br /&gt;
[PendlS] I wish you a nice weekend see you at sunday &lt;br /&gt;
&lt;br /&gt;
[CarlG] Thanks. You too! &lt;br /&gt;
&lt;br /&gt;
[CarlG] bye!&lt;br /&gt;
&lt;br /&gt;
[PendlS] Bye ...</description>
          </item>
    <item>
      <title>12082005</title>
      <link>https://basic.wikispaces.com/12082005</link>
      <dc:creator>Alyce</dc:creator>
      <guid isPermaLink="true">https://basic.wikispaces.com/12082005</guid>
      <comments>https://basic.wikispaces.com/page/messages/12082005</comments>
      <pubDate>Mon, 06 Feb 2006 16:20:28 GMT</pubDate>
      <description>December 8, 2005 Chat with Carl&lt;br /&gt;
&lt;hr /&gt;
&lt;br /&gt;
Janet enters this room&lt;br /&gt;
&lt;br /&gt;
[Alyce] Hi Janet!&lt;br /&gt;
&lt;br /&gt;
[Janet] Hi, Alyce. I can&#039;t stay more than 10 - 15 minutes.&lt;br /&gt;
&lt;br /&gt;
[Alyce] I havent&#039; downloaded your newest flowchart yet&lt;br /&gt;
&lt;br /&gt;
[Janet] Have you done a lot with the newest Assist?&lt;br /&gt;
&lt;br /&gt;
[Alyce] I can&#039;t wait to see it. The previous versions were &lt;br /&gt;
terrific.&lt;br /&gt;
&lt;br /&gt;
[Alyce] I&#039;ve been using Assist quite a bit, how about you?&lt;br /&gt;
&lt;br /&gt;
[Janet] Flowchart: It&#039;s still buggy, but at least now the bugs &lt;br /&gt;
can be singled out.&lt;br /&gt;
&lt;br /&gt;
[Janet] I&#039;ve used it a lot, but only with the same types of &lt;br /&gt;
things. (Assist)&lt;br /&gt;
&lt;br /&gt;
[Janet] This means I haven&#039;t found any problems (and I do like it), &lt;br /&gt;
but I haven&#039;t pushed it either.&lt;br /&gt;
&lt;br /&gt;
[Alyce] Yes, I think we each do out own &amp;quot;thing&amp;quot; with it.&lt;br /&gt;
&lt;br /&gt;
[Janet] What do you think about FreeForm? Do you think your entry &lt;br /&gt;
will win?&lt;br /&gt;
&lt;br /&gt;
[Alyce] I don&#039;t use the code formatter, for instance.&lt;br /&gt;
&lt;br /&gt;
[Janet] I would say &#039;hands down&#039;, but Dan&#039;s looked pretty good as well.&lt;br /&gt;
&lt;br /&gt;
[Alyce] Gosh, I don&#039;t know about Freeform. I thought all of the entries &lt;br /&gt;
had great features.&lt;br /&gt;
&lt;br /&gt;
[Janet] Assist: I really like the code formatter, but I tend to write &lt;br /&gt;
in outline form anyway. I find myself adapting to the Assist style quite well. &lt;br /&gt;
&lt;br /&gt;
[Alyce] Do you use the performance profiler in the debugger?&lt;br /&gt;
&lt;br /&gt;
[Janet] Assist: The versioning is by far the best feature.&lt;br /&gt;
&lt;br /&gt;
[Janet] I used it just to test it out, but not as a regular feature.&lt;br /&gt;
&lt;br /&gt;
[Alyce] I used it with the rendering routines, but my computer is fast, &lt;br /&gt;
so I couldn&#039;t see much difference.&lt;br /&gt;
&lt;br /&gt;
[Alyce] Yes, the versioning rocks!&lt;br /&gt;
&lt;br /&gt;
[Alyce] I love looking at the difference browser, too.&lt;br /&gt;
&lt;br /&gt;
[Janet] Tomorrow I&#039;m going to just go through every feature one by one &lt;br /&gt;
and make notes on them.&lt;br /&gt;
&lt;br /&gt;
[Alyce] I used to have two windows open next to one another to search &lt;br /&gt;
out the differences between files. This is so much easier.&lt;br /&gt;
&lt;br /&gt;
[Janet] I told Carl I&#039;d have something by the end of the weekend for a &lt;br /&gt;
review for you both to preview.&lt;br /&gt;
&lt;br /&gt;
[Alyce] That&#039;s great!&lt;br /&gt;
&lt;br /&gt;
[Janet] Side by side windows? Yeah!! And do you make sure they&#039;re lined up &lt;br /&gt;
perfectly so just by a single scroll, you can spot a difference? LOL&lt;br /&gt;
&lt;br /&gt;
[Alyce] Carl was here in the chatroom, and we just missed him by a few minutes. Darn.&lt;br /&gt;
&lt;br /&gt;
[Janet] That&#039;s what is so great about the versioning.&lt;br /&gt;
&lt;br /&gt;
[Alyce] Yes, I did line them up! The difference browser is so cool, &lt;br /&gt;
with the different colors. The differences just jump out at you.&lt;br /&gt;
&lt;br /&gt;
[Janet] Carl will probably come back. He was still logged into &lt;br /&gt;
the forum when I got here. You did say 3pm our time.&lt;br /&gt;
&lt;br /&gt;
Bwebmaster enters this room&lt;br /&gt;
&lt;br /&gt;
[Janet] Hi, Bwebmaster!&lt;br /&gt;
&lt;br /&gt;
[Alyce] We can copy the chat and archive it, if anything interesting &lt;br /&gt;
is said.&lt;br /&gt;
&lt;br /&gt;
[Alyce] Hello B.&lt;br /&gt;
&lt;br /&gt;
[Janet] I just think there have been so many new and wonderful things &lt;br /&gt;
these last 3 or 4 months that it&#039;s just so hard to find the time to play &lt;br /&gt;
with them all.&lt;br /&gt;
&lt;br /&gt;
[Alyce] Have you tried John&#039;s FTP program? I haven&#039;t had a chance, yet.&lt;br /&gt;
&lt;br /&gt;
[Janet] I definitely need to work with your browser more. That .gif &lt;br /&gt;
display was lots of fun to write.&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] What exactly is assist?&lt;br /&gt;
&lt;br /&gt;
[Alyce] That was cool. I never envisioned some of the things people &lt;br /&gt;
do with the browser.&lt;br /&gt;
&lt;br /&gt;
[Alyce] Assist is an enhancement of the LB IDE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[Alyce] Janet is writing a review that we hope to publish.&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] From what I&#039;ve heard, it has versioning features that make &lt;br /&gt;
it easier to modify code.&lt;br /&gt;
&lt;br /&gt;
[Janet] John&#039;s FTP: But, I did download a picture from my site (soon to be &lt;br /&gt;
announced site) and that worked just fine. OKay, back to Assist.&lt;br /&gt;
&lt;br /&gt;
[Alyce] B, that&#039;s right.&lt;br /&gt;
&lt;br /&gt;
[Janet] Assist: Bwebmaster, you are going to love the versioning.&lt;br /&gt;
&lt;br /&gt;
[Alyce] You have a project, and you commit versions as you go along.&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] Sounds great. Are they any other eye-popers?&lt;br /&gt;
&lt;br /&gt;
[Alyce] When you make substantial changes, commit to a new version.&lt;br /&gt;
&lt;br /&gt;
[Janet] Assist: and, I&#039;ll be you&#039;ll be intrigued by the performance &lt;br /&gt;
profiler as well in the debugger. It tells you how much time the code &lt;br /&gt;
is spending in any one event.&lt;br /&gt;
&lt;br /&gt;
[Alyce] All are stored for you, along with comments that you enter &lt;br /&gt;
when you commit.&lt;br /&gt;
&lt;br /&gt;
[Alyce] Scroll up and see what we were saying about the difference browser.&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] Wow, that is great stuff!&lt;br /&gt;
&lt;br /&gt;
[Alyce] It is really neat.&lt;br /&gt;
&lt;br /&gt;
[Janet] It formats your code with auto nested indenting. It&#039;s just &lt;br /&gt;
really cool.&lt;br /&gt;
&lt;br /&gt;
[Alyce] There&#039;s a program deployment tool that&#039;s more full-featured &lt;br /&gt;
than the Create Application.&lt;br /&gt;
&lt;br /&gt;
[Alyce] I haven&#039;t used it much.&lt;br /&gt;
&lt;br /&gt;
[Alyce] You can specify additional files, and an icon, and a &lt;br /&gt;
deployment path.&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] Hmm... deployment.... sounds like VB .NET Express&#039;s &lt;br /&gt;
deploy application feature&lt;br /&gt;
&lt;br /&gt;
[Alyce] Janet, I can&#039;t wait to see your site!&lt;br /&gt;
&lt;br /&gt;
[Janet] The deployment tool works really well, but it was a little &lt;br /&gt;
hard for me to get the hang of it the first time. It will be &lt;br /&gt;
interesting to see how easy it is to follow the directions in &lt;br /&gt;
Carl&#039;s new help file.&lt;br /&gt;
&lt;br /&gt;
Carl enters this room&lt;br /&gt;
&lt;br /&gt;
[Alyce] If you deply, you still have to zip your files, or use an &lt;br /&gt;
installer program.&lt;br /&gt;
&lt;br /&gt;
[Alyce] Hi Carl.&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] Hi, Carl&lt;br /&gt;
&lt;br /&gt;
[Janet] It&#039;s very simple right now, Alyce. I&#039;m just trying to find &lt;br /&gt;
the time to add some links before I announce it.&lt;br /&gt;
&lt;br /&gt;
[Janet] Hi, Carl.&lt;br /&gt;
&lt;br /&gt;
[Janet] So far you haven&#039;t missed any negative things about Assist, &lt;br /&gt;
just good remarks. &lt;br /&gt;
&lt;br /&gt;
[Carl] Hi all!&lt;br /&gt;
&lt;br /&gt;
[Alyce] Janet, I agree about the deployment tool being a little tricky.&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] Well, I have to say that Deploy App would cut out most &lt;br /&gt;
of the use I currently have for ResHacker&lt;br /&gt;
&lt;br /&gt;
[Alyce] I bugged Carl, er, I mean made suggestions and it&#039;s a little &lt;br /&gt;
easier now.&lt;br /&gt;
&lt;br /&gt;
[Janet] I think you&#039;ll really like it. Once I got the hang of it, &lt;br /&gt;
it worked really well.&lt;br /&gt;
&lt;br /&gt;
[Carl] Of course I am interested in making Assist easier to use, &lt;br /&gt;
but right now I&#039;m just trying to get a first release out.&lt;br /&gt;
&lt;br /&gt;
[Janet] And my learning curve does seem to be a little longer than most.&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] Does it make an installer program?&lt;br /&gt;
&lt;br /&gt;
[Alyce] One thing I&#039;ve found... make lots of programmers &lt;br /&gt;
comments when you commit a version.&lt;br /&gt;
&lt;br /&gt;
[Alyce] B, no, that&#039;s what I was saying. There&#039;s no installer, &lt;br /&gt;
but all of your files are gathered together, so it&#039;s easy to &lt;br /&gt;
use one of the free installers with them.&lt;br /&gt;
&lt;br /&gt;
[Carl] Assist doesn&#039;t make an installer. That&#039;d be a whole new &lt;br /&gt;
product by itself.&lt;br /&gt;
&lt;br /&gt;
[Janet] I really like the Help File, Carl. The pictures really &lt;br /&gt;
help a lot. I didn&#039;t realize I was becoming a very visual learner.....&lt;br /&gt;
&lt;br /&gt;
[Alyce] Yes, the step-by-step pictures are great.&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] OK, guess I shouldn&#039;t throw out my setup maker just yet.&lt;br /&gt;
&lt;br /&gt;
[Carl] I figured that the easiest way to explain Assist would &lt;br /&gt;
be with a walkthrough with lots of images.&lt;br /&gt;
&lt;br /&gt;
[Alyce] Carl, the help is terrific.&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] Carl, how much will Assist cost?&lt;br /&gt;
&lt;br /&gt;
[Janet] Alyce, Can I quote you on that in the review: &lt;br /&gt;
&amp;quot;make lots of programmers comments....&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[Alyce] Sure, Janet.&lt;br /&gt;
&lt;br /&gt;
[Alyce] Carl, generally, a helpfile should be more of a reference, &lt;br /&gt;
but with Assist, the tutorial is really needed to understand how &lt;br /&gt;
to use it well.&lt;br /&gt;
&lt;br /&gt;
[Carl] I guess if there is a popular setup creator that could be &lt;br /&gt;
driven by a file, that a mechanism for launching another program &lt;br /&gt;
at the end of deployment would be helpful. Thoughts?&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] Huh?&lt;br /&gt;
&lt;br /&gt;
[Alyce] I don&#039;t know much about setup makers. I use Setup2Go&lt;br /&gt;
&lt;br /&gt;
[Alyce] I don&#039;t know if any will run by a command line or &lt;br /&gt;
script file.&lt;br /&gt;
&lt;br /&gt;
[Janet] program launcher - and that (the choice of a program) &lt;br /&gt;
could be customized by the user?&lt;br /&gt;
&lt;br /&gt;
[Carl] You know, like a way to script some external actions at &lt;br /&gt;
the end of deploying. That way it could be used with your &lt;br /&gt;
favorite setup creator.&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] Oh, now I get it. The only &#039;modular&#039;&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] Ignore that last one.&lt;br /&gt;
&lt;br /&gt;
[Alyce] Carl, Bwebmaster asked about the price. Is it set yet?&lt;br /&gt;
&lt;br /&gt;
[Janet] I&#039;m just playing with the colors. Am I green now?&lt;br /&gt;
&lt;br /&gt;
[Carl] Assist will cost $49.95 and requires that the user have &lt;br /&gt;
a GOLD license.&lt;br /&gt;
&lt;br /&gt;
[Janet] Ohhh.,.. scratch that color&lt;br /&gt;
&lt;br /&gt;
[Carl] scratch that one too, please?&lt;br /&gt;
&lt;br /&gt;
[Alyce] LOL&lt;br /&gt;
&lt;br /&gt;
[Janet] Sorry, this chat thing is a bit new to me. Going &lt;br /&gt;
back to black now.&lt;br /&gt;
&lt;br /&gt;
[Alyce] Janet is traveling incognito!&lt;br /&gt;
&lt;br /&gt;
[Carl] Yeah, enough itchy colors. ;-)&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] That is very reasonable, compared to $400+ for &lt;br /&gt;
Visual Studio .NET&lt;br /&gt;
&lt;br /&gt;
[Carl] I&#039;m glad you think so.&lt;br /&gt;
&lt;br /&gt;
[Alyce] LB is so much easier to use, that you can&#039;t &lt;br /&gt;
really compare them.&lt;br /&gt;
&lt;br /&gt;
[Carl] I know some people will think that an add-on should &lt;br /&gt;
cost less than the thing you&#039;re adding it onto.&lt;br /&gt;
&lt;br /&gt;
[Janet] How is the testing going for LB4.3? There doesn&#039;t &lt;br /&gt;
seem to be any major glitches at first run.&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] Yes, I got the free VB.NET thing MS is doing, &lt;br /&gt;
so far it has hogged memory and looked ugly&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] The menus are blue! That&lt;br /&gt;
&lt;br /&gt;
JohnD enters this room&lt;br /&gt;
&lt;br /&gt;
[Carl] Well, there have been a handful of bug reports, but nothing &lt;br /&gt;
major. On the other hand I&#039;m not sure how many people are really &lt;br /&gt;
trying it out. I should actively solicit some response.&lt;br /&gt;
&lt;br /&gt;
[Alyce] John! Yo!&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] Hey, John&lt;br /&gt;
&lt;br /&gt;
[Janet] Hi, John!&lt;br /&gt;
&lt;br /&gt;
[Carl] Hi John!&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] As far as scripting the deploy application, I would use it.&lt;br /&gt;
&lt;br /&gt;
[Alyce] Carl, what about the null terminator thing that Mike just &lt;br /&gt;
posted about?&lt;br /&gt;
&lt;br /&gt;
[JohnD] Hi Carl&lt;br /&gt;
&lt;br /&gt;
[Carl] Noted.&lt;br /&gt;
&lt;br /&gt;
[Janet] I remember when 4.01 was tested. Immediately there were problems &lt;br /&gt;
with dll&#039;s. So this silence could be a good tihng.&lt;br /&gt;
&lt;br /&gt;
[Carl] Not sure I know what null terminator thing you mean?&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] Dunno if anyone&#039;s familiar with Inno, but you &lt;br /&gt;
write out scripts that it &#039;compiles&#039; into a setup program&lt;br /&gt;
&lt;br /&gt;
[Alyce] Unfortunately, a lot of folks prefer to wait for an &lt;br /&gt;
official release.&lt;br /&gt;
&lt;br /&gt;
[Alyce] Are null terminators necessary to pass strings byref &lt;br /&gt;
into api calls?&lt;br /&gt;
&lt;br /&gt;
[Alyce] It seems they are no longer needed.&lt;br /&gt;
&lt;br /&gt;
[Alyce] Inno takes scripts and runs from the command line?&lt;br /&gt;
&lt;br /&gt;
[Carl] Since v4.03 is almost exclusively fixes, this will &lt;br /&gt;
hopefully help prevent too many issues from arising. But you &lt;br /&gt;
never know.&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] Basically, I could use such a feature to automate &lt;br /&gt;
the entire depolyment process&lt;br /&gt;
&lt;br /&gt;
[Alyce] Carl, why would we use the mainwin on debug feature?&lt;br /&gt;
&lt;br /&gt;
[Carl] So you&#039;re looking to fix that information in the docs? &lt;br /&gt;
Let me get back to you on that.&lt;br /&gt;
&lt;br /&gt;
[Alyce] Right...&lt;br /&gt;
&lt;br /&gt;
[Janet] I have to leave now. I&#039;m really sorry I can&#039;t stay longer. &lt;br /&gt;
I&#039;ll look for the archive later to see if I&#039;ve missed anything.&lt;br /&gt;
&lt;br /&gt;
[Alyce] Bye Janet. Take care.&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] I use it to make sure varaiables are what they should be&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] And then firgure out what went wrong&lt;br /&gt;
&lt;br /&gt;
[JohnD] By Janet&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] which would be much easier with what assist is offering&lt;br /&gt;
&lt;br /&gt;
[Carl] That new feature was inspired by Wilf Hey, who is a &lt;br /&gt;
columnist for PC Plus magazine. He wanted to be able to put &lt;br /&gt;
debug strings in his code, and then be able to look at those &lt;br /&gt;
strings without having to comment out the nomainwin statement &lt;br /&gt;
and then uncomment it.&lt;br /&gt;
&lt;br /&gt;
[Janet] Bye, all!&lt;br /&gt;
&lt;br /&gt;
[Alyce] VB has a debug.print command and it prints stuff to the &lt;br /&gt;
immediate window in the IDE. I guess the &#039;open mainwin on debug&#039; &lt;br /&gt;
would do the same thing.&lt;br /&gt;
&lt;br /&gt;
Janet exits from this room&lt;br /&gt;
&lt;br /&gt;
[Carl] By Janet.&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] Alyce, what version of VB do you use?&lt;br /&gt;
&lt;br /&gt;
[Alyce] I guess I either use the debugger, or print info to &lt;br /&gt;
the mainwin. I&#039;ll have to try them in tandem.&lt;br /&gt;
&lt;br /&gt;
[Carl] Aside from Assist, that feature is the only new thing i&lt;br /&gt;
n v4.03, unless I&#039;m forgetting something. :-/&lt;br /&gt;
&lt;br /&gt;
[Carl] And the bugfixes of course.&lt;br /&gt;
&lt;br /&gt;
[Alyce] I think that&#039;s all.&lt;br /&gt;
&lt;br /&gt;
[Carl] Some people love to pepper their programs with debug strings.&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] Well, that&#039;s pretty good&lt;br /&gt;
&lt;br /&gt;
[Alyce] John, what do you like best about Assist.&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] Will this be the last 4x LB release?&lt;br /&gt;
&lt;br /&gt;
[Alyce] Carl, that gives me an idea...&lt;br /&gt;
&lt;br /&gt;
[Alyce] If we could have a debug.print type command, it &lt;br /&gt;
needn&#039;t be compiled into the TKN.&lt;br /&gt;
&lt;br /&gt;
[Alyce] As it is, we need to remove those debug strings &lt;br /&gt;
before tokenizing to reduce the size.&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] Hey, that sounds nice!&lt;br /&gt;
&lt;br /&gt;
[Carl] I&#039;m not sure if this will be the last v4.x. There &lt;br /&gt;
will probably be another release of Assist for LB4 if &lt;br /&gt;
nothing else.&lt;br /&gt;
&lt;br /&gt;
[Carl] Yeah, that&#039;s a good idea for LB v4.04. :-)&lt;br /&gt;
&lt;br /&gt;
[Alyce] &lt;br /&gt;
&lt;br /&gt;
[Carl] LB5 won&#039;t even have TKN files.&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] Well, if this is the last 4x, then LB5 would be &lt;br /&gt;
priority, which is fine by me &lt;br /&gt;
&lt;br /&gt;
[Alyce] Ooo, tell us more!&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] Just how does that work?&lt;br /&gt;
&lt;br /&gt;
[Alyce] Will you bind the code to the runtime engine?&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] Will it be embedded inside a runtime as a custom resource?&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] The TKN, that is&lt;br /&gt;
&lt;br /&gt;
[Carl] LB5 will embed its programs into the runtime engine.&lt;br /&gt;
&lt;br /&gt;
[Alyce] That sounds great. Is Scott working on LB5 with you?&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] Will this affect speed for the better?&lt;br /&gt;
&lt;br /&gt;
[Carl] But not as a TKN file treated as a resource. There will be no &lt;br /&gt;
intermediate format at all. The compiled objects will live in the runtime &lt;br /&gt;
engine as native Smalltalk objects, just like everything else in the &lt;br /&gt;
runtime engine.&lt;br /&gt;
&lt;br /&gt;
[Carl] Yes, Scott is working on this with me.&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] Cool! That sounds like it would speed up execution &lt;br /&gt;
greatly!&lt;br /&gt;
&lt;br /&gt;
[Alyce] This sounds really exciting!&lt;br /&gt;
&lt;br /&gt;
[Carl] Liberty BASIC 5 will blow LB4 away in terms of speed. &lt;br /&gt;
Some of you may know that I quoted a 5x factor before.&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] Sounds like real-time 3D will be possible&lt;br /&gt;
&lt;br /&gt;
[Alyce] Are you considering a feature that allows us to create &lt;br /&gt;
graphics in memory?&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] Which would be great, because I&#039;ve been begged to &lt;br /&gt;
make a 3D game&lt;br /&gt;
&lt;br /&gt;
[Alyce] (I&#039;m still in &amp;quot;Freeform mode!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[Carl] I really want to do that Alyce. Right now I&#039;m just busy &lt;br /&gt;
trying to get all the basics working. We&#039;re getting ther.&lt;br /&gt;
&lt;br /&gt;
[Carl] there.&lt;br /&gt;
&lt;br /&gt;
[JohnD] I&#039;m trying to join in, but I&#039;m playing with kids too.&lt;br /&gt;
&lt;br /&gt;
[Alyce] Gee, John, you&#039;d rather play with the kids? Me, too! &lt;br /&gt;
Can I come over?&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] &lt;br /&gt;
&lt;br /&gt;
[Alyce] Carl, do you have an eta for alpha or beta testing of LB5&lt;br /&gt;
&lt;br /&gt;
[Carl] I&#039;m not quite sure yet, but it looks like we may be able to &lt;br /&gt;
do even better than a 5x speedup.&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] Good question&lt;br /&gt;
&lt;br /&gt;
[Alyce] More than 5x as fast sounds very impressive.&lt;br /&gt;
&lt;br /&gt;
[Carl] Well, we&#039;re shooting to demo what we have in a couple of months, &lt;br /&gt;
so perhaps we will have an alpha release in the Spring.&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] That would make 3D more than possible&lt;br /&gt;
&lt;br /&gt;
[Carl] That will be for Windows, Mac OS X and Linux simultaneously.&lt;br /&gt;
&lt;br /&gt;
[Alyce] Will the alpha release be cross-platform, do you think?&lt;br /&gt;
&lt;br /&gt;
[Carl] More or less simultaneously.&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] Can you give us a scoop on what features you plan to add?&lt;br /&gt;
&lt;br /&gt;
[Carl] Yes.&lt;br /&gt;
&lt;br /&gt;
[Alyce] Um, gee, I shoulda waited a minute.. you answered me before &lt;br /&gt;
I asked!&lt;br /&gt;
&lt;br /&gt;
[Carl] Hmm. I didn&#039;t really come prepared to answer that question.&lt;br /&gt;
&lt;br /&gt;
[Alyce] I have an old laptop with Linux installed. I guess I need to &lt;br /&gt;
get a mac mini to test the mac version! &lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] Well, how about what would be do-able&lt;br /&gt;
&lt;br /&gt;
[Carl] Certainly the alpha version will be quite limited.&lt;br /&gt;
&lt;br /&gt;
[Alyce] Hey, cross-platform and a big increase in speed... those features &lt;br /&gt;
sound great all by themselves.&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] That&#039;s true,Alyce&lt;br /&gt;
&lt;br /&gt;
[Carl] One cool thing I would really like to so with LB5 is make the &lt;br /&gt;
IDE as scriptable as possible.&lt;br /&gt;
&lt;br /&gt;
[Alyce] Would it be kind of like Brent&#039;s vivifire?&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] So I could add menus and stuff using LB scripts?&lt;br /&gt;
&lt;br /&gt;
[Carl] Yeah, some hooks would be there so you could add your &lt;br /&gt;
own utilities to LB.&lt;br /&gt;
&lt;br /&gt;
[Alyce] Macros, maybe?&lt;br /&gt;
&lt;br /&gt;
[Carl] Some commands would be added (yet to be determined) &lt;br /&gt;
which would give you access to information about the IDE, &lt;br /&gt;
and ways to interface with it.&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] So for instance, I could replace the existing icon &lt;br /&gt;
editor with Alyce&#039;s?&lt;br /&gt;
&lt;br /&gt;
[Carl] Hehe.&lt;br /&gt;
&lt;br /&gt;
[Carl] Sure.&lt;br /&gt;
&lt;br /&gt;
[Alyce] B, you can add TKNs to the run menu right now.&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] well, it be great to just outright replace it&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] No offense Carl&lt;br /&gt;
&lt;br /&gt;
[Carl] In fact it would be sort of holy grail if we could actually &lt;br /&gt;
write the LB editor in LB, right?&lt;br /&gt;
&lt;br /&gt;
[Alyce] That would be quite interesting, Carl.&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] Sounds like somthing in one of the&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] &#039;not in this issue&#039; part of the newsletter&lt;br /&gt;
&lt;br /&gt;
[Carl] No, I&#039;m not kidding.&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] It was something like &#039;Carl to write new version of &lt;br /&gt;
smalltalk in LB, and then write LB 5 in it&#039;&lt;br /&gt;
&lt;br /&gt;
[Carl] But I&#039;m not sure we&#039;re going to do it either. Still...&lt;br /&gt;
&lt;br /&gt;
[Alyce] You know, the lesson browser is way under-used.&lt;br /&gt;
&lt;br /&gt;
[Carl] The first prototype of Smalltalk was actually written &lt;br /&gt;
in BASIC. Really.&lt;br /&gt;
&lt;br /&gt;
[Carl] That&#039;s an interesting point Alyce.&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] Talk about irony...&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] Hey, I actually use it for versioning &lt;br /&gt;
&lt;br /&gt;
[Carl] What do you use for versioning?&lt;br /&gt;
&lt;br /&gt;
[Alyce] You use the lesson browser for versioning?&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] the lesson browser&lt;br /&gt;
&lt;br /&gt;
[Carl] Oh. That&#039;s a fun idea.&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] Yup, but LBA will replace it&lt;br /&gt;
&lt;br /&gt;
[Alyce] You need to get Assist! Really, the versioning is my &lt;br /&gt;
favorite tool in it.&lt;br /&gt;
&lt;br /&gt;
[Carl] Yeah, I really need to get a copy of that too.&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] I am thinking about putting the newsletters in &lt;br /&gt;
lsn&#039;s for archiving&lt;br /&gt;
&lt;br /&gt;
Dan enters this room&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] Well I would get assist if it will hurry up and be released&lt;br /&gt;
&lt;br /&gt;
[Alyce] Hey Dan!&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] Hi dan&lt;br /&gt;
&lt;br /&gt;
[Dan] Hey&lt;br /&gt;
&lt;br /&gt;
[Carl] One thing I think is a feature that needs to be in LB5 is &lt;br /&gt;
the ability to run it from the command line without a GUI, so you &lt;br /&gt;
can use stdio for cgi scripting and other similar stuff.&lt;br /&gt;
&lt;br /&gt;
[Carl] Of course the Mac prealpha does this already.&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] Command-Line scripting with LB would be, um, intresting&lt;br /&gt;
&lt;br /&gt;
[Dan] That would be nice&lt;br /&gt;
&lt;br /&gt;
[Alyce] CGI scripting? That&#039;s a whole new area.&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] Which CGI?&lt;br /&gt;
&lt;br /&gt;
[Carl] It would open up a completely new range of applications for LB.&lt;br /&gt;
&lt;br /&gt;
[Dan] Itd be easier than learning PHP and such&lt;br /&gt;
&lt;br /&gt;
[Carl] common gateway interface.&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] That it would&lt;br /&gt;
&lt;br /&gt;
[Carl] It&#039;s used for web programming a lot.&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] So I could intertwine CGI with LB?&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] That could be great for web-based apps and web scripting&lt;br /&gt;
&lt;br /&gt;
[Carl] You could use LB instead of Perl or other scripting languages.&lt;br /&gt;
&lt;br /&gt;
[Alyce] Carl, do you mean LB would run on a server, and run scripts?&lt;br /&gt;
&lt;br /&gt;
[Carl] Yes.&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] Yay!&lt;br /&gt;
&lt;br /&gt;
[Dan] &amp;lt;LB? t$=&amp;quot;&amp;lt;html&amp;gt;&amp;lt;body&amp;gt;Rawr&amp;lt;/body&amp;gt;&amp;lt;/html&amp;gt; ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[Alyce] We&#039;ll have to get Jerry to write &amp;quot;Creating Cool Web Pages &lt;br /&gt;
with Liberty BASIC.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] LOL!&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] It would probably be &amp;lt;script language=&amp;quot;Libertybasic&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[Carl] And if you have a Mac running as a server now, you can go and &lt;br /&gt;
download a version of LB that does that &lt;!-- ws:start:WikiTextUrlRule:1641:http://www.libertybasic.com/lb5pa2.html --&gt;&lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://www.libertybasic.com/lb5pa2.html&quot; rel=&quot;nofollow&quot;&gt;http://www.libertybasic.com/lb5pa2.html&lt;/a&gt;&lt;!-- ws:end:WikiTextUrlRule:1641 --&gt;&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] I don&#039;t even want to think about how much a Mac server &lt;br /&gt;
would cost&lt;br /&gt;
&lt;br /&gt;
[Carl] Even though I versioned that LB5, it&#039;s really a version of LB4 &lt;br /&gt;
without any GUI commands.&lt;br /&gt;
&lt;br /&gt;
[Dan] VBScript and Javascript are != than server side scripts&lt;br /&gt;
&lt;br /&gt;
[Carl] The next time we do an LB release for the Mac it&#039;ll be based on completely new code.&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] LB4 + Mac (-GUI)&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] I can think about my LB5 testimonial: &#039;It saved me &lt;br /&gt;
mucho mula on web hosting&#039;&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] I wrote a server program in it, and now automate my &lt;br /&gt;
entire home&lt;br /&gt;
&lt;br /&gt;
[Dan] I got my own domain + 4.5 gigs for a year for only 10$&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] That last line should have been in quotes&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] Where do you get that?&lt;br /&gt;
&lt;br /&gt;
[Carl] I guess, but Perl and most of those other popular scripting &lt;br /&gt;
languages are free. You could say &amp;quot;I made my web hosting much more fun.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] My hosting is $50+&lt;br /&gt;
&lt;br /&gt;
[Dan] &amp;quot;...and easier&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[Dan] 10$ for the whole year, not 10$ a month&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] Cool!!&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] Where at?&lt;br /&gt;
&lt;br /&gt;
[Alyce] Carl, what needs to be tested the most for Assist and the 4.03 release?&lt;br /&gt;
&lt;br /&gt;
[Carl] Wow, that&#039;s good question. For LB guess the best thing to do &lt;br /&gt;
is to run as many of your programs on the new version and see if they &lt;br /&gt;
run okay as TKNs too.&lt;br /&gt;
&lt;br /&gt;
[Carl] For Assist, it just needs to be used, since it&#039;s basically &lt;br /&gt;
all new stuff.&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] Well, I haven&#039;t experienced anything odd in the running&lt;br /&gt;
&lt;br /&gt;
[Alyce] Ah, check out the runtime engine. I&#039;ll do that.&lt;br /&gt;
&lt;br /&gt;
[Carl] Thanks.&lt;br /&gt;
&lt;br /&gt;
[Alyce] Believe me, I&#039;ve been using Assist a lot!&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] Will test TKN&#039;s once I go gold on christmas&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] At least I think I&#039;m going gold&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] That&#039;s supposedly tied to some school thing&lt;br /&gt;
&lt;br /&gt;
[Carl] I&#039;m going to try to ship this before Christmas, but you can still &lt;br /&gt;
test TKNs at least in the IDE.&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] I meant testing my own TKN&#039;s&lt;br /&gt;
&lt;br /&gt;
[Carl] You can test your own TKNs right now. Just make a TKN and then &lt;br /&gt;
use the Run TKN menu item.&lt;br /&gt;
&lt;br /&gt;
[Alyce] Can&#039;t you tokenize without the gold version?&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] That&#039;s news to me&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] Good news, though&lt;br /&gt;
&lt;br /&gt;
[Carl] Yes, you can. You just can&#039;t use the runtime engine.&lt;br /&gt;
&lt;br /&gt;
[Carl] BRB&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] huh?&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] nevermind&lt;br /&gt;
&lt;br /&gt;
[Alyce] BRB = be right back in chatspeak&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] Gotcha&lt;br /&gt;
&lt;br /&gt;
[Carl] ok&lt;br /&gt;
&lt;br /&gt;
StefanP enters this room&lt;br /&gt;
&lt;br /&gt;
[Carl] Hi Stefan&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] Hi Stefan&lt;br /&gt;
&lt;br /&gt;
[Alyce] Hi Stefan&lt;br /&gt;
&lt;br /&gt;
[StefanP] Hello to all&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] Carl, can you tall us some features that would be &lt;br /&gt;
&#039;do-able&#039; in LB5&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] err, tell us&lt;br /&gt;
&lt;br /&gt;
[Carl] So, in case people don&#039;t know. PC Plus now has a regular &lt;br /&gt;
column that teaches Just BASIC.&lt;br /&gt;
&lt;br /&gt;
[Alyce] I don&#039;t think I have access to PC Plus, but that sounds &lt;br /&gt;
terrific.&lt;br /&gt;
&lt;br /&gt;
[StefanP] Carl, thanks for fixing the scheduled task issue.&lt;br /&gt;
&lt;br /&gt;
[StefanP] I had some tests today because of a thread from the JB forum.&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] Carl, can you tell us some features that would be &lt;br /&gt;
&#039;do-able&#039; in LB5? Please?&lt;br /&gt;
&lt;br /&gt;
[Carl] Well, I&#039;ve been so busy working on the technology platform &lt;br /&gt;
for the new version I haven&#039;t really solidified a roadmap for new features. &lt;br /&gt;
As we have already covered here, it&#039;ll be cross platform...&lt;br /&gt;
&lt;br /&gt;
[Carl] It&#039;ll be more scriptable...&lt;br /&gt;
&lt;br /&gt;
[Carl] It&#039;ll be faster...&lt;br /&gt;
&lt;br /&gt;
[Carl] Also, it will have a better eval() function.&lt;br /&gt;
&lt;br /&gt;
[Carl] My pleasure Stefan. :-)&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] the evalx() thing that was on the wishlist?&lt;br /&gt;
&lt;br /&gt;
[Carl] I&#039;m going to try and add more widgets.&lt;br /&gt;
&lt;br /&gt;
[Carl] Evalx?&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] more widgets are welcome&lt;br /&gt;
&lt;br /&gt;
[Carl] Sorry, don&#039;t remember that one.&lt;br /&gt;
&lt;br /&gt;
[StefanP] Seems that this is fixed now, have to check tomorrow &lt;br /&gt;
at work, with some more complex programs&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] On the wishlist board, someone said something about &lt;br /&gt;
an eval() that would run LB Code&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] And I think it was called evalx()&lt;br /&gt;
&lt;br /&gt;
[Carl] Liberty BASIC hasn&#039;t had a spreadsheet widget for a long time, &lt;br /&gt;
so you&#039;ll see that reemerge more than likely, and toolbars and tabs. &lt;br /&gt;
Submenus too.&lt;br /&gt;
&lt;br /&gt;
[Carl] I&#039;m eager to hear how that works out, Stefan.&lt;br /&gt;
&lt;br /&gt;
[Alyce] Oh yeah!&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] The hardest-to-make API controls will be native &lt;br /&gt;
LB in LB5&lt;br /&gt;
&lt;br /&gt;
[Carl] Yeah, the new eval function should be able to execute whole &lt;br /&gt;
statements.&lt;br /&gt;
&lt;br /&gt;
[Carl] Perhaps even bunches of them, for that matter.&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] Guess I can postpone my scripting language project&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] That will make it 50 times easier&lt;br /&gt;
&lt;br /&gt;
[Carl] And a tree widget too.&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] tree as in treeview?&lt;br /&gt;
&lt;br /&gt;
[Carl] Right. Treeview&lt;br /&gt;
&lt;br /&gt;
[StefanP] The new widgets sound terrific, the spreadsheet &lt;br /&gt;
is one of the most wanted it seems.&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] I tried doing a spreadsheet with a graphicbox in JB&lt;br /&gt;
&lt;br /&gt;
[Dan] Tabs sound nice..&lt;br /&gt;
&lt;br /&gt;
[Dan] Tabs sound nice..&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] tabs are hard to do right now&lt;br /&gt;
&lt;br /&gt;
[Alyce] Would the spreadsheet by like the old one, or might it &lt;br /&gt;
be ODBC compatible?&lt;br /&gt;
&lt;br /&gt;
[Carl] I do want to temper people&#039;s expectations though around size. &lt;br /&gt;
I&#039;m going to try and make LB5 as small as possible, but with this &lt;br /&gt;
new Smalltalk platform I don&#039;t have a lot of experience yet. It&#039;s probably &lt;br /&gt;
not going to be as small as what we have now but it won&#039;t need a bunch of &lt;br /&gt;
support libraries.&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] Size is not an issue for me&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] At least not that much of an issue&lt;br /&gt;
&lt;br /&gt;
[Carl] I&#039;m not quite sure on the details of the spreadsheet. I wasn&#039;t &lt;br /&gt;
thinking of making it a database widget.&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] Well, I&#039;m sure that would be a big use of it&lt;br /&gt;
&lt;br /&gt;
[Carl] I know that a lot of people think LB4 is already too big, even though &lt;br /&gt;
compared to a lot of other languages it isn&#039;t especially big.&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] I&#039;ll gladly give up a MB or two for the ease of use&lt;br /&gt;
&lt;br /&gt;
[Carl] I also plan to enhance the syntax for working with widgets in LB5.&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] Enhance?&lt;br /&gt;
&lt;br /&gt;
[Dan] You would give up 2 MB?&lt;br /&gt;
&lt;br /&gt;
[Alyce] Will we still send commands in strings?&lt;br /&gt;
&lt;br /&gt;
[StefanP] LB 4.03 is 3.5MB, Pelles C is 6.7MB&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] I would give up 2 MB for the ease of use LB has&lt;br /&gt;
&lt;br /&gt;
[Dan] X_x&#039;&lt;br /&gt;
&lt;br /&gt;
[StefanP] So up to 5MB would be good.&lt;br /&gt;
&lt;br /&gt;
[Carl] Yes. You will still be able to do &lt;br /&gt;
#handle &amp;quot;command &amp;quot;; x; &amp;quot; &amp;quot;; y for backward compatibility, &lt;br /&gt;
but you will also be able to do this #handle command(x, y)&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] Compression will make everything OK&lt;br /&gt;
&lt;br /&gt;
[Dan] Thats a bit to much in my opinion&lt;br /&gt;
&lt;br /&gt;
[Carl] This will be easier in most respects, and will probably &lt;br /&gt;
execute faster&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] sounds like how I&#039;m doing my scripting language&lt;br /&gt;
&lt;br /&gt;
[Alyce] Do you think backwards compatibility is important?&lt;br /&gt;
&lt;br /&gt;
[Alyce] The new syntax sounds more standard.&lt;br /&gt;
&lt;br /&gt;
[Carl] It probably won&#039;t cost me much time to keep the old syntax &lt;br /&gt;
parsing in there.&lt;br /&gt;
&lt;br /&gt;
[StefanP] Carl, saw the new syntax post on the usenet, you received &lt;br /&gt;
positive reactions.&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] How would commands that request variables work?&lt;br /&gt;
&lt;br /&gt;
[Carl] The new syntax is also a stepping stone to the new BASIC I&#039;m &lt;br /&gt;
working on. You knew that was coming, right? ;-)&lt;br /&gt;
&lt;br /&gt;
[Alyce] &lt;br /&gt;
&lt;br /&gt;
[Carl] Commands that request variables would do this &lt;br /&gt;
var = #handle, command(x, y)&lt;br /&gt;
&lt;br /&gt;
[Alyce] Carl, maybe you should call the new BASIC Voldemort&lt;br /&gt;
&lt;br /&gt;
[Alyce] I like that syntax.&lt;br /&gt;
&lt;br /&gt;
[Carl] Why? :-)&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] Voldemort?&lt;br /&gt;
&lt;br /&gt;
[StefanP] The new syntax is aswell a request of some consumers, &lt;br /&gt;
if I am corect &lt;br /&gt;
&lt;br /&gt;
[Alyce] I&#039;d also love to put expressions into api calls.&lt;br /&gt;
&lt;br /&gt;
[Carl] I have actually wanted to change that syntax for some y&lt;br /&gt;
ears now.&lt;br /&gt;
&lt;br /&gt;
[Alyce] Harry Potter? Voldemort&#039;s name isn&#039;t to be spoken?&lt;br /&gt;
&lt;br /&gt;
[Carl] The new platform will make this a good time to do it.&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] Don&#039;t follow Harry Potter, so I wouldn&#039;t know&lt;br /&gt;
&lt;br /&gt;
[Carl] Ok, I get it. Alyce makes the point that I know what the &lt;br /&gt;
new BASIC is called but won&#039;t say it (until I have something to show).&lt;br /&gt;
&lt;br /&gt;
[StefanP] Carl, did you get my replay to the Assist testing invitation ???&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster]   &lt;br /&gt;
&lt;br /&gt;
[Alyce] Yes, just a little joke, Carl. &lt;br /&gt;
&lt;br /&gt;
[StefanP] I am really willing to help on this .&lt;br /&gt;
&lt;br /&gt;
[Carl] Stefan, doesn&#039;t seem like it.&lt;br /&gt;
&lt;br /&gt;
[StefanP] I hate typos &amp;gt;:-(&lt;br /&gt;
&lt;br /&gt;
[Alyce] I&#039;m copying the chat and will upload it for others &lt;br /&gt;
to read. This ought to get people interested and excited.&lt;br /&gt;
&lt;br /&gt;
[Carl] I&#039;ll take care of it. Thanks.&lt;br /&gt;
&lt;br /&gt;
CodeSolo enters this room&lt;br /&gt;
&lt;br /&gt;
[Carl] Hi CodeSolo&lt;br /&gt;
&lt;br /&gt;
[Alyce] Stefan, you will love Assist.&lt;br /&gt;
&lt;br /&gt;
WillieLee enters this room&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] Hi CodeSolo&lt;br /&gt;
&lt;br /&gt;
[Alyce] Hi CodeSolo.&lt;br /&gt;
&lt;br /&gt;
[StefanP] Hi CodeSolo&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] Hi Willie&lt;br /&gt;
&lt;br /&gt;
[Alyce] Yo Willie.&lt;br /&gt;
&lt;br /&gt;
[Dan] I would love a change in the syntax of calling dlls..&lt;br /&gt;
&lt;br /&gt;
[Carl] Hi Willie&lt;br /&gt;
&lt;br /&gt;
[CodeSolo] hello all...&lt;br /&gt;
&lt;br /&gt;
eaglesoar enters this room&lt;br /&gt;
&lt;br /&gt;
[Dan] Make doing all those DLL calls easier and less bulky.&lt;br /&gt;
&lt;br /&gt;
[Carl] Really? I like it the way it is, actually. But I&#039;m open to &lt;br /&gt;
suggestions.&lt;br /&gt;
&lt;br /&gt;
[Alyce] Hi Eldron&lt;br /&gt;
&lt;br /&gt;
[WillieLee] Hey! WhazzUp?&lt;br /&gt;
&lt;br /&gt;
[Carl] Hi Eldron&lt;br /&gt;
&lt;br /&gt;
[eaglesoar] Hi everyone!&lt;br /&gt;
&lt;br /&gt;
[StefanP] I hope so Alyce, I like all of the features of the &lt;br /&gt;
4.02 version.&lt;br /&gt;
&lt;br /&gt;
[Dan] I find that calldll #user32, &amp;quot;CreateWindowExA&amp;quot;,blah blah blah&lt;br /&gt;
&lt;br /&gt;
[Alyce] My suggestion is to allow expressions as arguments in &lt;br /&gt;
API calls. That and array elements.&lt;br /&gt;
&lt;br /&gt;
[Dan] is pretty bulky&lt;br /&gt;
&lt;br /&gt;
[StefanP] Hi eaglesoar and WillieLee&lt;br /&gt;
&lt;br /&gt;
[Alyce] Dan, most other languages require declarations. LB makes it &lt;br /&gt;
really easy to call DLLS.&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] If DLL calls were to be revamped, I&#039;d like to see &lt;br /&gt;
somthing like most other languages have&lt;br /&gt;
&lt;br /&gt;
[Dan] Declarations make it easier and more understandable in my opinion&lt;br /&gt;
&lt;br /&gt;
[Carl] The new version of Assist isn&#039;t much different than the first. &lt;br /&gt;
Less buggy, a little cleaner and easier perhaps. The documentation is much &lt;br /&gt;
improved though.&lt;br /&gt;
&lt;br /&gt;
[Dan] but probably not to others&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] as far as var = calldll #handle functioname(params)&lt;br /&gt;
&lt;br /&gt;
[Alyce] The docs are great&lt;br /&gt;
&lt;br /&gt;
[WillieLee] Since dll/api calls are hooks into another&#039;s subroutine/functions, &lt;br /&gt;
you&#039;re pretty much locked into passing the needed information.&lt;br /&gt;
&lt;br /&gt;
[Alyce] That sounds okay, bweb.&lt;br /&gt;
&lt;br /&gt;
[eaglesoar] Carl, forgive my ignorance, but will the Assist be &lt;br /&gt;
out with version 403??..or is it already out?&lt;br /&gt;
&lt;br /&gt;
[Dan] I just dont like how strict calldll is&lt;br /&gt;
&lt;br /&gt;
[Carl] Assist will be released at more or less the same time as v4.03.&lt;br /&gt;
&lt;br /&gt;
[WillieLee] You have an obvious choice when it comes to calling &lt;br /&gt;
routines from a library... If you don&#039;t want to code in the required &lt;br /&gt;
parameters, then don&#039;t use the routines.&lt;br /&gt;
&lt;br /&gt;
[Dan] like alyce said expressions and arrays arent passable&lt;br /&gt;
&lt;br /&gt;
[StefanP] The Assist docs are really greate, they keep shining &lt;br /&gt;
(since this is the only thing I can test for now)&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] Syntax would all line up, as far as internal functions, &lt;br /&gt;
dlls, and widgets&lt;br /&gt;
&lt;br /&gt;
[Carl] Well, that&#039;s a good point Dan. I&#039;ll take good look at that &lt;br /&gt;
limitation.&lt;br /&gt;
&lt;br /&gt;
[Dan] And the limited amount of types..&lt;br /&gt;
&lt;br /&gt;
[StefanP] Not as limited as VB &lt;br /&gt;
&lt;br /&gt;
[Carl] I&#039;ll do what I can with that.&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] Have anything to say about user libraries (while we&#039;re on library calling)&lt;br /&gt;
&lt;br /&gt;
[Dan] VB isnt limited in that area&lt;br /&gt;
&lt;br /&gt;
[Carl] Now user libraries are an imporant feature. I do aim to have that feature in LB5, but I &lt;br /&gt;
&lt;br /&gt;
haven&#039;t designed it yet.&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] I have a few suggestions for user libraries&lt;br /&gt;
&lt;br /&gt;
[Alyce] Carl, how would they work? Similar to DLLs?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] My suggestion would be to have a runtime DLL&lt;br /&gt;
&lt;br /&gt;
[WillieLee] And just for grins... not supported by the forums... &lt;br /&gt;
how about inline assembley for time critical operations?&lt;br /&gt;
&lt;br /&gt;
[Carl] I was thinking they would not be separate files, but &lt;br /&gt;
compiled into your program. On the other hand perhaps we could do either.&lt;br /&gt;
&lt;br /&gt;
[Dan] OMG&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] That would have functions and subroutines stuffed in it&lt;br /&gt;
&lt;br /&gt;
[Dan] Inline asm &amp;lt;3&lt;br /&gt;
&lt;br /&gt;
[Carl] The libraries wouldn&#039;t be a Windows DLL, but some other &lt;br /&gt;
format especially for LB.&lt;br /&gt;
&lt;br /&gt;
[Dan] Thats never going to be in there..&lt;br /&gt;
&lt;br /&gt;
[Carl] Inline assembler? No.&lt;br /&gt;
&lt;br /&gt;
[Dan] Though so..&lt;br /&gt;
&lt;br /&gt;
[StefanP] Including into the main program will be prefred by most younger &lt;br /&gt;
people.&lt;br /&gt;
&lt;br /&gt;
[Dan] Thought*&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] Well, I think that would be cool, but you&#039;re the boss&lt;br /&gt;
&lt;br /&gt;
[StefanP] You can create a DLL olding your assembler code&lt;br /&gt;
&lt;br /&gt;
[StefanP] Meant Holding ...&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] But then I have to learn Assembly!&lt;br /&gt;
&lt;br /&gt;
[WillieLee] Maybe support for hooks to Thistle...?&lt;br /&gt;
&lt;br /&gt;
[Carl] Of course the most essential feature of libraries &lt;br /&gt;
is to support something like include, but we&#039;ll try to do &lt;br /&gt;
better than that.&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] A Thistle hook to LB would be something Alyce &lt;br /&gt;
would have to do&lt;br /&gt;
&lt;br /&gt;
[Alyce] Willie is full of vinegar today...&lt;br /&gt;
&lt;br /&gt;
[Carl] Yeah, and thistles...&lt;br /&gt;
&lt;br /&gt;
[Alyce] &lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] The only thing I would see there is using thistle to &lt;br /&gt;
create a dll, and I&#039;m not sure if FASM has that&lt;br /&gt;
&lt;br /&gt;
[StefanP] What did he had for lunch today ???&lt;br /&gt;
&lt;br /&gt;
[WillieLee] Includes are good.. maybe a tweak to allow various &lt;br /&gt;
includes to appear anywhere in the code, not just at the beginning.&lt;br /&gt;
&lt;br /&gt;
[WillieLee] I just returned from lunch... how&#039;d you know? Surf &amp;amp; Turf.&lt;br /&gt;
&lt;br /&gt;
[StefanP] So we are back to CALLDLL syntax ...&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] Here&#039;s an idea: a library of LB functions &#039;in&#039; the IDE, &lt;br /&gt;
that would be dynamically compiled into your program&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] As opposed to seperate user libraries&lt;br /&gt;
&lt;br /&gt;
[WillieLee] Just so a &amp;quot;Hello World&amp;quot; program doesn&#039;t become 5 meg in size.&lt;br /&gt;
&lt;br /&gt;
[Carl] That&#039;s what I was thinking. Compiled into memory and then &lt;br /&gt;
deployed along with your app.&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] Inside the executable as a smalltalk object would be &lt;br /&gt;
preferable to a seperate file&lt;br /&gt;
&lt;br /&gt;
[Carl] Yes, inside the exe.&lt;br /&gt;
&lt;br /&gt;
[StefanP] No included junk like EXEs for DOS having portions &lt;br /&gt;
for MessageBox creation, brrrr&lt;br /&gt;
&lt;br /&gt;
[StefanP] I would prefer a clean tiny bit of program&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] Do I want to know what that means?&lt;br /&gt;
&lt;br /&gt;
[StefanP] Having an EXE of 100 kB, when 20kB are used only...&lt;br /&gt;
&lt;br /&gt;
[Carl] LB5 isn&#039;t going to compile to binary, just to clear that up. &lt;br /&gt;
This development platform is going to produce a runtime of similar &lt;br /&gt;
size to LB4, and perhaps bigger.&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] Oh&lt;br /&gt;
&lt;br /&gt;
[Carl] It won&#039;t require lots of support libraries though,&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] Will LB commands be dynamically compiled into the &lt;br /&gt;
runtime as needed?&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] Or will everything stay in and be used as needed, with &lt;br /&gt;
custom commands/functions added as used&lt;br /&gt;
&lt;br /&gt;
[Carl] LB commands will not be dynamically compiled, unless you use &lt;br /&gt;
the eval() function for that purpose.&lt;br /&gt;
&lt;br /&gt;
[Carl] Now I&#039;m not sure what you mean.&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] Well, only the commands and functions needed would be &lt;br /&gt;
thrown into the runtime&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] as opposed to having all native commands ready inside &lt;br /&gt;
the runtime&lt;br /&gt;
&lt;br /&gt;
[WillieLee] So... A Hello World program written for the console (stdio) &lt;br /&gt;
window will continue to link in the 10 meg of gui support?&lt;br /&gt;
&lt;br /&gt;
[Carl] Yes, we could do that, but there will still be a Smalltalk &lt;br /&gt;
object memory in there to support everything else. I will try to &lt;br /&gt;
make this as small as possible, but since I haven&#039;t spent much time &lt;br /&gt;
on this I don&#039;t know how big or small the result will be. I just don&#039;t &lt;br /&gt;
want people to think this is going to be really small, &lt;br /&gt;
because it isn&#039;t.&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] I&#039;m not sure we are on the same page&lt;br /&gt;
&lt;br /&gt;
[Carl] Willie, right now Liberty BASIC produces a nice small &lt;br /&gt;
TKN file from your source. Then the runtime engine and it&#039;s &lt;br /&gt;
support DLLs are more than 2MB on top of that.&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] if there is a smalltalk object for command set &#039;a&#039;, &lt;br /&gt;
and another for command set &#039;b&#039;, but only command set &#039;b&#039; is used, &lt;br /&gt;
then command set &#039;b&#039; would be compiled into a runtime file, but command &lt;br /&gt;
set &#039;a&#039; would be left out&lt;br /&gt;
&lt;br /&gt;
[eaglesoar] Alyce, what new features are you working on for the next &lt;br /&gt;
release of LB Workshop?&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] If user libraries are done like it is being talked about, &lt;br /&gt;
then it sounds like that could be done&lt;br /&gt;
&lt;br /&gt;
[Carl] The new LB will also need to provide more or less the same kind &lt;br /&gt;
of support for your program, but instead of it being 8 files it&#039;ll be just one.&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] OK&lt;br /&gt;
&lt;br /&gt;
[Alyce] Eldron, it will be a bugfix with some tweaking of the toolbar maker.&lt;br /&gt;
&lt;br /&gt;
[WillieLee] It seems that you&#039;re approaching a threshold where LB &lt;br /&gt;
is over kill for a learning tool and deficient as an enterprise tool.&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] I think there is a weird sweet spot there&lt;br /&gt;
&lt;br /&gt;
[Carl] I&#039;m going to do my best to make that one file as small as &lt;br /&gt;
possible. I&#039;ll be happy if it doesn&#039;t get much bigger than 3MB. &lt;br /&gt;
We&#039;ll see.&lt;br /&gt;
&lt;br /&gt;
[eaglesoar] no new gadgets???&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] I like where LB is headed&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] We talked earlier about new controls&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] There will be a few new ones&lt;br /&gt;
&lt;br /&gt;
[Alyce] I think Bill, er, Willie has hit the problem &lt;br /&gt;
Carl wrestles with for LB&#039;s development.&lt;br /&gt;
&lt;br /&gt;
[StefanP] Seems that this is another path into &amp;quot;Keep it simple, &lt;br /&gt;
but powerfull&amp;quot; &lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] tabs, treeviews, and submenus were talked about&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] carl, I have a question about menus&lt;br /&gt;
&lt;br /&gt;
[Carl] I can add an option during deployment to remove &lt;br /&gt;
things that aren&#039;t used. The reason it would be an option &lt;br /&gt;
is because there would be no way to know what will be needed &lt;br /&gt;
when a program uses the eval() function.&lt;br /&gt;
&lt;br /&gt;
[StefanP] Eldron, LB5 will get new native controls&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] Will there be exensions for menus&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] That would be helpful for sub-menus&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] Instead of a branch, you could use a menu handle &lt;br /&gt;
and extension&lt;br /&gt;
&lt;br /&gt;
[Carl] Yes, I plan to support submenues.&lt;br /&gt;
&lt;br /&gt;
Janet enters this room&lt;br /&gt;
&lt;br /&gt;
[WillieLee] I think LB is a fun product. When used as a learning &lt;br /&gt;
tool by a proficient instructor it is a great introduction to &lt;br /&gt;
logical thinking and programming.&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] Welcome back, Janet&lt;br /&gt;
&lt;br /&gt;
[StefanP] Hi Janet&lt;br /&gt;
&lt;br /&gt;
[Janet] HI, Stefan. HI, everybody.&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] Anyway, menu handle extensions could be &lt;br /&gt;
used to add sub-menus&lt;br /&gt;
&lt;br /&gt;
[WillieLee] It makes my teeth hurt when I see the young students &lt;br /&gt;
approach the forums with requests for extremely advanced techniques.&lt;br /&gt;
&lt;br /&gt;
[WillieLee] And they still have trouble spelling BASIC.&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] Ditto&lt;br /&gt;
&lt;br /&gt;
[Janet] I&#039;m dressed and ready to go. I can only stay a few minutes. &lt;br /&gt;
Great to see everybody here. Don&#039;t let me interrupt.&lt;br /&gt;
&lt;br /&gt;
[Carl] Hi Janet&lt;br /&gt;
&lt;br /&gt;
[StefanP] Thats the time I think, begin with the hard stuff, to fall &lt;br /&gt;
back to the basics&lt;br /&gt;
&lt;br /&gt;
[WillieLee] It sorta seems like LB hase reached the point of becoming &lt;br /&gt;
two different products. That&#039;s what I seem to see in LB 4.xx &lt;br /&gt;
and %.xx and &amp;quot;SomethingNew.xx&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[StefanP] Hit the brick wall, before thinkin about a way to get around it&lt;br /&gt;
&lt;br /&gt;
eaglesoar exits from this room&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] Well, there is the new BASIC&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] Or whatever it will be&lt;br /&gt;
&lt;br /&gt;
[Carl] I&#039;m going to try and maintain as much backwards compatibility &lt;br /&gt;
as I can with the move to LB5.&lt;br /&gt;
&lt;br /&gt;
[Alyce] Or, as Jerry says, &#039;ready, fire, aim!&#039;&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] That is a good way to hurt someone &lt;br /&gt;
&lt;br /&gt;
[StefanP] It would not be to hard to create a tool to translate old syntax to new&lt;br /&gt;
&lt;br /&gt;
[Carl] Let me throw out a question here, and then I&#039;ll duck&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] OK, but be ready to run &lt;br /&gt;
&lt;br /&gt;
[WillieLee] Why not let LB 5 forge its own paths without being &lt;br /&gt;
encumbered with backward compatibility and continue to support &lt;br /&gt;
4.xx as the learning tool?&lt;br /&gt;
&lt;br /&gt;
[Janet] I agree with Willie&lt;br /&gt;
&lt;br /&gt;
[StefanP] Janet has mastered one for ATARI BASIC to JB&lt;br /&gt;
&lt;br /&gt;
[Janet] haha!! That&#039;s just simple word parsing. But it does show &lt;br /&gt;
it can be done.&lt;br /&gt;
&lt;br /&gt;
[StefanP] Not the full syntax, but useable foe one project&lt;br /&gt;
&lt;br /&gt;
[Carl] How important would native widget support be for LB5? &lt;br /&gt;
I already know what some of the answers to this question are but &lt;br /&gt;
I want to hear from all of you? The reason I ask is because with the &lt;br /&gt;
cross platform nature of this product it will be somewhat simpler &lt;br /&gt;
if we provide really robust cross platform&lt;br /&gt;
&lt;br /&gt;
[Carl] emulated widgets.&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] I would say that API controls should be used whenever possible&lt;br /&gt;
&lt;br /&gt;
drick enters this room&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] But obviously, some systems won&#039;t support controls thjat &lt;br /&gt;
other systems have&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] So emulated widgets are OK when necessary&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] Speaking of emulated widgets, is there a chance of an API &lt;br /&gt;
texteditor being put in for LB5?&lt;br /&gt;
&lt;br /&gt;
[Carl] My intention up to this point has been to initially provide native &lt;br /&gt;
widgets on Windows only, and only the ones that people are used to making &lt;br /&gt;
API calls on.&lt;br /&gt;
&lt;br /&gt;
[Carl] The rest of the widgets would be emulated.&lt;br /&gt;
&lt;br /&gt;
[WillieLee] With MAC going to Intel, I&#039;d say support api/and unix like &lt;br /&gt;
widgets as fully as possible, with a very robust user function capability.&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] Sounds good to me&lt;br /&gt;
&lt;br /&gt;
[WillieLee] I think you guys were talking about that earlier with passing &lt;br /&gt;
arrays etc.&lt;br /&gt;
&lt;br /&gt;
[Janet] Sorry, guys. Don&#039;t bother saying &amp;quot;Bye&amp;quot; I&#039;ll catch the rest of &lt;br /&gt;
this in archives. Hubby&#039;s got the car running....&lt;br /&gt;
&lt;br /&gt;
[StefanP] Emulated widgets are the basis for a cross platform GUI design&lt;br /&gt;
&lt;br /&gt;
Janet exits from this room&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] Yup&lt;br /&gt;
&lt;br /&gt;
[WillieLee] Emulation is good from another aspect... It would open the future &lt;br /&gt;
ability to use game engines for those wanting to write the Doom replacement.&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] How will mac and/or linux api/dll calls work?&lt;br /&gt;
&lt;br /&gt;
[Carl] How would it do that Willie?&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] We are talking about widget emulation&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] Not sure what you mean there&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] Be right back&lt;br /&gt;
&lt;br /&gt;
[WillieLee] With emulation, many hooks into various engines can be &lt;br /&gt;
used where the engine itself appears to be a widget.&lt;br /&gt;
&lt;br /&gt;
[Carl] Obviously the calling of APIs on Win/Mac/Linux will break cross &lt;br /&gt;
platform compatibility. Having said that I will need to support &lt;br /&gt;
something like CALLDLL for Mac and Linux. It&#039;ll have a different &lt;br /&gt;
name though because there are no DLLs for these OSes.&lt;br /&gt;
&lt;br /&gt;
[StefanP] Linux SLs are similar to Windows DLLs&lt;br /&gt;
&lt;br /&gt;
[Carl] Well, I guess if some sort of OpenGL support arrives for this &lt;br /&gt;
flavor of Smalltalk it will hopefully work on all these platforms. &lt;br /&gt;
It&#039;s hard to see that far into my crystal ball.&lt;br /&gt;
&lt;br /&gt;
[StefanP] SL ... Shared Library, DLL ... Dynamic Linked Library&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] I&#039;m back&lt;br /&gt;
&lt;br /&gt;
[Carl] BRB&lt;br /&gt;
&lt;br /&gt;
[StefanP] OpenGL would drastically speed graphics up, no flickering&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] OpenGL is like DirectX, except cross platform, right?&lt;br /&gt;
&lt;br /&gt;
[StefanP] DirectX is mostly used by gmes, where OpenGL is used by &lt;br /&gt;
CAD systems&lt;br /&gt;
&lt;br /&gt;
[StefanP] Games, need a typofix ...&lt;br /&gt;
&lt;br /&gt;
[WillieLee] True, but look at the trouble experienced now by those &lt;br /&gt;
wanting to call GDI routines in LB. It requires someone take thenm &lt;br /&gt;
by the hand and resolve each and every problem.&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] Could OpenGL could be used for games&lt;br /&gt;
&lt;br /&gt;
[StefanP] The GDI is sometimes hard, because you have to read a bit&lt;br /&gt;
&lt;br /&gt;
[StefanP] There is no fast way, but some people have no time for &lt;br /&gt;
reading&lt;br /&gt;
&lt;br /&gt;
[WillieLee] Do they still teach reading in school?&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] Good question LOL&lt;br /&gt;
&lt;br /&gt;
[StefanP] OpenGL is coming from UNIX, I think. DirectX, I don&#039;t know, &lt;br /&gt;
perhaps M$&lt;br /&gt;
&lt;br /&gt;
[WillieLee] Widgets, regardless of their source are still the best &lt;br /&gt;
way to go... and never mention any optional method of producing &lt;br /&gt;
the same result.&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] DirectX is MS&lt;br /&gt;
&lt;br /&gt;
[Carl] ok&lt;br /&gt;
&lt;br /&gt;
JohnD enters this room&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] Carl, what would you think of custom controls for LB&lt;br /&gt;
&lt;br /&gt;
[StefanP] Cross platform is the next step, so emulate widgets&lt;br /&gt;
&lt;br /&gt;
[Carl] OpenGL is often used for games. Quake for example.&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] like OCX, except LB specific&lt;br /&gt;
&lt;br /&gt;
[StefanP] Hi JohnD&lt;br /&gt;
&lt;br /&gt;
[WillieLee] LB will have to adopt a couple of current strategies... &lt;br /&gt;
&amp;quot;just Say No&amp;quot; and &amp;quot;Don&#039;t Ask, Don&#039;t Tell&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] I am holding on to my hope for API controls in Windows LB5&lt;br /&gt;
&lt;br /&gt;
[StefanP] This will make your program Windows only.&lt;br /&gt;
&lt;br /&gt;
[Carl] Bweb, actually the Smalltalk platform comes with emulated &lt;br /&gt;
widgets, and it doesn&#039;t even support native controls yet even &lt;br /&gt;
though they have plans to. In the short term I will need to roll &lt;br /&gt;
my own native widget support for Windows.&lt;br /&gt;
&lt;br /&gt;
[Carl] This will take some doing.&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] Thats what I&#039;m looking for&lt;br /&gt;
&lt;br /&gt;
[Carl] In any case, the emulated widgets really look like real &lt;br /&gt;
Windows widgets. They did an excellent job on them.&lt;br /&gt;
&lt;br /&gt;
[StefanP] How about thetexteditor widget, same problems as today ?&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] My only concern is the added power the windows API &lt;br /&gt;
gives to controls&lt;br /&gt;
&lt;br /&gt;
[WillieLee] If it will expedite things, use the emulated widgets for &lt;br /&gt;
early release and work on platform specific add-ons for later.&lt;br /&gt;
&lt;br /&gt;
[Carl] That&#039;s a genuine concern.&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] That is fine&lt;br /&gt;
&lt;br /&gt;
[Carl] If the emulated widgets are very flexible and allow you fine &lt;br /&gt;
control over them, this would help a lot.&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] I just need the power&lt;br /&gt;
&lt;br /&gt;
[Carl] the POWER ;-)&lt;br /&gt;
&lt;br /&gt;
[StefanP] If the features of the widgets are complete, there is no need for &lt;br /&gt;
API control.&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] Will the text editor improve in LB5?&lt;br /&gt;
&lt;br /&gt;
[WillieLee] Emulation would seem to open an immediate window into cross &lt;br /&gt;
platform coding to the masses with the complex being reserved for future &lt;br /&gt;
gurus.&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] No offense, but the current one is pretty cruddy&lt;br /&gt;
&lt;br /&gt;
[Carl] Well, consider that it is written from scratch, and &lt;br /&gt;
it&#039;s a pretty nice piece of work. On the other hand, its undo &lt;br /&gt;
support is pretty bad. What else would you like to see improved &lt;br /&gt;
in the text editor?&lt;br /&gt;
&lt;br /&gt;
[WillieLee] Actually, the MS text editor isn&#039;t anything special.&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] Word-wrap is pretty big&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] So is redo&lt;br /&gt;
&lt;br /&gt;
[StefanP] line wrapping is one of the most wanted&lt;br /&gt;
&lt;br /&gt;
[WillieLee] Fix all with a ri9chtext editor widget.&lt;br /&gt;
&lt;br /&gt;
[StefanP] readonly support, may be&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] that&#039;s an idea&lt;br /&gt;
&lt;br /&gt;
[Carl] I believe the new editor control will be better in both of &lt;br /&gt;
these areas, but I haven&#039;t played with it much.&lt;br /&gt;
&lt;br /&gt;
[Carl] The new one isn&#039;t a richedit control. Sorry.&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] Well, good to know its being worked on&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] How &#039;bout a cross-platform, read-only RTF?&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] Or, better yet, LB custom controls so one could &lt;br /&gt;
write his/her own&lt;br /&gt;
&lt;br /&gt;
[Carl] Can&#039;t answer that one right off the top of my head.&lt;br /&gt;
&lt;br /&gt;
[Carl] Perhaps we might be able to support LB written widgets. &lt;br /&gt;
That&#039;s an interesting idea.&lt;br /&gt;
&lt;br /&gt;
[WillieLee] With a &amp;quot;read/Write&amp;quot; style bit...&lt;br /&gt;
&lt;br /&gt;
[Carl] You can actually already do that, to a point.&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] I would like custom controls.&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] I have wrote a few custom controls, but packaging &lt;br /&gt;
them would be nice&lt;br /&gt;
&lt;br /&gt;
[Carl] I&#039;m not sure what you mean by custom controls.&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] like an LB-only OCX&lt;br /&gt;
&lt;br /&gt;
[Carl] Well, that&#039;s an idea.&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] Then they could be addressed using standard LB syntax&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] customcontrol &amp;quot;mycontrol.lcc&amp;quot;, X, Y, Width, Hieght&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] How sweet would that be?&lt;br /&gt;
&lt;br /&gt;
[StefanP] Then there comes Windows XP SP3 and brackes all ...&lt;br /&gt;
&lt;br /&gt;
[Carl] Don&#039;t even go there. ;-)&lt;br /&gt;
&lt;br /&gt;
[StefanP] Like with the MFC library controls&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] LCC is Liberty Custom Control, BTW&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] I may write a newsletter article on that&lt;br /&gt;
&lt;br /&gt;
[Carl] Or with the way they broke things with their screen saver lockout?&lt;br /&gt;
&lt;br /&gt;
[StefanP] Or missing COM port support with XP RTM&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] I could tease MS all day long, but you have to give &lt;br /&gt;
them that they have wrote a very successful OS&lt;br /&gt;
&lt;br /&gt;
[Carl] I&#039;m thinking that unit testing might make a nice feature &lt;br /&gt;
in a future version of Assist.&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] Unit Testing?&lt;br /&gt;
&lt;br /&gt;
[Dan] God, you guys are still talking..&lt;br /&gt;
&lt;br /&gt;
[StefanP] Device testing ...?&lt;br /&gt;
&lt;br /&gt;
[StefanP] Its 23:25 in Austria now, what should I do? Go to bed ...&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] We&#039;ve had great discussions about controls, libraries, &lt;br /&gt;
MS errors, and all kinds of good stuff&lt;br /&gt;
&lt;br /&gt;
[Carl] Unit testing is where you write testing scripts that exercise &lt;br /&gt;
your code. You would add one or more test scripts to an Assist project. &lt;br /&gt;
Then you would run them as you make changes toy your program. Tests &lt;br /&gt;
that fail give you an early indication that you&#039;ve broken something.&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] Sounds pretty good for stuff like LCC&#039;s and LUL&#039;s&lt;br /&gt;
&lt;br /&gt;
[Alyce] &#039;bye y&#039;all...&lt;br /&gt;
&lt;br /&gt;
[Carl] Then you stop what you&#039;re doing to fix things so the tests pass.&lt;br /&gt;
&lt;br /&gt;
Alyce exits from this room&lt;br /&gt;
&lt;br /&gt;
[Carl] Bye Alyce!&lt;br /&gt;
&lt;br /&gt;
[StefanP] Seems like a feature of the new language &amp;quot;Voldemort&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[Carl] Unit testing is good for lots of stuff.&lt;br /&gt;
&lt;br /&gt;
[Carl] Yeah, black magic.&lt;br /&gt;
&lt;br /&gt;
[Carl] And then there were 7.&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] LCC being Liberty Custom Control, and LUL being Liberty &lt;br /&gt;
User Libraries&lt;br /&gt;
&lt;br /&gt;
[Carl] Or LBL. Liberty BASIC Library.&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] LUL is to similar to LULL&lt;br /&gt;
&lt;br /&gt;
[Carl] NULL&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] I like LBL better&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] NULL?&lt;br /&gt;
&lt;br /&gt;
[StefanP] BTW, will the scheduled task fix make it into JB? &lt;br /&gt;
Had a question about that at the JB forum.&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] Speaking of which, will there be a JB 1.02?&lt;br /&gt;
&lt;br /&gt;
[Carl] Yes. All applicable fixes will make it into JB.&lt;br /&gt;
&lt;br /&gt;
[Carl] Yup. Probably in Jan or Feb.&lt;br /&gt;
&lt;br /&gt;
[StefanP] NULL ... No Useless Linked Libraries&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] &lt;br /&gt;
&lt;br /&gt;
[Carl] Well, it&#039;s been great. I really should sign off.&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] Bye Carl&lt;br /&gt;
&lt;br /&gt;
[StefanP] Bye Carl, have a nice day.&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] I am going to go work on a newsletter article about &lt;br /&gt;
custom controls&lt;br /&gt;
&lt;br /&gt;
[Carl] bye&lt;br /&gt;
&lt;br /&gt;
[Bwebmaster] See ya!&lt;br /&gt;
&lt;br /&gt;
Bwebmaster exits from this room&lt;br /&gt;
&lt;br /&gt;
Carl exits from this room&lt;br /&gt;
&lt;br /&gt;
[StefanP] Seems to be time to go to bed now, see you at &lt;br /&gt;
the forums.&lt;br /&gt;
&lt;br /&gt;
StefanP exits from this room&lt;br /&gt;
&lt;br /&gt;
WillieLee exits from this room</description>
          </item>
    <item>
      <title>16Colors.gif</title>
      <link>https://basic.wikispaces.com/file/detail/16Colors.gif</link>
      <dc:creator>lbjoseph</dc:creator>
      <guid isPermaLink="true">https://basic.wikispaces.com/file/detail/16Colors.gif</guid>
      <comments>https://basic.wikispaces.com/file/messages/16Colors.gif</comments>
      <pubDate>Mon, 11 Jul 2011 21:50:44 GMT</pubDate>
      <description></description>
              <enclosure url="https://basic.wikispaces.com/file/view/16Colors.gif"
        length="3376"
        type="image/gif"
        ></enclosure>
          </item>
    <item>
      <title>2DGameBorderWallExample2</title>
      <link>https://basic.wikispaces.com/2DGameBorderWallExample2</link>
      <dc:creator>benjamin805</dc:creator>
      <guid isPermaLink="true">https://basic.wikispaces.com/2DGameBorderWallExample2</guid>
      <comments>https://basic.wikispaces.com/page/messages/2DGameBorderWallExample2</comments>
      <pubDate>Mon, 08 Aug 2011 19:10:29 GMT</pubDate>
      <description>This is my second attempt at creating 2D level walls or borders. This time I am using sprites. The movement is very primitive, but I hope to add animation in my next attempt. You need the images below copied into your Liberty BASIC folder. Also added the bas file just in case you don&#039;t feel like copying or pasting.&lt;br /&gt;
&lt;br /&gt;
&lt;!-- ws:start:WikiTextFileRule:1:&amp;lt;img src=&amp;quot;https://www.wikispaces.com/site/embedthumbnail/file/cave1.bmp?h=52&amp;amp;w=320&amp;quot; class=&amp;quot;WikiFile&amp;quot; id=&amp;quot;wikitext@@file@@cave1.bmp&amp;quot; title=&amp;quot;File: cave1.bmp&amp;quot; width=&amp;quot;320&amp;quot; height=&amp;quot;52&amp;quot; /&amp;gt; --&gt;&lt;div class=&quot;objectEmbed&quot;&gt;&lt;a href=&quot;/file/view/cave1.bmp/242394691/cave1.bmp&quot; onclick=&quot;ws.common.trackFileLink(&#039;/file/view/cave1.bmp/242394691/cave1.bmp&#039;);&quot;&gt;&lt;img src=&quot;https://ssl.wikicdn.com/i/mime/32/empty.png&quot; height=&quot;32&quot; width=&quot;32&quot; alt=&quot;cave1.bmp&quot; /&gt;&lt;/a&gt;&lt;div&gt;&lt;a href=&quot;/file/view/cave1.bmp/242394691/cave1.bmp&quot; onclick=&quot;ws.common.trackFileLink(&#039;/file/view/cave1.bmp/242394691/cave1.bmp&#039;);&quot; class=&quot;filename&quot; title=&quot;cave1.bmp&quot;&gt;cave1.bmp&lt;/a&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;/file/detail/cave1.bmp&quot;&gt;Details&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;/file/view/cave1.bmp/242394691/cave1.bmp&quot;&gt;Download&lt;/a&gt;&lt;/li&gt;&lt;li style=&quot;color: #666&quot;&gt;7 KB&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;!-- ws:end:WikiTextFileRule:1 --&gt;&lt;!-- ws:start:WikiTextFileRule:2:&amp;lt;img src=&amp;quot;https://www.wikispaces.com/site/embedthumbnail/file/tree.bmp?h=52&amp;amp;w=320&amp;quot; class=&amp;quot;WikiFile&amp;quot; id=&amp;quot;wikitext@@file@@tree.bmp&amp;quot; title=&amp;quot;File: tree.bmp&amp;quot; width=&amp;quot;320&amp;quot; height=&amp;quot;52&amp;quot; /&amp;gt; --&gt;&lt;div class=&quot;objectEmbed&quot;&gt;&lt;a href=&quot;/file/view/tree.bmp/242394685/tree.bmp&quot; onclick=&quot;ws.common.trackFileLink(&#039;/file/view/tree.bmp/242394685/tree.bmp&#039;);&quot;&gt;&lt;img src=&quot;https://ssl.wikicdn.com/i/mime/32/empty.png&quot; height=&quot;32&quot; width=&quot;32&quot; alt=&quot;tree.bmp&quot; /&gt;&lt;/a&gt;&lt;div&gt;&lt;a href=&quot;/file/view/tree.bmp/242394685/tree.bmp&quot; onclick=&quot;ws.common.trackFileLink(&#039;/file/view/tree.bmp/242394685/tree.bmp&#039;);&quot; class=&quot;filename&quot; title=&quot;tree.bmp&quot;&gt;tree.bmp&lt;/a&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;/file/detail/tree.bmp&quot;&gt;Details&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;/file/view/tree.bmp/242394685/tree.bmp&quot;&gt;Download&lt;/a&gt;&lt;/li&gt;&lt;li style=&quot;color: #666&quot;&gt;2 KB&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;!-- ws:end:WikiTextFileRule:2 --&gt;&lt;!-- ws:start:WikiTextFileRule:3:&amp;lt;img src=&amp;quot;https://www.wikispaces.com/site/embedthumbnail/file/food.bmp?h=52&amp;amp;w=320&amp;quot; class=&amp;quot;WikiFile&amp;quot; id=&amp;quot;wikitext@@file@@food.bmp&amp;quot; title=&amp;quot;File: food.bmp&amp;quot; width=&amp;quot;320&amp;quot; height=&amp;quot;52&amp;quot; /&amp;gt; --&gt;&lt;div class=&quot;objectEmbed&quot;&gt;&lt;a href=&quot;/file/view/food.bmp/242394669/food.bmp&quot; onclick=&quot;ws.common.trackFileLink(&#039;/file/view/food.bmp/242394669/food.bmp&#039;);&quot;&gt;&lt;img src=&quot;https://ssl.wikicdn.com/i/mime/32/empty.png&quot; height=&quot;32&quot; width=&quot;32&quot; alt=&quot;food.bmp&quot; /&gt;&lt;/a&gt;&lt;div&gt;&lt;a href=&quot;/file/view/food.bmp/242394669/food.bmp&quot; onclick=&quot;ws.common.trackFileLink(&#039;/file/view/food.bmp/242394669/food.bmp&#039;);&quot; class=&quot;filename&quot; title=&quot;food.bmp&quot;&gt;food.bmp&lt;/a&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;/file/detail/food.bmp&quot;&gt;Details&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;/file/view/food.bmp/242394669/food.bmp&quot;&gt;Download&lt;/a&gt;&lt;/li&gt;&lt;li style=&quot;color: #666&quot;&gt;1 KB&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;!-- ws:end:WikiTextFileRule:3 --&gt;&lt;!-- ws:start:WikiTextFileRule:4:&amp;lt;img src=&amp;quot;https://www.wikispaces.com/site/embedthumbnail/file/cdef.bas?h=52&amp;amp;w=320&amp;quot; class=&amp;quot;WikiFile&amp;quot; id=&amp;quot;wikitext@@file@@cdef.bas&amp;quot; title=&amp;quot;File: cdef.bas&amp;quot; width=&amp;quot;320&amp;quot; height=&amp;quot;52&amp;quot; /&amp;gt; --&gt;&lt;div class=&quot;objectEmbed&quot;&gt;&lt;a href=&quot;/file/view/cdef.bas/242395221/cdef.bas&quot; onclick=&quot;ws.common.trackFileLink(&#039;/file/view/cdef.bas/242395221/cdef.bas&#039;);&quot;&gt;&lt;img src=&quot;https://ssl.wikicdn.com/i/mime/32/text/plain.png&quot; height=&quot;32&quot; width=&quot;32&quot; alt=&quot;cdef.bas&quot; /&gt;&lt;/a&gt;&lt;div&gt;&lt;a href=&quot;/file/view/cdef.bas/242395221/cdef.bas&quot; onclick=&quot;ws.common.trackFileLink(&#039;/file/view/cdef.bas/242395221/cdef.bas&#039;);&quot; class=&quot;filename&quot; title=&quot;cdef.bas&quot;&gt;cdef.bas&lt;/a&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;/file/detail/cdef.bas&quot;&gt;Details&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;/file/view/cdef.bas/242395221/cdef.bas&quot;&gt;Download&lt;/a&gt;&lt;/li&gt;&lt;li style=&quot;color: #666&quot;&gt;5 KB&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;!-- ws:end:WikiTextFileRule:4 --&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:0:
&amp;lt;pre class=&amp;quot;text&amp;quot;&amp;gt;&#039;basic 2d game level wall/border example 2&amp;lt;br/&amp;gt;  &#039;using sprites&amp;lt;br/&amp;gt;  &#039;programmed by Ben Jimenez&amp;lt;br/&amp;gt;  &#039;8=up 6=right 2=down 4=left 7=up/left&amp;lt;br/&amp;gt;  &#039;9=up/right 1=down/left 3=down/right&amp;lt;br/&amp;gt;  &#039;July 22,2011&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;    noMainWin&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;    WindowWidth = 470&amp;lt;br/&amp;gt;    WindowHeight = 500&amp;lt;br/&amp;gt;    CPU=100&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;    open &amp;amp;quot;Cave dude eat food&amp;amp;quot; for graphics_nsb_nf as #main&amp;lt;br/&amp;gt;    #main,&amp;amp;quot;trapclose [endOfProgram]; down&amp;amp;quot;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;    print #main, &amp;amp;quot;font ms_sans_serif 0 16&amp;amp;quot;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;    loadbmp &amp;amp;quot;sprite1&amp;amp;quot;,&amp;amp;quot;cave1.bmp&amp;amp;quot;&amp;lt;br/&amp;gt;    loadbmp &amp;amp;quot;tree&amp;amp;quot;,&amp;amp;quot;tree.bmp&amp;amp;quot;&amp;lt;br/&amp;gt;    loadbmp &amp;amp;quot;food&amp;amp;quot;,&amp;amp;quot;food.bmp&amp;amp;quot;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;    print #main, &amp;amp;quot;addsprite sprite1 sprite1&amp;amp;quot;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;    dim pxy$(22,22)&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;    &#039;start postion of first wall piece&amp;lt;br/&amp;gt;    x=10&amp;lt;br/&amp;gt;    y=20&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;    for r=1 to 22 &#039;first row&amp;lt;br/&amp;gt;        for c=1 to 22 &#039;current row column loop&amp;lt;br/&amp;gt;        read d$&amp;lt;br/&amp;gt;        pxy$(r,c)=d$&amp;lt;br/&amp;gt;        if d$=&amp;amp;quot;t&amp;amp;quot; then  &#039;draw tree&amp;lt;br/&amp;gt;           tcnt=tcnt+1&amp;lt;br/&amp;gt;           #main,&amp;amp;quot;addsprite tree&amp;amp;quot;;tcnt;&amp;amp;quot; tree&amp;amp;quot;&amp;lt;br/&amp;gt;           #main,&amp;amp;quot;spritexy tree&amp;amp;quot;;tcnt;&amp;amp;quot; &amp;amp;quot;;x;&amp;amp;quot; &amp;amp;quot;;y&amp;lt;br/&amp;gt;        end if&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;         if d$=&amp;amp;quot;f&amp;amp;quot; then  &#039;draw food&amp;lt;br/&amp;gt;          fcnt=fcnt+1&amp;lt;br/&amp;gt;           #main,&amp;amp;quot;addsprite food&amp;amp;quot;;fcnt;&amp;amp;quot; food&amp;amp;quot;&amp;lt;br/&amp;gt;           #main,&amp;amp;quot;spritexy food&amp;amp;quot;;fcnt;&amp;amp;quot; &amp;amp;quot;;x+5;&amp;amp;quot; &amp;amp;quot;;y+10&amp;lt;br/&amp;gt;           food=food+1&amp;lt;br/&amp;gt;        end if&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;        if d$=&amp;amp;quot;s&amp;amp;quot; then &#039;draw player&amp;lt;br/&amp;gt;            #main,&amp;amp;quot;spritexy sprite1 &amp;amp;quot;;x;&amp;amp;quot; &amp;amp;quot;;y&amp;lt;br/&amp;gt;            #main,&amp;amp;quot;spritescale sprite1 40&amp;amp;quot;&amp;lt;br/&amp;gt;            px=x &#039;set current pen x position to player start x&amp;lt;br/&amp;gt;            py=y  &#039; set current pen y position to player start y&amp;lt;br/&amp;gt;            ar=r  &#039;remember current row location&amp;lt;br/&amp;gt;            ac=c &#039;remember current column locaton&amp;lt;br/&amp;gt;        end if&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;        x=x+20 &#039;increase column x location by 20&amp;lt;br/&amp;gt;        next c&amp;lt;br/&amp;gt;        x=10&amp;lt;br/&amp;gt;        y=y+20 &#039;increase row y location by 20&amp;lt;br/&amp;gt;    next r&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;    #main,&amp;amp;quot;when characterInput [checkKey]&amp;amp;quot;&amp;lt;br/&amp;gt;    #main,&amp;amp;quot;setfocus&amp;amp;quot;&amp;lt;br/&amp;gt;    goto [checkKey]&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;[main.inputLoop]   &#039;wait here for input event&amp;lt;br/&amp;gt;    #main,&amp;amp;quot;drawsprites&amp;amp;quot;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;    if pxy$(ar,ac)=&amp;amp;quot;e&amp;amp;quot; and food=0 then&amp;lt;br/&amp;gt;    notice &amp;amp;quot;You collected all the food and escaped!&amp;amp;quot;&amp;lt;br/&amp;gt;    end if&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;    if pxy$(ar,ac)=&amp;amp;quot;e&amp;amp;quot; and food&amp;amp;gt;0 then&amp;lt;br/&amp;gt;    notice &amp;amp;quot;You need to collect more food!&amp;amp;quot;&amp;lt;br/&amp;gt;    end if&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;  wait&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;[checkKey]&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&#039;player move loop&amp;lt;br/&amp;gt;&#039;player can move as long as his path&amp;lt;br/&amp;gt;&#039;is not blocked by tree&amp;lt;br/&amp;gt;key$ = Inkey$&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;    if len(key$) &amp;amp;lt; 2 then&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;    #main,&amp;amp;quot;drawsprites; segment segNum&amp;amp;quot;&amp;lt;br/&amp;gt;    #main,&amp;amp;quot;getbmp bg 0 0 &amp;amp;quot;;WindowWidth;&amp;amp;quot; &amp;amp;quot;;WindowHeight;&amp;amp;quot;;place 0 0; drawbmp bg; flush bg&amp;amp;quot;&amp;lt;br/&amp;gt;    #main,&amp;amp;quot;delsegment &amp;amp;quot;;segNum-1&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;       if key$=&amp;amp;quot;2&amp;amp;quot; then &#039;down&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;       if pxy$(ar+1,ac)&amp;amp;lt;&amp;amp;gt;&amp;amp;quot;t&amp;amp;quot;  then &#039;if next space is not a tree&amp;lt;br/&amp;gt;        py=py+20&amp;lt;br/&amp;gt;        #main,&amp;amp;quot;spritexy sprite1 &amp;amp;quot;;px;&amp;amp;quot; &amp;amp;quot;;py&amp;lt;br/&amp;gt;       ar=ar+1&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;       end if&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;       end if&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;       if key$=&amp;amp;quot;6&amp;amp;quot; then &#039;right&amp;lt;br/&amp;gt;       if pxy$(ar,ac+1)&amp;amp;lt;&amp;amp;gt;&amp;amp;quot;t&amp;amp;quot;  then &#039;if next space is not a tree&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;       px=px+20&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;       #main,&amp;amp;quot;spritexy sprite1 &amp;amp;quot;;px;&amp;amp;quot; &amp;amp;quot;;py&amp;lt;br/&amp;gt;       ac=ac+1&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;       end if&amp;lt;br/&amp;gt;       end if&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;       if key$=&amp;amp;quot;4&amp;amp;quot; then &#039;left&amp;lt;br/&amp;gt;       if pxy$(ar,ac-1)&amp;amp;lt;&amp;amp;gt;&amp;amp;quot;t&amp;amp;quot;  then &#039;if next space is not a tree&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;       px=px-20&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;       #main,&amp;amp;quot;spritexy sprite1 &amp;amp;quot;;px;&amp;amp;quot; &amp;amp;quot;;py&amp;lt;br/&amp;gt;       ac=ac-1&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;       end if&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;       end if&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;       if key$=&amp;amp;quot;8&amp;amp;quot; then &#039;up&amp;lt;br/&amp;gt;       if pxy$(ar-1,ac)&amp;amp;lt;&amp;amp;gt;&amp;amp;quot;t&amp;amp;quot;   then &#039;if next space is not a tree&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;       py=py-20&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;       #main,&amp;amp;quot;spritexy sprite1 &amp;amp;quot;;px;&amp;amp;quot; &amp;amp;quot;;py&amp;lt;br/&amp;gt;       ar=ar-1&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;       end if&amp;lt;br/&amp;gt;       end if&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;       if key$=&amp;amp;quot;3&amp;amp;quot; then &#039;down,right&amp;lt;br/&amp;gt;       if pxy$(ar+1,ac+1)&amp;amp;lt;&amp;amp;gt;&amp;amp;quot;t&amp;amp;quot;   then &#039;if next space is not a tree&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;       px=px+20&amp;lt;br/&amp;gt;       py=py+20&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;       #main,&amp;amp;quot;spritexy sprite1 &amp;amp;quot;;px;&amp;amp;quot; &amp;amp;quot;;py&amp;lt;br/&amp;gt;       ac=ac+1&amp;lt;br/&amp;gt;       ar=ar+1&amp;lt;br/&amp;gt;       end if&amp;lt;br/&amp;gt;       end if&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;       if key$=&amp;amp;quot;1&amp;amp;quot; then &#039;down,left&amp;lt;br/&amp;gt;       if pxy$(ar+1,ac-1)&amp;amp;lt;&amp;amp;gt;&amp;amp;quot;t&amp;amp;quot;  then &#039;if next space is not a tree&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;       px=px-20&amp;lt;br/&amp;gt;       py=py+20&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;       #main,&amp;amp;quot;spritexy sprite1 &amp;amp;quot;;px;&amp;amp;quot; &amp;amp;quot;;py&amp;lt;br/&amp;gt;       ac=ac-1&amp;lt;br/&amp;gt;       ar=ar+1&amp;lt;br/&amp;gt;       end if&amp;lt;br/&amp;gt;       end if&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;       if key$=&amp;amp;quot;9&amp;amp;quot; then &#039;up,right&amp;lt;br/&amp;gt;       if pxy$(ar-1,ac+1)&amp;amp;lt;&amp;amp;gt;&amp;amp;quot;t&amp;amp;quot;  then &#039;if next space is not a tree&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;       px=px+20&amp;lt;br/&amp;gt;       py=py-20&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;       #main,&amp;amp;quot;spritexy sprite1 &amp;amp;quot;;px;&amp;amp;quot; &amp;amp;quot;;py&amp;lt;br/&amp;gt;       ac=ac+1&amp;lt;br/&amp;gt;       ar=ar-1&amp;lt;br/&amp;gt;       end if&amp;lt;br/&amp;gt;       end if&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;       if key$=&amp;amp;quot;7&amp;amp;quot; then &#039;up,left&amp;lt;br/&amp;gt;       if pxy$(ar-1,ac-1)&amp;amp;lt;&amp;amp;gt;&amp;amp;quot;t&amp;amp;quot;  then &#039;if next space is not a tree&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;       px=px-20&amp;lt;br/&amp;gt;       py=py-20&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;       #main,&amp;amp;quot;spritexy sprite1 &amp;amp;quot;;px;&amp;amp;quot; &amp;amp;quot;;py&amp;lt;br/&amp;gt;       ac=ac-1&amp;lt;br/&amp;gt;       ar=ar-1&amp;lt;br/&amp;gt;        end if&amp;lt;br/&amp;gt;       end if&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;    end if&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;      if pxy$(ar,ac)=&amp;amp;quot;f&amp;amp;quot; then&amp;lt;br/&amp;gt;      #main,&amp;amp;quot;spritecollides sprite1&amp;amp;quot;;&amp;lt;br/&amp;gt;      input #main,list$&amp;lt;br/&amp;gt;      #main,&amp;amp;quot;spritevisible &amp;amp;quot;;word$(list$,1);&amp;amp;quot; off&amp;amp;quot;;&amp;lt;br/&amp;gt;      pxy$(ar,ac)=&amp;amp;quot;x&amp;amp;quot;&amp;lt;br/&amp;gt;      food=food-1&amp;lt;br/&amp;gt;      end if&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;   goto [main.inputLoop]&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;[endOfProgram]&amp;lt;br/&amp;gt;    unloadbmp &amp;amp;quot;sprite1&amp;amp;quot;&amp;lt;br/&amp;gt;    unloadbmp &amp;amp;quot;tree&amp;amp;quot;&amp;lt;br/&amp;gt;    unloadbmp &amp;amp;quot;food&amp;amp;quot;&amp;lt;br/&amp;gt;    close #main&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;    &#039;map data&amp;lt;br/&amp;gt;    data  t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t&amp;lt;br/&amp;gt;    data  t,x,x,x,x,x,x,x,t,f,x,t,x,t,x,t,x,x,x,x,x,t&amp;lt;br/&amp;gt;    data  t,x,t,t,x,x,t,x,t,x,t,t,t,x,x,x,t,t,x,f,x,t&amp;lt;br/&amp;gt;    data  t,t,t,t,x,x,x,x,x,t,x,x,t,t,x,t,x,t,t,x,x,t&amp;lt;br/&amp;gt;    data  t,x,f,x,x,x,x,x,x,x,t,x,t,t,t,x,x,x,t,x,x,t&amp;lt;br/&amp;gt;    data  t,x,x,t,x,x,x,t,x,t,t,t,x,t,t,x,x,t,t,t,x,t&amp;lt;br/&amp;gt;    data  t,x,t,t,x,x,t,x,t,x,x,t,x,x,x,t,t,t,t,t,x,t&amp;lt;br/&amp;gt;    data  t,x,x,x,x,t,x,f,t,t,x,x,x,t,x,t,t,t,t,t,x,t&amp;lt;br/&amp;gt;    data  t,x,x,t,x,x,t,t,t,x,x,t,x,t,t,x,x,x,x,t,f,t&amp;lt;br/&amp;gt;    data  t,x,t,t,x,t,x,x,x,t,t,x,x,x,x,t,x,x,x,x,t,t&amp;lt;br/&amp;gt;    data  t,x,x,t,x,x,x,x,t,x,s,t,x,x,x,x,x,x,t,t,x,t&amp;lt;br/&amp;gt;    data  t,x,x,x,t,t,x,t,x,x,t,t,x,t,x,t,t,x,x,x,x,t&amp;lt;br/&amp;gt;    data  t,x,x,t,x,x,x,t,x,x,t,x,x,x,t,x,x,x,x,x,x,t&amp;lt;br/&amp;gt;    data  t,x,t,x,x,t,x,t,t,x,x,x,x,x,x,x,x,t,t,t,x,t&amp;lt;br/&amp;gt;    data  t,t,x,x,x,x,x,x,t,x,x,t,x,x,t,t,x,t,t,t,x,t&amp;lt;br/&amp;gt;    data  t,x,t,t,x,x,t,x,x,x,t,x,x,t,t,t,x,t,t,t,t,t&amp;lt;br/&amp;gt;    data  t,x,x,t,x,t,t,x,t,x,t,x,x,t,x,x,x,x,x,t,t,t&amp;lt;br/&amp;gt;    data  t,t,x,t,x,x,t,x,f,t,x,x,t,x,x,t,t,x,t,t,x,e&amp;lt;br/&amp;gt;    data  t,t,f,t,x,x,x,x,x,t,x,x,x,t,x,x,t,x,t,t,x,t&amp;lt;br/&amp;gt;    data  t,x,t,x,x,t,x,t,x,t,t,x,t,t,x,x,t,x,x,x,x,t&amp;lt;br/&amp;gt;    data  t,x,t,x,x,x,t,x,x,x,x,x,t,f,t,x,x,t,x,x,x,t&amp;lt;br/&amp;gt;    data  t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t&amp;amp;lt;/span&amp;amp;gt;&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.text  {font-family:monospace;}
.text .imp {font-weight: bold; color: red;}
.text span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;text&quot;&gt;&#039;basic 2d game level wall/border example 2
  &#039;using sprites
  &#039;programmed by Ben Jimenez
  &#039;8=up 6=right 2=down 4=left 7=up/left
  &#039;9=up/right 1=down/left 3=down/right
  &#039;July 22,2011
&amp;nbsp;
&amp;nbsp;
    noMainWin
&amp;nbsp;
    WindowWidth = 470
    WindowHeight = 500
    CPU=100
&amp;nbsp;
    open &amp;quot;Cave dude eat food&amp;quot; for graphics_nsb_nf as #main
    #main,&amp;quot;trapclose [endOfProgram]; down&amp;quot;
&amp;nbsp;
    print #main, &amp;quot;font ms_sans_serif 0 16&amp;quot;
&amp;nbsp;
    loadbmp &amp;quot;sprite1&amp;quot;,&amp;quot;cave1.bmp&amp;quot;
    loadbmp &amp;quot;tree&amp;quot;,&amp;quot;tree.bmp&amp;quot;
    loadbmp &amp;quot;food&amp;quot;,&amp;quot;food.bmp&amp;quot;
&amp;nbsp;
    print #main, &amp;quot;addsprite sprite1 sprite1&amp;quot;
&amp;nbsp;
    dim pxy$(22,22)
&amp;nbsp;
    &#039;start postion of first wall piece
    x=10
    y=20
&amp;nbsp;
    for r=1 to 22 &#039;first row
        for c=1 to 22 &#039;current row column loop
        read d$
        pxy$(r,c)=d$
        if d$=&amp;quot;t&amp;quot; then  &#039;draw tree
           tcnt=tcnt+1
           #main,&amp;quot;addsprite tree&amp;quot;;tcnt;&amp;quot; tree&amp;quot;
           #main,&amp;quot;spritexy tree&amp;quot;;tcnt;&amp;quot; &amp;quot;;x;&amp;quot; &amp;quot;;y
        end if
&amp;nbsp;
&amp;nbsp;
         if d$=&amp;quot;f&amp;quot; then  &#039;draw food
          fcnt=fcnt+1
           #main,&amp;quot;addsprite food&amp;quot;;fcnt;&amp;quot; food&amp;quot;
           #main,&amp;quot;spritexy food&amp;quot;;fcnt;&amp;quot; &amp;quot;;x+5;&amp;quot; &amp;quot;;y+10
           food=food+1
        end if
&amp;nbsp;
        if d$=&amp;quot;s&amp;quot; then &#039;draw player
            #main,&amp;quot;spritexy sprite1 &amp;quot;;x;&amp;quot; &amp;quot;;y
            #main,&amp;quot;spritescale sprite1 40&amp;quot;
            px=x &#039;set current pen x position to player start x
            py=y  &#039; set current pen y position to player start y
            ar=r  &#039;remember current row location
            ac=c &#039;remember current column locaton
        end if
&amp;nbsp;
        x=x+20 &#039;increase column x location by 20
        next c
        x=10
        y=y+20 &#039;increase row y location by 20
    next r
&amp;nbsp;
    #main,&amp;quot;when characterInput [checkKey]&amp;quot;
    #main,&amp;quot;setfocus&amp;quot;
    goto [checkKey]
&amp;nbsp;
&amp;nbsp;
[main.inputLoop]   &#039;wait here for input event
    #main,&amp;quot;drawsprites&amp;quot;
&amp;nbsp;
    if pxy$(ar,ac)=&amp;quot;e&amp;quot; and food=0 then
    notice &amp;quot;You collected all the food and escaped!&amp;quot;
    end if
&amp;nbsp;
    if pxy$(ar,ac)=&amp;quot;e&amp;quot; and food&amp;gt;0 then
    notice &amp;quot;You need to collect more food!&amp;quot;
    end if
&amp;nbsp;
  wait
&amp;nbsp;
[checkKey]
&amp;nbsp;
&#039;player move loop
&#039;player can move as long as his path
&#039;is not blocked by tree
key$ = Inkey$
&amp;nbsp;
    if len(key$) &amp;lt; 2 then
&amp;nbsp;
    #main,&amp;quot;drawsprites; segment segNum&amp;quot;
    #main,&amp;quot;getbmp bg 0 0 &amp;quot;;WindowWidth;&amp;quot; &amp;quot;;WindowHeight;&amp;quot;;place 0 0; drawbmp bg; flush bg&amp;quot;
    #main,&amp;quot;delsegment &amp;quot;;segNum-1
&amp;nbsp;
       if key$=&amp;quot;2&amp;quot; then &#039;down
&amp;nbsp;
&amp;nbsp;
       if pxy$(ar+1,ac)&amp;lt;&amp;gt;&amp;quot;t&amp;quot;  then &#039;if next space is not a tree
        py=py+20
        #main,&amp;quot;spritexy sprite1 &amp;quot;;px;&amp;quot; &amp;quot;;py
       ar=ar+1
&amp;nbsp;
       end if
&amp;nbsp;
       end if
&amp;nbsp;
       if key$=&amp;quot;6&amp;quot; then &#039;right
       if pxy$(ar,ac+1)&amp;lt;&amp;gt;&amp;quot;t&amp;quot;  then &#039;if next space is not a tree
&amp;nbsp;
       px=px+20
&amp;nbsp;
       #main,&amp;quot;spritexy sprite1 &amp;quot;;px;&amp;quot; &amp;quot;;py
       ac=ac+1
&amp;nbsp;
       end if
       end if
&amp;nbsp;
       if key$=&amp;quot;4&amp;quot; then &#039;left
       if pxy$(ar,ac-1)&amp;lt;&amp;gt;&amp;quot;t&amp;quot;  then &#039;if next space is not a tree
&amp;nbsp;
       px=px-20
&amp;nbsp;
       #main,&amp;quot;spritexy sprite1 &amp;quot;;px;&amp;quot; &amp;quot;;py
       ac=ac-1
&amp;nbsp;
       end if
&amp;nbsp;
       end if
&amp;nbsp;
       if key$=&amp;quot;8&amp;quot; then &#039;up
       if pxy$(ar-1,ac)&amp;lt;&amp;gt;&amp;quot;t&amp;quot;   then &#039;if next space is not a tree
&amp;nbsp;
       py=py-20
&amp;nbsp;
       #main,&amp;quot;spritexy sprite1 &amp;quot;;px;&amp;quot; &amp;quot;;py
       ar=ar-1
&amp;nbsp;
       end if
       end if
&amp;nbsp;
&amp;nbsp;
       if key$=&amp;quot;3&amp;quot; then &#039;down,right
       if pxy$(ar+1,ac+1)&amp;lt;&amp;gt;&amp;quot;t&amp;quot;   then &#039;if next space is not a tree
&amp;nbsp;
       px=px+20
       py=py+20
&amp;nbsp;
       #main,&amp;quot;spritexy sprite1 &amp;quot;;px;&amp;quot; &amp;quot;;py
       ac=ac+1
       ar=ar+1
       end if
       end if
&amp;nbsp;
       if key$=&amp;quot;1&amp;quot; then &#039;down,left
       if pxy$(ar+1,ac-1)&amp;lt;&amp;gt;&amp;quot;t&amp;quot;  then &#039;if next space is not a tree
&amp;nbsp;
       px=px-20
       py=py+20
&amp;nbsp;
       #main,&amp;quot;spritexy sprite1 &amp;quot;;px;&amp;quot; &amp;quot;;py
       ac=ac-1
       ar=ar+1
       end if
       end if
&amp;nbsp;
       if key$=&amp;quot;9&amp;quot; then &#039;up,right
       if pxy$(ar-1,ac+1)&amp;lt;&amp;gt;&amp;quot;t&amp;quot;  then &#039;if next space is not a tree
&amp;nbsp;
       px=px+20
       py=py-20
&amp;nbsp;
       #main,&amp;quot;spritexy sprite1 &amp;quot;;px;&amp;quot; &amp;quot;;py
       ac=ac+1
       ar=ar-1
       end if
       end if
&amp;nbsp;
       if key$=&amp;quot;7&amp;quot; then &#039;up,left
       if pxy$(ar-1,ac-1)&amp;lt;&amp;gt;&amp;quot;t&amp;quot;  then &#039;if next space is not a tree
&amp;nbsp;
       px=px-20
       py=py-20
&amp;nbsp;
       #main,&amp;quot;spritexy sprite1 &amp;quot;;px;&amp;quot; &amp;quot;;py
       ac=ac-1
       ar=ar-1
        end if
       end if
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
    end if
&amp;nbsp;
      if pxy$(ar,ac)=&amp;quot;f&amp;quot; then
      #main,&amp;quot;spritecollides sprite1&amp;quot;;
      input #main,list$
      #main,&amp;quot;spritevisible &amp;quot;;word$(list$,1);&amp;quot; off&amp;quot;;
      pxy$(ar,ac)=&amp;quot;x&amp;quot;
      food=food-1
      end if
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
   goto [main.inputLoop]
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
[endOfProgram]
    unloadbmp &amp;quot;sprite1&amp;quot;
    unloadbmp &amp;quot;tree&amp;quot;
    unloadbmp &amp;quot;food&amp;quot;
    close #main
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
    &#039;map data
    data  t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t
    data  t,x,x,x,x,x,x,x,t,f,x,t,x,t,x,t,x,x,x,x,x,t
    data  t,x,t,t,x,x,t,x,t,x,t,t,t,x,x,x,t,t,x,f,x,t
    data  t,t,t,t,x,x,x,x,x,t,x,x,t,t,x,t,x,t,t,x,x,t
    data  t,x,f,x,x,x,x,x,x,x,t,x,t,t,t,x,x,x,t,x,x,t
    data  t,x,x,t,x,x,x,t,x,t,t,t,x,t,t,x,x,t,t,t,x,t
    data  t,x,t,t,x,x,t,x,t,x,x,t,x,x,x,t,t,t,t,t,x,t
    data  t,x,x,x,x,t,x,f,t,t,x,x,x,t,x,t,t,t,t,t,x,t
    data  t,x,x,t,x,x,t,t,t,x,x,t,x,t,t,x,x,x,x,t,f,t
    data  t,x,t,t,x,t,x,x,x,t,t,x,x,x,x,t,x,x,x,x,t,t
    data  t,x,x,t,x,x,x,x,t,x,s,t,x,x,x,x,x,x,t,t,x,t
    data  t,x,x,x,t,t,x,t,x,x,t,t,x,t,x,t,t,x,x,x,x,t
    data  t,x,x,t,x,x,x,t,x,x,t,x,x,x,t,x,x,x,x,x,x,t
    data  t,x,t,x,x,t,x,t,t,x,x,x,x,x,x,x,x,t,t,t,x,t
    data  t,t,x,x,x,x,x,x,t,x,x,t,x,x,t,t,x,t,t,t,x,t
    data  t,x,t,t,x,x,t,x,x,x,t,x,x,t,t,t,x,t,t,t,t,t
    data  t,x,x,t,x,t,t,x,t,x,t,x,x,t,x,x,x,x,x,t,t,t
    data  t,t,x,t,x,x,t,x,f,t,x,x,t,x,x,t,t,x,t,t,x,e
    data  t,t,f,t,x,x,x,x,x,t,x,x,x,t,x,x,t,x,t,t,x,t
    data  t,x,t,x,x,t,x,t,x,t,t,x,t,t,x,x,t,x,x,x,x,t
    data  t,x,t,x,x,x,t,x,x,x,x,x,t,f,t,x,x,t,x,x,x,t
    data  t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t&amp;lt;/span&amp;gt;&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:0 --&gt;</description>
          </item>
    <item>
      <title>2DGameWallBorderExample</title>
      <link>https://basic.wikispaces.com/2DGameWallBorderExample</link>
      <dc:creator>benjamin805</dc:creator>
      <guid isPermaLink="true">https://basic.wikispaces.com/2DGameWallBorderExample</guid>
      <comments>https://basic.wikispaces.com/page/messages/2DGameWallBorderExample</comments>
      <pubDate>Sat, 15 Oct 2011 18:11:01 GMT</pubDate>
      <description>Hi,&lt;br /&gt;
&lt;br /&gt;
Just wanted to share a simple one level game that shows a simple way to create walls/borders in your 2d game. The game has only 1 level, but it shouldn&#039;t be too hard to add more. I want to make another version using sprites, but time will determine that (free time that is).&lt;br /&gt;
&lt;br /&gt;
I created this game to show an easy way to create borders or walls for your 2D games in BASIC. This game only has one level, but it should not be too hard to create more. I want to create a version using sprites, since the sprites commands do not have an easy way to create walls for your games I am attempting to come up with something that will work for me. I&#039;d like to share what I come up with. I know this is very basic, but it&#039;s just a starting point. With the sprite version I want to try to add a more fluent movement to the sprite.&lt;br /&gt;
&lt;br /&gt;
Note: Now updated so you can use your arrow keys to move the player&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:0:
&amp;lt;pre class=&amp;quot;lb&amp;quot;&amp;gt; &#039;basic 2d game level wall/border example&amp;lt;br/&amp;gt;  &#039;using native graphic commands&amp;lt;br/&amp;gt;  &#039;programmed by Ben Jimenez&amp;lt;br/&amp;gt;  &#039;use your arrow keys to move the player&amp;lt;br/&amp;gt;  &#039;July 20,2011&amp;lt;br/&amp;gt;  &#039;upadted Oct 15,2011&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;    nomainwin&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;    WindowWidth = 470&amp;lt;br/&amp;gt;    WindowHeight = 500&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;    open &amp;amp;quot;Border/Wall Example&amp;amp;quot; for graphics_nsb_nf as #main&amp;lt;br/&amp;gt;    print #main, &amp;amp;quot;fill white; flush&amp;amp;quot;&amp;lt;br/&amp;gt;    print #main, &amp;amp;quot;font ms_sans_serif 0 16&amp;amp;quot;&amp;lt;br/&amp;gt;    #main,&amp;amp;quot;up;goto 20 30;size 3;down&amp;amp;quot;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;   dim pxy$(22,22)&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;    up$= chr$(_VK_UP)&amp;lt;br/&amp;gt;    lft$=chr$(_VK_LEFT)&amp;lt;br/&amp;gt;    rht$=chr$(_VK_RIGHT)&amp;lt;br/&amp;gt;    dwn$=chr$(_VK_DOWN)&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;    &#039;start postion of first wall piece&amp;lt;br/&amp;gt;    x=10&amp;lt;br/&amp;gt;    y=20&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&#039;draw border walls&amp;lt;br/&amp;gt;    for r=1 to 22 &#039;first row&amp;lt;br/&amp;gt;        for c=1 to 22 &#039;current row column loop&amp;lt;br/&amp;gt;        read d$&amp;lt;br/&amp;gt;        pxy$(r,c)=d$&amp;lt;br/&amp;gt;        if d$=&amp;amp;quot;B&amp;amp;quot; then  &#039;if border piece then draw it&amp;lt;br/&amp;gt;            #main,&amp;amp;quot;up;goto &amp;amp;quot;;x+20;&amp;amp;quot; &amp;amp;quot;;y+20;&amp;amp;quot;;down;backcolor blue;color blue&amp;amp;quot;&amp;lt;br/&amp;gt;            #main,&amp;amp;quot;boxfilled &amp;amp;quot;;x;&amp;amp;quot; &amp;amp;quot;;y&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;        end if&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;        if d$=&amp;amp;quot;s&amp;amp;quot; then  &#039;save player start position&amp;lt;br/&amp;gt;            px=x &#039;set current pen x position to player start x&amp;lt;br/&amp;gt;            py=y  &#039; set current pen y position to player start y&amp;lt;br/&amp;gt;            ar=r  &#039;remember current row location&amp;lt;br/&amp;gt;            ac=c &#039;remember current column locaton&amp;lt;br/&amp;gt;        end if&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;        x=x+20 &#039;increase column x location by 20&amp;lt;br/&amp;gt;        next c&amp;lt;br/&amp;gt;        x=10&amp;lt;br/&amp;gt;        y=y+20 &#039;increase row y location by 20&amp;lt;br/&amp;gt;    next r&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;    #main,&amp;amp;quot;flush&amp;amp;quot; &#039;save drawn board as segment&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;       &#039;draw player&amp;lt;br/&amp;gt;       #main,&amp;amp;quot;up;goto &amp;amp;quot;;px+10;&amp;amp;quot; &amp;amp;quot;;py+10;&amp;amp;quot;;down;backcolor brown;color brown&amp;amp;quot;&amp;lt;br/&amp;gt;       #main,&amp;amp;quot;circlefilled 6&amp;amp;quot;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;   #main,&amp;amp;quot;when characterInput [checkkey]&amp;amp;quot;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;[main.inputLoop]   &#039;wait here for input event&amp;lt;br/&amp;gt;#main,&amp;amp;quot;setfocus&amp;amp;quot;&amp;lt;br/&amp;gt;    wait&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;[checkkey]&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt; key$ = left$(Inkey$, 2)&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;   select case right$(key$,1)&amp;lt;br/&amp;gt;   &#039;if wall/boarder found for next movement then no movement will be done.&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;      case dwn$ &#039;down&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;       if pxy$(ar+1,ac)&amp;amp;lt;&amp;amp;gt;&amp;amp;quot;B&amp;amp;quot; then &#039;if next location is not a wall/border then move player&amp;lt;br/&amp;gt;       #main,&amp;amp;quot;up;goto &amp;amp;quot;;px+10;&amp;amp;quot; &amp;amp;quot;;py+10;&amp;amp;quot;;down;backcolor white;color white&amp;amp;quot;&amp;lt;br/&amp;gt;       #main,&amp;amp;quot;circlefilled 6&amp;amp;quot;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;       py=py+20&amp;lt;br/&amp;gt;       #main,&amp;amp;quot;up;goto &amp;amp;quot;;px+10;&amp;amp;quot; &amp;amp;quot;;py+10;&amp;amp;quot;;down;backcolor brown;color brown&amp;amp;quot;&amp;lt;br/&amp;gt;       #main,&amp;amp;quot;circlefilled 6&amp;amp;quot;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;       ar=ar+1&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;       end if&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;       case rht$&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;       if pxy$(ar,ac+1)&amp;amp;lt;&amp;amp;gt;&amp;amp;quot;B&amp;amp;quot; then &#039;if next location is not a wall/border then move player&amp;lt;br/&amp;gt;        #main,&amp;amp;quot;up;goto &amp;amp;quot;;px+10;&amp;amp;quot; &amp;amp;quot;;py+10;&amp;amp;quot;;down;backcolor white;color white&amp;amp;quot;&amp;lt;br/&amp;gt;       #main,&amp;amp;quot;circlefilled 6&amp;amp;quot;&amp;lt;br/&amp;gt;       px=px+20&amp;lt;br/&amp;gt;        #main,&amp;amp;quot;up;goto &amp;amp;quot;;px+10;&amp;amp;quot; &amp;amp;quot;;py+10;&amp;amp;quot;;down;backcolor brown;color brown&amp;amp;quot;&amp;lt;br/&amp;gt;       #main,&amp;amp;quot;circlefilled 6&amp;amp;quot;&amp;lt;br/&amp;gt;       ac=ac+1&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;       end if&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;      case lft$&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;       if pxy$(ar,ac-1)&amp;amp;lt;&amp;amp;gt;&amp;amp;quot;B&amp;amp;quot; then &#039;if next location is not a wall/border then move player&amp;lt;br/&amp;gt;        #main,&amp;amp;quot;up;goto &amp;amp;quot;;px+10;&amp;amp;quot; &amp;amp;quot;;py+10;&amp;amp;quot;;down;backcolor white;color white&amp;amp;quot;&amp;lt;br/&amp;gt;       #main,&amp;amp;quot;circlefilled 6&amp;amp;quot;&amp;lt;br/&amp;gt;       px=px-20&amp;lt;br/&amp;gt;        #main,&amp;amp;quot;up;goto &amp;amp;quot;;px+10;&amp;amp;quot; &amp;amp;quot;;py+10;&amp;amp;quot;;down;backcolor brown;color brown&amp;amp;quot;&amp;lt;br/&amp;gt;       #main,&amp;amp;quot;circlefilled 6&amp;amp;quot;&amp;lt;br/&amp;gt;       ac=ac-1&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;       end if&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;      case up$&amp;lt;br/&amp;gt;       if pxy$(ar-1,ac)&amp;amp;lt;&amp;amp;gt;&amp;amp;quot;B&amp;amp;quot; then &#039;if next location is not a wall/border then move player&amp;lt;br/&amp;gt;        #main,&amp;amp;quot;up;goto &amp;amp;quot;;px+10;&amp;amp;quot; &amp;amp;quot;;py+10;&amp;amp;quot;;down;backcolor white;color white&amp;amp;quot;&amp;lt;br/&amp;gt;       #main,&amp;amp;quot;circlefilled 6&amp;amp;quot;&amp;lt;br/&amp;gt;       py=py-20&amp;lt;br/&amp;gt;        #main,&amp;amp;quot;up;goto &amp;amp;quot;;px+10;&amp;amp;quot; &amp;amp;quot;;py+10;&amp;amp;quot;;down;backcolor brown;color brown&amp;amp;quot;&amp;lt;br/&amp;gt;       #main,&amp;amp;quot;circlefilled 6&amp;amp;quot;&amp;lt;br/&amp;gt;       ar=ar-1&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;       end if&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;       end select&amp;lt;br/&amp;gt;       #main,&amp;amp;quot;flush&amp;amp;quot;&amp;lt;br/&amp;gt;       #main,&amp;amp;quot;segment n&amp;amp;quot;&amp;lt;br/&amp;gt;       #main,&amp;amp;quot;delsegment &amp;amp;quot;;n-2&amp;lt;br/&amp;gt;      if pxy$(ar,ac)=&amp;amp;quot;e&amp;amp;quot; then&amp;lt;br/&amp;gt;      notice &amp;amp;quot;You escaped the maze!&amp;amp;quot;&amp;lt;br/&amp;gt;      end if&amp;lt;br/&amp;gt;   goto [main.inputLoop]&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;  &#039;maze data&amp;lt;br/&amp;gt;    data  B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B&amp;lt;br/&amp;gt;    data  B,s,B,x,x,x,B,x,B,x,x,x,x,x,B,x,x,x,x,x,x,B&amp;lt;br/&amp;gt;    data  B,x,B,x,B,x,B,x,B,x,B,B,B,x,B,x,B,x,B,B,B,B&amp;lt;br/&amp;gt;    data  B,x,B,x,B,x,B,x,B,x,B,x,B,x,B,x,B,x,B,x,x,e&amp;lt;br/&amp;gt;    data  B,x,x,x,B,x,B,x,x,x,B,x,B,x,B,x,B,x,B,x,B,B&amp;lt;br/&amp;gt;    data  B,x,B,x,B,x,B,x,B,x,B,x,B,x,x,x,B,x,B,x,x,B&amp;lt;br/&amp;gt;    data  B,x,B,x,B,x,x,x,B,x,B,x,B,B,B,B,B,x,B,B,x,B&amp;lt;br/&amp;gt;    data  B,x,B,x,B,x,B,B,B,x,B,x,x,B,x,x,x,x,B,B,x,B&amp;lt;br/&amp;gt;    data  B,x,B,x,B,B,B,x,B,x,B,B,x,B,x,B,B,B,B,x,x,B&amp;lt;br/&amp;gt;    data  B,x,B,x,x,x,x,x,B,x,B,x,x,x,x,B,x,x,x,B,x,B&amp;lt;br/&amp;gt;    data  B,x,B,B,B,x,B,x,B,x,B,x,B,B,B,B,x,B,B,B,x,B&amp;lt;br/&amp;gt;    data  B,x,x,x,x,x,B,x,x,x,B,x,x,x,x,x,x,B,x,B,x,B&amp;lt;br/&amp;gt;    data  B,x,B,x,B,x,B,B,x,B,B,B,B,B,B,B,B,B,x,B,x,B&amp;lt;br/&amp;gt;    data  B,x,B,x,B,x,B,x,x,B,x,B,x,x,x,x,B,x,x,B,x,B&amp;lt;br/&amp;gt;    data  B,x,B,x,B,x,B,B,x,B,x,B,x,B,B,x,B,x,B,x,x,B&amp;lt;br/&amp;gt;    data  B,x,B,x,B,x,x,x,x,B,x,x,x,x,B,x,B,x,B,x,B,B&amp;lt;br/&amp;gt;    data  B,x,B,x,B,B,B,B,B,B,x,B,B,x,B,x,B,x,B,x,B,B&amp;lt;br/&amp;gt;    data  B,x,B,x,x,x,B,x,x,x,x,x,B,x,B,x,x,x,B,x,x,B&amp;lt;br/&amp;gt;    data  B,x,B,B,B,B,B,B,B,B,B,x,B,x,B,B,B,B,B,B,x,B&amp;lt;br/&amp;gt;    data  B,x,B,x,x,x,B,x,x,x,B,x,B,x,x,x,B,x,x,x,x,B&amp;lt;br/&amp;gt;    data  B,x,x,x,B,x,x,x,B,x,x,x,B,x,B,x,x,x,B,x,B,B&amp;lt;br/&amp;gt;    data  B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B&amp;lt;br/&amp;gt;&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.lb  {font-family:monospace;}
.lb .imp {font-weight: bold; color: red;}
.lb .kw1 {color: #0000FF;}
.lb .kw2 {color: #AD0080;}
.lb .kw3 {color: #008080;}
.lb .co1 {color: #666666; font-style: italic;}
.lb .coMULTI {color: #666666; font-style: italic;}
.lb .es0 {color: #000099; font-weight: bold;}
.lb .br0 {color: #009900;}
.lb .sy1 {color: #339933;}
.lb .st0 {color: #008000;}
.lb .nu0 {color: #FF0000;}
.lb .me0 {color: #004000;}
.lb span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;lb&quot;&gt; &lt;span class=&quot;co1&quot;&gt;&#039;basic 2d game level wall/border example&lt;/span&gt;
  &lt;span class=&quot;co1&quot;&gt;&#039;using native graphic commands&lt;/span&gt;
  &lt;span class=&quot;co1&quot;&gt;&#039;programmed by Ben Jimenez&lt;/span&gt;
  &lt;span class=&quot;co1&quot;&gt;&#039;use your arrow keys to move the player&lt;/span&gt;
  &lt;span class=&quot;co1&quot;&gt;&#039;July 20,2011&lt;/span&gt;
  &lt;span class=&quot;co1&quot;&gt;&#039;upadted Oct 15,2011&lt;/span&gt;
&amp;nbsp;
&amp;nbsp;
    &lt;span class=&quot;kw1&quot;&gt;nomainwin&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;kw3&quot;&gt;WindowWidth&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;470&lt;/span&gt;
    &lt;span class=&quot;kw3&quot;&gt;WindowHeight&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;500&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;kw1&quot;&gt;open&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Border/Wall Example&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;for&lt;/span&gt; graphics_nsb_nf &lt;span class=&quot;kw1&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;main
    &lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;main&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;fill white; flush&amp;quot;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;main&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;font ms_sans_serif 0 16&amp;quot;&lt;/span&gt;
    &lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;main&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;up;goto 20 30;size 3;down&amp;quot;&lt;/span&gt;
&amp;nbsp;
   &lt;span class=&quot;kw1&quot;&gt;dim&lt;/span&gt; pxy$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;22&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;22&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
    up$&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;chr$&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;_VK_UP&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    lft$&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;chr$&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;_VK_LEFT&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    rht$&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;chr$&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;_VK_RIGHT&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    dwn$&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;chr$&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;_VK_DOWN&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
    &lt;span class=&quot;co1&quot;&gt;&#039;start postion of first wall piece&lt;/span&gt;
    x&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;10&lt;/span&gt;
    y&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;20&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;co1&quot;&gt;&#039;draw border walls&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;for&lt;/span&gt; r&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;to&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;22&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;&#039;first row&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;for&lt;/span&gt; c&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;to&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;22&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;&#039;current row column loop&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;read&lt;/span&gt; d$
        pxy$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;r&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;c&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;d$
        &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; d$&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;B&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;  &lt;span class=&quot;co1&quot;&gt;&#039;if border piece then draw it&lt;/span&gt;
            &lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;main&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;up;goto &amp;quot;&lt;/span&gt;;x&lt;span class=&quot;sy0&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;20&lt;/span&gt;;&lt;span class=&quot;st0&quot;&gt;&amp;quot; &amp;quot;&lt;/span&gt;;y&lt;span class=&quot;sy0&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;20&lt;/span&gt;;&lt;span class=&quot;st0&quot;&gt;&amp;quot;;down;backcolor blue;color blue&amp;quot;&lt;/span&gt;
            &lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;main&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;boxfilled &amp;quot;&lt;/span&gt;;x;&lt;span class=&quot;st0&quot;&gt;&amp;quot; &amp;quot;&lt;/span&gt;;y
&amp;nbsp;
        &lt;span class=&quot;kw1&quot;&gt;end&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt;
&amp;nbsp;
        &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; d$&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;s&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;  &lt;span class=&quot;co1&quot;&gt;&#039;save player start position&lt;/span&gt;
            px&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;x &lt;span class=&quot;co1&quot;&gt;&#039;set current pen x position to player start x&lt;/span&gt;
            py&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;y  &lt;span class=&quot;co1&quot;&gt;&#039; set current pen y position to player start y&lt;/span&gt;
            ar&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;r  &lt;span class=&quot;co1&quot;&gt;&#039;remember current row location&lt;/span&gt;
            ac&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;c &lt;span class=&quot;co1&quot;&gt;&#039;remember current column locaton&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;end&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt;
&amp;nbsp;
        x&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;20&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;&#039;increase column x location by 20&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;next&lt;/span&gt; c
        x&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;10&lt;/span&gt;
        y&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;y&lt;span class=&quot;sy0&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;20&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;&#039;increase row y location by 20&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;next&lt;/span&gt; r
&amp;nbsp;
    &lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;main&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;flush&amp;quot;&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;&#039;save drawn board as segment&lt;/span&gt;
&amp;nbsp;
&amp;nbsp;
       &lt;span class=&quot;co1&quot;&gt;&#039;draw player&lt;/span&gt;
       &lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;main&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;up;goto &amp;quot;&lt;/span&gt;;px&lt;span class=&quot;sy0&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;10&lt;/span&gt;;&lt;span class=&quot;st0&quot;&gt;&amp;quot; &amp;quot;&lt;/span&gt;;py&lt;span class=&quot;sy0&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;10&lt;/span&gt;;&lt;span class=&quot;st0&quot;&gt;&amp;quot;;down;backcolor brown;color brown&amp;quot;&lt;/span&gt;
       &lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;main&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;circlefilled 6&amp;quot;&lt;/span&gt;
&amp;nbsp;
   &lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;main&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;when characterInput [checkkey]&amp;quot;&lt;/span&gt;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;main.inputLoop&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;   &lt;span class=&quot;co1&quot;&gt;&#039;wait here for input event&lt;/span&gt;
&lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;main&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;setfocus&amp;quot;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;wait&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;checkkey&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;
&amp;nbsp;
&amp;nbsp;
 key$ &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;left$&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw3&quot;&gt;Inkey$&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
   &lt;span class=&quot;kw1&quot;&gt;select&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;case&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;right$&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;key$&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
   &lt;span class=&quot;co1&quot;&gt;&#039;if wall/boarder found for next movement then no movement will be done.&lt;/span&gt;
&amp;nbsp;
      &lt;span class=&quot;kw1&quot;&gt;case&lt;/span&gt; dwn$ &lt;span class=&quot;co1&quot;&gt;&#039;down&lt;/span&gt;
&amp;nbsp;
&amp;nbsp;
       &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; pxy$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;ar&lt;span class=&quot;sy0&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;ac&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;&amp;lt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;B&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;&#039;if next location is not a wall/border then move player&lt;/span&gt;
       &lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;main&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;up;goto &amp;quot;&lt;/span&gt;;px&lt;span class=&quot;sy0&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;10&lt;/span&gt;;&lt;span class=&quot;st0&quot;&gt;&amp;quot; &amp;quot;&lt;/span&gt;;py&lt;span class=&quot;sy0&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;10&lt;/span&gt;;&lt;span class=&quot;st0&quot;&gt;&amp;quot;;down;backcolor white;color white&amp;quot;&lt;/span&gt;
       &lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;main&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;circlefilled 6&amp;quot;&lt;/span&gt;
&amp;nbsp;
       py&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;py&lt;span class=&quot;sy0&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;20&lt;/span&gt;
       &lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;main&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;up;goto &amp;quot;&lt;/span&gt;;px&lt;span class=&quot;sy0&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;10&lt;/span&gt;;&lt;span class=&quot;st0&quot;&gt;&amp;quot; &amp;quot;&lt;/span&gt;;py&lt;span class=&quot;sy0&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;10&lt;/span&gt;;&lt;span class=&quot;st0&quot;&gt;&amp;quot;;down;backcolor brown;color brown&amp;quot;&lt;/span&gt;
       &lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;main&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;circlefilled 6&amp;quot;&lt;/span&gt;
&amp;nbsp;
       ar&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;ar&lt;span class=&quot;sy0&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;
&amp;nbsp;
       &lt;span class=&quot;kw1&quot;&gt;end&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt;
&amp;nbsp;
       &lt;span class=&quot;kw1&quot;&gt;case&lt;/span&gt; rht$
&amp;nbsp;
&amp;nbsp;
       &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; pxy$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;ar&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;ac&lt;span class=&quot;sy0&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;&amp;lt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;B&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;&#039;if next location is not a wall/border then move player&lt;/span&gt;
        &lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;main&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;up;goto &amp;quot;&lt;/span&gt;;px&lt;span class=&quot;sy0&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;10&lt;/span&gt;;&lt;span class=&quot;st0&quot;&gt;&amp;quot; &amp;quot;&lt;/span&gt;;py&lt;span class=&quot;sy0&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;10&lt;/span&gt;;&lt;span class=&quot;st0&quot;&gt;&amp;quot;;down;backcolor white;color white&amp;quot;&lt;/span&gt;
       &lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;main&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;circlefilled 6&amp;quot;&lt;/span&gt;
       px&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;px&lt;span class=&quot;sy0&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;20&lt;/span&gt;
        &lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;main&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;up;goto &amp;quot;&lt;/span&gt;;px&lt;span class=&quot;sy0&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;10&lt;/span&gt;;&lt;span class=&quot;st0&quot;&gt;&amp;quot; &amp;quot;&lt;/span&gt;;py&lt;span class=&quot;sy0&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;10&lt;/span&gt;;&lt;span class=&quot;st0&quot;&gt;&amp;quot;;down;backcolor brown;color brown&amp;quot;&lt;/span&gt;
       &lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;main&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;circlefilled 6&amp;quot;&lt;/span&gt;
       ac&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;ac&lt;span class=&quot;sy0&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;
&amp;nbsp;
       &lt;span class=&quot;kw1&quot;&gt;end&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
      &lt;span class=&quot;kw1&quot;&gt;case&lt;/span&gt; lft$
&amp;nbsp;
&amp;nbsp;
       &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; pxy$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;ar&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;ac&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;&amp;lt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;B&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;&#039;if next location is not a wall/border then move player&lt;/span&gt;
        &lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;main&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;up;goto &amp;quot;&lt;/span&gt;;px&lt;span class=&quot;sy0&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;10&lt;/span&gt;;&lt;span class=&quot;st0&quot;&gt;&amp;quot; &amp;quot;&lt;/span&gt;;py&lt;span class=&quot;sy0&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;10&lt;/span&gt;;&lt;span class=&quot;st0&quot;&gt;&amp;quot;;down;backcolor white;color white&amp;quot;&lt;/span&gt;
       &lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;main&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;circlefilled 6&amp;quot;&lt;/span&gt;
       px&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;px&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;20&lt;/span&gt;
        &lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;main&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;up;goto &amp;quot;&lt;/span&gt;;px&lt;span class=&quot;sy0&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;10&lt;/span&gt;;&lt;span class=&quot;st0&quot;&gt;&amp;quot; &amp;quot;&lt;/span&gt;;py&lt;span class=&quot;sy0&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;10&lt;/span&gt;;&lt;span class=&quot;st0&quot;&gt;&amp;quot;;down;backcolor brown;color brown&amp;quot;&lt;/span&gt;
       &lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;main&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;circlefilled 6&amp;quot;&lt;/span&gt;
       ac&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;ac&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;
&amp;nbsp;
       &lt;span class=&quot;kw1&quot;&gt;end&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt;
&amp;nbsp;
&amp;nbsp;
      &lt;span class=&quot;kw1&quot;&gt;case&lt;/span&gt; up$
       &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; pxy$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;ar&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;ac&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;&amp;lt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;B&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;&#039;if next location is not a wall/border then move player&lt;/span&gt;
        &lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;main&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;up;goto &amp;quot;&lt;/span&gt;;px&lt;span class=&quot;sy0&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;10&lt;/span&gt;;&lt;span class=&quot;st0&quot;&gt;&amp;quot; &amp;quot;&lt;/span&gt;;py&lt;span class=&quot;sy0&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;10&lt;/span&gt;;&lt;span class=&quot;st0&quot;&gt;&amp;quot;;down;backcolor white;color white&amp;quot;&lt;/span&gt;
       &lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;main&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;circlefilled 6&amp;quot;&lt;/span&gt;
       py&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;py&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;20&lt;/span&gt;
        &lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;main&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;up;goto &amp;quot;&lt;/span&gt;;px&lt;span class=&quot;sy0&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;10&lt;/span&gt;;&lt;span class=&quot;st0&quot;&gt;&amp;quot; &amp;quot;&lt;/span&gt;;py&lt;span class=&quot;sy0&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;10&lt;/span&gt;;&lt;span class=&quot;st0&quot;&gt;&amp;quot;;down;backcolor brown;color brown&amp;quot;&lt;/span&gt;
       &lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;main&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;circlefilled 6&amp;quot;&lt;/span&gt;
       ar&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;ar&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;
&amp;nbsp;
       &lt;span class=&quot;kw1&quot;&gt;end&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt;
&amp;nbsp;
&amp;nbsp;
       &lt;span class=&quot;kw1&quot;&gt;end&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;select&lt;/span&gt;
       &lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;main&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;flush&amp;quot;&lt;/span&gt;
       &lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;main&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;segment n&amp;quot;&lt;/span&gt;
       &lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;main&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;delsegment &amp;quot;&lt;/span&gt;;n&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;
      &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; pxy$&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;ar&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;ac&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;e&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
      &lt;span class=&quot;kw1&quot;&gt;notice&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;You escaped the maze!&amp;quot;&lt;/span&gt;
      &lt;span class=&quot;kw1&quot;&gt;end&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt;
   &lt;span class=&quot;kw1&quot;&gt;goto&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;main.inputLoop&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
  &lt;span class=&quot;co1&quot;&gt;&#039;maze data&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;data&lt;/span&gt;  B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B
    &lt;span class=&quot;kw1&quot;&gt;data&lt;/span&gt;  B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;s&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B
    &lt;span class=&quot;kw1&quot;&gt;data&lt;/span&gt;  B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B
    &lt;span class=&quot;kw1&quot;&gt;data&lt;/span&gt;  B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;e
    &lt;span class=&quot;kw1&quot;&gt;data&lt;/span&gt;  B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B
    &lt;span class=&quot;kw1&quot;&gt;data&lt;/span&gt;  B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B
    &lt;span class=&quot;kw1&quot;&gt;data&lt;/span&gt;  B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B
    &lt;span class=&quot;kw1&quot;&gt;data&lt;/span&gt;  B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B
    &lt;span class=&quot;kw1&quot;&gt;data&lt;/span&gt;  B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B
    &lt;span class=&quot;kw1&quot;&gt;data&lt;/span&gt;  B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B
    &lt;span class=&quot;kw1&quot;&gt;data&lt;/span&gt;  B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B
    &lt;span class=&quot;kw1&quot;&gt;data&lt;/span&gt;  B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B
    &lt;span class=&quot;kw1&quot;&gt;data&lt;/span&gt;  B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B
    &lt;span class=&quot;kw1&quot;&gt;data&lt;/span&gt;  B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B
    &lt;span class=&quot;kw1&quot;&gt;data&lt;/span&gt;  B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B
    &lt;span class=&quot;kw1&quot;&gt;data&lt;/span&gt;  B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B
    &lt;span class=&quot;kw1&quot;&gt;data&lt;/span&gt;  B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B
    &lt;span class=&quot;kw1&quot;&gt;data&lt;/span&gt;  B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B
    &lt;span class=&quot;kw1&quot;&gt;data&lt;/span&gt;  B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B
    &lt;span class=&quot;kw1&quot;&gt;data&lt;/span&gt;  B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B
    &lt;span class=&quot;kw1&quot;&gt;data&lt;/span&gt;  B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;x&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B
    &lt;span class=&quot;kw1&quot;&gt;data&lt;/span&gt;  B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;B
&amp;nbsp;&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:0 --&gt;</description>
          </item>
    <item>
      <title>2drock.jpg</title>
      <link>https://basic.wikispaces.com/file/detail/2drock.jpg</link>
      <dc:creator>benjamin805</dc:creator>
      <guid isPermaLink="true">https://basic.wikispaces.com/file/detail/2drock.jpg</guid>
      <comments>https://basic.wikispaces.com/file/messages/2drock.jpg</comments>
      <pubDate>Sat, 05 Jan 2013 21:55:33 GMT</pubDate>
      <description></description>
              <enclosure url="https://basic.wikispaces.com/file/view/2drock.jpg"
        length="13246"
        type="image/jpeg"
        ></enclosure>
          </item>
    <item>
      <title>A Structured Program and Plot</title>
      <link>https://basic.wikispaces.com/A+Structured+Program+and+Plot</link>
      <dc:creator>GeorgeW22</dc:creator>
      <guid isPermaLink="true">https://basic.wikispaces.com/A+Structured+Program+and+Plot</guid>
      <comments>https://basic.wikispaces.com/page/messages/A+Structured+Program+and+Plot</comments>
      <pubDate>Fri, 03 Jun 2011 21:14:44 GMT</pubDate>
      <description>Program SP02 will plot a structure from data on the input file. In this case the data corresponds to SP02 itself, and SP02 plots its own structure. Then, as it says in the examination, compare and contrast program and structure plot.&lt;br /&gt;
&lt;br /&gt;
The aim is to test the water, and see if there is any interest in this method of programming.&lt;br /&gt;
&lt;br /&gt;
If there is no interest, then it will serve as a memorial to a dated method of coding.&lt;br /&gt;
&lt;br /&gt;
The attached 16KB zipped file contains LB program SP02, and the text data file.&lt;br /&gt;
&lt;br /&gt;
After separating program and data, alter the file path at the beginning of SP02 to show where the data is held, but leave the line PROG.NAME$=&amp;quot;SP02&amp;quot; unchanged.&lt;br /&gt;
&lt;br /&gt;
The 10 page structure plot is printed on an EPSOM SX105 inkjet printer, or equivalent. i.e. 360DPI x 360DPI &amp;amp; area 2892 x 4125 pixels.&lt;br /&gt;
&lt;br /&gt;
&lt;!-- ws:start:WikiTextFileRule:1:&amp;lt;img src=&amp;quot;https://www.wikispaces.com/site/embedthumbnail/file/STRUCTURED.PROGRAM.rar?h=52&amp;amp;w=320&amp;quot; class=&amp;quot;WikiFile&amp;quot; id=&amp;quot;wikitext@@file@@STRUCTURED.PROGRAM.rar&amp;quot; title=&amp;quot;File: STRUCTURED.PROGRAM.rar&amp;quot; width=&amp;quot;320&amp;quot; height=&amp;quot;52&amp;quot; /&amp;gt; --&gt;&lt;div class=&quot;objectEmbed&quot;&gt;&lt;a href=&quot;/file/view/STRUCTURED.PROGRAM.rar/234136736/STRUCTURED.PROGRAM.rar&quot; onclick=&quot;ws.common.trackFileLink(&#039;/file/view/STRUCTURED.PROGRAM.rar/234136736/STRUCTURED.PROGRAM.rar&#039;);&quot;&gt;&lt;img src=&quot;https://ssl.wikicdn.com/i/mime/32/application/x-rar.png&quot; height=&quot;32&quot; width=&quot;32&quot; alt=&quot;STRUCTURED.PROGRAM.rar&quot; /&gt;&lt;/a&gt;&lt;div&gt;&lt;a href=&quot;/file/view/STRUCTURED.PROGRAM.rar/234136736/STRUCTURED.PROGRAM.rar&quot; onclick=&quot;ws.common.trackFileLink(&#039;/file/view/STRUCTURED.PROGRAM.rar/234136736/STRUCTURED.PROGRAM.rar&#039;);&quot; class=&quot;filename&quot; title=&quot;STRUCTURED.PROGRAM.rar&quot;&gt;STRUCTURED.PROGRAM.rar&lt;/a&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;/file/detail/STRUCTURED.PROGRAM.rar&quot;&gt;Details&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;/file/view/STRUCTURED.PROGRAM.rar/234136736/STRUCTURED.PROGRAM.rar&quot;&gt;Download&lt;/a&gt;&lt;/li&gt;&lt;li style=&quot;color: #666&quot;&gt;14 KB&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;!-- ws:end:WikiTextFileRule:1 --&gt;&lt;!-- ws:start:WikiTextAnchorRule:0:&amp;lt;img src=&amp;quot;/i/anchor.gif&amp;quot; class=&amp;quot;WikiAnchor&amp;quot; alt=&amp;quot;Anchor&amp;quot; id=&amp;quot;wikitext@@anchor@@Utilities&amp;quot; title=&amp;quot;Anchor: Utilities&amp;quot;/&amp;gt; --&gt;&lt;a name=&quot;Utilities&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextAnchorRule:0 --&gt;</description>
          </item>
    <item>
      <title>A8thrustcurve.JPG</title>
      <link>https://basic.wikispaces.com/file/detail/A8thrustcurve.JPG</link>
      <dc:creator>cogburn</dc:creator>
      <guid isPermaLink="true">https://basic.wikispaces.com/file/detail/A8thrustcurve.JPG</guid>
      <comments>https://basic.wikispaces.com/file/messages/A8thrustcurve.JPG</comments>
      <pubDate>Thu, 24 May 2012 14:55:33 GMT</pubDate>
      <description></description>
              <enclosure url="https://basic.wikispaces.com/file/view/A8thrustcurve.JPG"
        length="413037"
        type="image/jpeg"
        ></enclosure>
          </item>
    <item>
      <title>A8_published_thrustcurve.jpg</title>
      <link>https://basic.wikispaces.com/file/detail/A8_published_thrustcurve.jpg</link>
      <dc:creator>cogburn</dc:creator>
      <guid isPermaLink="true">https://basic.wikispaces.com/file/detail/A8_published_thrustcurve.jpg</guid>
      <comments>https://basic.wikispaces.com/file/messages/A8_published_thrustcurve.jpg</comments>
      <pubDate>Thu, 24 May 2012 15:22:15 GMT</pubDate>
      <description></description>
              <enclosure url="https://basic.wikispaces.com/file/view/A8_published_thrustcurve.jpg"
        length="36397"
        type="image/jpeg"
        ></enclosure>
          </item>
    <item>
      <title>abcapi.zip</title>
      <link>https://basic.wikispaces.com/file/detail/abcapi.zip</link>
      <dc:creator>Alyce</dc:creator>
      <guid isPermaLink="true">https://basic.wikispaces.com/file/detail/abcapi.zip</guid>
      <comments>https://basic.wikispaces.com/file/messages/abcapi.zip</comments>
      <pubDate>Tue, 04 Dec 2007 15:51:57 GMT</pubDate>
      <description></description>
              <enclosure url="https://basic.wikispaces.com/file/view/abcapi.zip"
        length="13105"
        type="application/x-zip-compressed"
        ></enclosure>
          </item>
    <item>
      <title>AboutWiki</title>
      <link>https://basic.wikispaces.com/AboutWiki</link>
      <dc:creator>lbjoseph</dc:creator>
      <guid isPermaLink="true">https://basic.wikispaces.com/AboutWiki</guid>
      <comments>https://basic.wikispaces.com/page/messages/AboutWiki</comments>
      <pubDate>Sat, 02 Jul 2011 21:53:54 GMT</pubDate>
      <description>&lt;span style=&quot;font-size: 18px; line-height: 27px;&quot;&gt;&lt;strong&gt;About Liberty BASIC&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
&lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://www.libertybasic.com/&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;Liberty BASIC Home Page&lt;/a&gt;&lt;br /&gt;
&lt;a class=&quot;wiki_link&quot; href=&quot;/libertyinfo&quot;&gt;Learn more about Liberty BASIC.&lt;/a&gt;&lt;br /&gt;
&lt;a class=&quot;wiki_link&quot; href=&quot;/Using%20the%20Wiki.&quot;&gt;How to use this wiki.&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:0:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc0&quot;&gt;&lt;a name=&quot;About this Site&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:0 --&gt;About this Site&lt;/h1&gt;
 This Wiki site was created and is managed by the moderators of the &lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://libertybasic.conforums.com/&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;Liberty BASIC Community Forum&lt;/a&gt; to provide a place for Liberty BASIC programmers to meet, support one another, exchange ideas and share the wealth of knowledge that exists. Join us and help form a community! Everybody can read the content on the site, but it can be edited only by members.&lt;br /&gt;
&lt;br /&gt;
Public pages can be edited by all members. We ask that members refrain from changing the member pages of other members. Instead, use the &lt;em&gt;discussion&lt;/em&gt; feature to comment, suggest changes, etc. Please leave the main page editing to the organizers. Thanks!&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #ff0000;&quot;&gt;For general discussion register at the &lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://libertybasic.conforums.com/&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;Liberty BASIC Community Forum&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
License for this site: &lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://creativecommons.org/licenses/by-sa/2.5/&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;Creative Commons License 2.5&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:2:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc1&quot;&gt;&lt;a name=&quot;Joining&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:2 --&gt;Joining&lt;/h1&gt;
 If you&#039;d like to join the site, click the &lt;em&gt;&amp;quot;Join this space&amp;quot;&lt;/em&gt; link on the left navigation bar, or click &lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://basic.wikispaces.com/space/join&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;HERE&lt;/a&gt;. One of the organizers will need to approve your application, and then you&#039;re good to go! You&#039;ll need to create a username. Please consider using a name, rather than a nickname. See &lt;a class=&quot;wiki_link_ext&quot; href=&quot;http://www.usemod.com/cgi-bin/mb.pl?UseRealNames&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;Using Real Names on Wikis&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Once you&#039;ve joined, feel free to create a page for yourself and add it to the Member Pages list. Use your page to act as a launch pad for all of your other pages on the site. Feel free to create pages to share code, write tips and information, tell us about yourself, and have fun!&lt;br /&gt;
&lt;br /&gt;
&lt;!-- ws:start:WikiTextHeadingRule:4:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc2&quot;&gt;&lt;a name=&quot;What is a Wiki?&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:4 --&gt;What is a Wiki?&lt;/h1&gt;
 Have a look at the &lt;a class=&quot;wiki_link&quot; href=&quot;https://www.wikispaces.com/home&quot;&gt;WikiSpaces&lt;/a&gt; home page to learn about Wikis. A Wiki is a site that can be edited by all members. You can modify existing pages or create new ones. You can upload files and pictures. You can comment on pages by clicking the &lt;em&gt;discussion&lt;/em&gt; link at the top of any page.&lt;br /&gt;
&lt;br /&gt;
To learn how to use WikiText markup to edit site content, click &lt;a class=&quot;wiki_link&quot; href=&quot;https://www.wikispaces.com/wikitext&quot;&gt;HERE.&lt;/a&gt; You don&#039;t need to know WikiText, though. Just modify your settings so that you use the visual page editor! If you want to try some editing in a safe place where you can do no harm, play in the &lt;a class=&quot;wiki_link&quot; href=&quot;/Sandbox&quot;&gt;Sandbox&lt;/a&gt;. We also have a page to discuss &lt;a class=&quot;wiki_link&quot; href=&quot;/Using%20the%20Wiki.&quot;&gt;Using the Wiki.&lt;/a&gt;</description>
          </item>
    <item>
      <title>Accessing the Samples on Vista and above</title>
      <link>https://basic.wikispaces.com/Accessing+the+Samples+on+Vista+and+above</link>
      <dc:creator>StPendl</dc:creator>
      <guid isPermaLink="true">https://basic.wikispaces.com/Accessing+the+Samples+on+Vista+and+above</guid>
      <comments>https://basic.wikispaces.com/page/messages/Accessing+the+Samples+on+Vista+and+above</comments>
      <pubDate>Sat, 09 Jul 2011 09:15:24 GMT</pubDate>
      <description>&lt;!-- ws:start:WikiTextHeadingRule:0:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc0&quot;&gt;&lt;a name=&quot;This article is only valid for LB 4.04 and above&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:0 --&gt;This article is only valid for LB 4.04 and above&lt;/h1&gt;
&lt;br /&gt;
Some of you have already wondered how one would access the code samples shipping with LB on &lt;strong&gt;Vista and above&lt;/strong&gt;.&lt;br /&gt;
Below find a simple and effective solution.&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;Select &lt;strong&gt;Setup =&amp;gt; External Programs&lt;/strong&gt; from the editor menu bar&lt;/li&gt;&lt;li&gt;Hit the &lt;strong&gt;New&lt;/strong&gt; button&lt;/li&gt;&lt;li&gt;Enter &lt;strong&gt;Sample Programs&lt;/strong&gt; as the program name&lt;/li&gt;&lt;li&gt;Now enter &lt;strong&gt;explorer.exe /e,&amp;quot;$USERDATA&amp;quot;&lt;/strong&gt; as the program file name&lt;/li&gt;&lt;li&gt;Close the dialog&lt;/li&gt;&lt;li&gt;Accept the notice about the editor needing a restart&lt;/li&gt;&lt;li&gt;Restart the editor&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;
Now select &lt;strong&gt;Run =&amp;gt; Sample Programs&lt;/strong&gt; from the editor menu bar.&lt;br /&gt;
&lt;br /&gt;
You will be presented with an explorer window displaying the sample programs shipping with LB.&lt;br /&gt;
&lt;br /&gt;
This is a quick way to find all the samples, without the need to navigate through the folder structure of the hidden application data folder.</description>
          </item>
    <item>
      <title>Accessing the Source Code Backups on Vista and above</title>
      <link>https://basic.wikispaces.com/Accessing+the+Source+Code+Backups+on+Vista+and+above</link>
      <dc:creator>StPendl</dc:creator>
      <guid isPermaLink="true">https://basic.wikispaces.com/Accessing+the+Source+Code+Backups+on+Vista+and+above</guid>
      <comments>https://basic.wikispaces.com/page/messages/Accessing+the+Source+Code+Backups+on+Vista+and+above</comments>
      <pubDate>Sat, 09 Jul 2011 09:14:47 GMT</pubDate>
      <description>&lt;!-- ws:start:WikiTextHeadingRule:0:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc0&quot;&gt;&lt;a name=&quot;This article is only valid for LB 4.04 and above&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:0 --&gt;This article is only valid for LB 4.04 and above&lt;/h1&gt;
&lt;br /&gt;
Some of you have already wondered how one would access the code backups on &lt;strong&gt;Vista and above&lt;/strong&gt;.&lt;br /&gt;
Below find a simple and effective solution.&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;Select &lt;strong&gt;Setup =&amp;gt; External Programs&lt;/strong&gt; from the editor menu bar&lt;/li&gt;&lt;li&gt;Hit the &lt;strong&gt;New&lt;/strong&gt; button&lt;/li&gt;&lt;li&gt;Enter &lt;strong&gt;Source Code Backups&lt;/strong&gt; as the program name&lt;/li&gt;&lt;li&gt;Now enter &lt;strong&gt;explorer.exe /e,&amp;quot;$USERDATAbak&amp;quot;&lt;/strong&gt; as the program file name&lt;/li&gt;&lt;li&gt;Close the dialog&lt;/li&gt;&lt;li&gt;Accept the notice about the editor needing a restart&lt;/li&gt;&lt;li&gt;Restart the editor&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;
Now select &lt;strong&gt;Run =&amp;gt; Source Code Backups&lt;/strong&gt; from the editor menu bar.&lt;br /&gt;
&lt;br /&gt;
You will be presented with an explorer window displaying the backups created automatically by the editor if you run or debug a program.&lt;br /&gt;
&lt;br /&gt;
This is a quick way to find the last saved version of your last executed program, without the need to navigate through the folder structure of the hidden application data folder.</description>
          </item>
    <item>
      <title>AccurateText</title>
      <link>https://basic.wikispaces.com/AccurateText</link>
      <dc:creator>Alyce</dc:creator>
      <guid isPermaLink="true">https://basic.wikispaces.com/AccurateText</guid>
      <comments>https://basic.wikispaces.com/page/messages/AccurateText</comments>
      <pubDate>Sun, 22 Dec 2013 10:56:08 GMT</pubDate>
      <description>&lt;!-- ws:start:WikiTextHeadingRule:1:&amp;lt;h1&amp;gt; --&gt;&lt;h1 id=&quot;toc0&quot;&gt;&lt;a name=&quot;How To Accurately Position Text user:lbjoseph&quot;&gt;&lt;/a&gt;&lt;!-- ws:end:WikiTextHeadingRule:1 --&gt;How To Accurately Position Text &lt;span style=&quot;font-size: 13px; font-weight: normal; line-height: 19px;&quot;&gt;&lt;!-- ws:start:WikiTextUserlinkRule:01:[[user:lbjoseph]] --&gt;&lt;span class=&quot;membersnap&quot;&gt;- &lt;a class=&quot;userLink&quot; href=&quot;https://www.wikispaces.com/user/view/lbjoseph&quot; style=&quot;outline: none;&quot;&gt;&lt;img src=&quot;https://www.wikispaces.com/user/pic/lbjoseph-lg.jpg&quot; width=&quot;16&quot; height=&quot;16&quot; alt=&quot;lbjoseph&quot; class=&quot;userPicture&quot; /&gt;&lt;/a&gt; &lt;a class=&quot;userLink&quot; href=&quot;https://www.wikispaces.com/user/view/lbjoseph&quot; style=&quot;outline: none;&quot;&gt;lbjoseph&lt;/a&gt;&lt;/span&gt;&lt;!-- ws:end:WikiTextUserlinkRule:01 --&gt;&lt;/span&gt;&lt;/h1&gt;
 You might have noticed that Liberty BASIC doesn&#039;t do a very a good job positioning text where you specify in a graphics box. The following sample demonstrates a few simple API calls necessary to fix this behavior.&lt;br /&gt;
&lt;br /&gt;
&lt;!-- ws:start:WikiTextCodeRule:0:
&amp;lt;pre class=&amp;quot;lb&amp;quot;&amp;gt;WindowWidth = 300&amp;lt;br/&amp;gt;WindowHeight = 350&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;NoMainWin&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;Open &amp;amp;quot;Font Problems&amp;amp;quot; For Graphics_NF_NSB As #g&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;#g &amp;amp;quot;Down; Fill Blue; Flush&amp;amp;quot;&amp;lt;br/&amp;gt;#g &amp;amp;quot;Color Black; Backcolor White&amp;amp;quot;&amp;lt;br/&amp;gt;#g &amp;amp;quot;font arial 100&amp;amp;quot;&amp;lt;br/&amp;gt;dc = GetDC(hwnd(#g))&amp;lt;br/&amp;gt;CallDLL #gdi32, &amp;amp;quot;SetTextAlign&amp;amp;quot;, dc As uLong, 0 As uLong, Result As uLong&amp;lt;br/&amp;gt;#g &amp;amp;quot;Place 100 100&amp;amp;quot;&amp;lt;br/&amp;gt;#g &amp;amp;quot;|X&amp;amp;quot;&amp;lt;br/&amp;gt;#g &amp;amp;quot;posxy x y&amp;amp;quot;&amp;lt;br/&amp;gt;temp$ = &amp;amp;quot;X&amp;amp;quot;&amp;lt;br/&amp;gt;#g &amp;amp;quot;stringwidth? temp$ width&amp;amp;quot;&amp;lt;br/&amp;gt;fontRoughHeight = y-100&amp;lt;br/&amp;gt;#g &amp;amp;quot;color red; size 10; set &amp;amp;quot;;x;&amp;amp;quot; &amp;amp;quot;;y-fontRoughHeight&amp;lt;br/&amp;gt;#g &amp;amp;quot;color green; size 10; set &amp;amp;quot;;x;&amp;amp;quot; &amp;amp;quot;;y&amp;lt;br/&amp;gt;#g &amp;amp;quot;color yellow; size 10; set &amp;amp;quot;;x+width;&amp;amp;quot; &amp;amp;quot;;y&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;#g &amp;amp;quot;trapclose [quit]&amp;amp;quot;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;Call ReleaseDC hwnd(#g), dc&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;Wait&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;[quit]&amp;lt;br/&amp;gt;close #g&amp;lt;br/&amp;gt;End&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;Function GetDC(hWnd)&amp;lt;br/&amp;gt;    CallDLL #user32, &amp;amp;quot;GetDC&amp;amp;quot;,hWnd As uLong,GetDC As uLong&amp;lt;br/&amp;gt;End Function&amp;lt;br/&amp;gt;Sub ReleaseDC hWnd, hDC&amp;lt;br/&amp;gt;    CallDLL#user32,&amp;amp;quot;ReleaseDC&amp;amp;quot;,hWnd As uLong,hDC As uLong,result As Long&amp;lt;br/&amp;gt;End Sub&amp;lt;/pre&amp;gt;
 --&gt;
&lt;style type=&quot;text/css&quot;&gt;&lt;!--
/**
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 */
.lb  {font-family:monospace;}
.lb .imp {font-weight: bold; color: red;}
.lb .kw1 {color: #0000FF;}
.lb .kw2 {color: #AD0080;}
.lb .kw3 {color: #008080;}
.lb .co1 {color: #666666; font-style: italic;}
.lb .coMULTI {color: #666666; font-style: italic;}
.lb .es0 {color: #000099; font-weight: bold;}
.lb .br0 {color: #009900;}
.lb .sy1 {color: #339933;}
.lb .st0 {color: #008000;}
.lb .nu0 {color: #FF0000;}
.lb .me0 {color: #004000;}
.lb span.xtra { display:block; }

--&gt;
&lt;/style&gt;&lt;pre class=&quot;lb&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;WindowWidth&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;300&lt;/span&gt;
&lt;span class=&quot;kw3&quot;&gt;WindowHeight&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;350&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;NoMainWin&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;Open&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Font Problems&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;For&lt;/span&gt; Graphics_NF_NSB &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;g
&amp;nbsp;
&lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;g &lt;span class=&quot;st0&quot;&gt;&amp;quot;Down; Fill Blue; Flush&amp;quot;&lt;/span&gt;
&lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;g &lt;span class=&quot;st0&quot;&gt;&amp;quot;Color Black; Backcolor White&amp;quot;&lt;/span&gt;
&lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;g &lt;span class=&quot;st0&quot;&gt;&amp;quot;font arial 100&amp;quot;&lt;/span&gt;
dc &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; GetDC&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;hwnd&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;g&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;CallDLL&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;gdi32&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;SetTextAlign&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; dc &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;uLong&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;uLong&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; Result &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;uLong&lt;/span&gt;
&lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;g &lt;span class=&quot;st0&quot;&gt;&amp;quot;Place 100 100&amp;quot;&lt;/span&gt;
&lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;g &lt;span class=&quot;st0&quot;&gt;&amp;quot;|X&amp;quot;&lt;/span&gt;
&lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;g &lt;span class=&quot;st0&quot;&gt;&amp;quot;posxy x y&amp;quot;&lt;/span&gt;
temp$ &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;X&amp;quot;&lt;/span&gt;
&lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;g &lt;span class=&quot;st0&quot;&gt;&amp;quot;stringwidth? temp$ width&amp;quot;&lt;/span&gt;
fontRoughHeight &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; y&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;100&lt;/span&gt;
&lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;g &lt;span class=&quot;st0&quot;&gt;&amp;quot;color red; size 10; set &amp;quot;&lt;/span&gt;;x;&lt;span class=&quot;st0&quot;&gt;&amp;quot; &amp;quot;&lt;/span&gt;;y&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;fontRoughHeight
&lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;g &lt;span class=&quot;st0&quot;&gt;&amp;quot;color green; size 10; set &amp;quot;&lt;/span&gt;;x;&lt;span class=&quot;st0&quot;&gt;&amp;quot; &amp;quot;&lt;/span&gt;;y
&lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;g &lt;span class=&quot;st0&quot;&gt;&amp;quot;color yellow; size 10; set &amp;quot;&lt;/span&gt;;x&lt;span class=&quot;sy0&quot;&gt;+&lt;/span&gt;width;&lt;span class=&quot;st0&quot;&gt;&amp;quot; &amp;quot;&lt;/span&gt;;y
&amp;nbsp;
&lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;g &lt;span class=&quot;st0&quot;&gt;&amp;quot;trapclose [quit]&amp;quot;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;Call&lt;/span&gt; ReleaseDC &lt;span class=&quot;kw2&quot;&gt;hwnd&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;g&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; dc
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;Wait&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;quit&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;close&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;g
&lt;span class=&quot;kw1&quot;&gt;End&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;Function&lt;/span&gt; GetDC&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;hWnd&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;CallDLL&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;user32&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;GetDC&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;hWnd &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;uLong&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;GetDC &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;uLong&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;End&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Function&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;Sub&lt;/span&gt; ReleaseDC hWnd&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; hDC
    &lt;span class=&quot;kw1&quot;&gt;CallDLL&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;#&lt;/span&gt;user32&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;ReleaseDC&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;hWnd &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;uLong&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;hDC &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;uLong&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;result &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Long&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;End&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Sub&lt;/span&gt;&lt;/pre&gt;

&lt;!-- ws:end:WikiTextCodeRule:0 --&gt;&lt;br /&gt;
&lt;em&gt;Comment by Richard Russell:&lt;/em&gt;&lt;br /&gt;
If you change the text alignment like this it doesn&#039;t &#039;stick&#039;.  Add a &#039;flush&#039; command to the above code and then force the window to redraw by covering and uncovering it, or by minimizing and restoring it: the text will be redrawn in the default alignment!&lt;br /&gt;
&lt;br /&gt;
&lt;em&gt;response&lt;/em&gt;&lt;br /&gt;
No, it does not &lt;em&gt;stick.&lt;/em&gt; LB does not know about api calls used by the programmer. It redraws the native graphic commands it has received. To cause api graphics to &lt;em&gt;stick,&lt;/em&gt; one must do the &lt;strong&gt;getbmp-drawbmp-flush&lt;/strong&gt; procedure that we have recommended for 15 years. It is used in many example programs and documented in many articles and tutorials. You will find it in the help file topic &lt;em&gt;flushing sprite graphics&lt;/em&gt; as well. &lt;!-- ws:start:WikiTextUserlinkRule:02:[[user:Alyce]] --&gt;&lt;span class=&quot;membersnap&quot;&gt;- &lt;a class=&quot;userLink&quot; href=&quot;https://www.wikispaces.com/user/view/Alyce&quot; style=&quot;outline: none;&quot;&gt;&lt;img src=&quot;https://www.wikispaces.com/user/pic/Alyce-lg.jpg&quot; width=&quot;16&quot; height=&quot;16&quot; alt=&quot;Alyce&quot; class=&quot;userPicture&quot; /&gt;&lt;/a&gt; &lt;a class=&quot;userLink&quot; href=&quot;https://www.wikispaces.com/user/view/Alyce&quot; style=&quot;outline: none;&quot;&gt;Alyce&lt;/a&gt;&lt;/span&gt;&lt;!-- ws:end:WikiTextUserlinkRule:02 --&gt;</description>
          </item>
    <item>
      <title>aDcp_3978.jpg</title>
      <link>https://basic.wikispaces.com/file/detail/aDcp_3978.jpg</link>
      <dc:creator>tenochtitlanuk</dc:creator>
      <guid isPermaLink="true">https://basic.wikispaces.com/file/detail/aDcp_3978.jpg</guid>
      <comments>https://basic.wikispaces.com/file/messages/aDcp_3978.jpg</comments>
      <pubDate>Fri, 20 Jan 2006 21:54:16 GMT</pubDate>
      <description></description>
              <enclosure url="https://basic.wikispaces.com/file/view/aDcp_3978.jpg"
        length="29337"
        type="image/pjpeg"
        ></enclosure>
          </item>
    <item>
      <title>AI Dr Eliza</title>
      <link>https://basic.wikispaces.com/AI+Dr+Eliza</link>
      <dc:creator>bluatigro</dc:creator>
      <guid isPermaLink="true">https://basic.wikispaces.com/AI+Dr+Eliza</guid>
      <comments>https://basic.wikispaces.com/page/messages/AI+Dr+Eliza</comments>
      <pubDate>Sun, 04 Apr 2010 11:40:51 GMT</pubDate>
      <description>&#039;&#039;this stop when no answer is fount why ?&lt;br /&gt;
DIM a$( 20 ) , b$( 20 ) , zin$( 50 , 3 )&lt;br /&gt;
CLS&lt;br /&gt;
PRINT &amp;quot;Blua Tigro&amp;quot;&lt;br /&gt;
PRINT &amp;quot;presents :&amp;quot;&lt;br /&gt;
PRINT &amp;quot;Dr. Eliza .&amp;quot;&lt;br /&gt;
PRINT &amp;quot;A.I. simulation of a psychiatrist .&amp;quot;&lt;br /&gt;
print &amp;quot;[ type without .,!?;: ]&amp;quot;&lt;br /&gt;
maxwoord = 1&lt;br /&gt;
WHILE a$( maxwoord - 1 ) &amp;lt;&amp;gt; &amp;quot;=&amp;quot;&lt;br /&gt;
&#039;spiegeldata inlezen&lt;br /&gt;
&#039;&#039;read mirror data&lt;br /&gt;
READ a$ , b$&lt;br /&gt;
a$( maxwoord ) = a$&lt;br /&gt;
b$( maxwoord ) = b$&lt;br /&gt;
maxwoord = maxwoord + 1&lt;br /&gt;
WEND&lt;br /&gt;
maxzin = 1&lt;br /&gt;
WHILE zin$( maxzin - 1 , 0 ) &amp;lt;&amp;gt; &amp;quot;=&amp;quot;&lt;br /&gt;
&#039;sleutels en reactie zinnen inlezen&lt;br /&gt;
&#039;&#039;read keys and reaction&lt;br /&gt;
FOR t = 0 TO 3&lt;br /&gt;
READ z$&lt;br /&gt;
zin$( maxzin , t ) = z$&lt;br /&gt;
NEXT t&lt;br /&gt;
maxzin = maxzin + 1&lt;br /&gt;
WEND&lt;br /&gt;
zin$ = &amp;quot;qq&amp;quot;&lt;br /&gt;
PRINT &amp;quot;Dokter Eliza is there .&amp;quot;&lt;br /&gt;
while zin$ &amp;lt;&amp;gt; &amp;quot;&amp;quot;&lt;br /&gt;
INPUT zin$&lt;br /&gt;
z$ = zin$&lt;br /&gt;
a = 0&lt;br /&gt;
zin$ = Lower$( zin$ + &amp;quot; &amp;quot; )&lt;br /&gt;
FOR t = 1 TO maxzin - 1&lt;br /&gt;
&#039;alle sleutels langslopen&lt;br /&gt;
&#039;loop al keys&lt;br /&gt;
IF INSTR( zin$ , zin$( t, 0 ) ) &amp;lt;&amp;gt; 0 THEN&lt;br /&gt;
&#039;sleutel gevonden ?&lt;br /&gt;
&#039;key fount ?&lt;br /&gt;
antwoord$ = zin$( t , INT( RND * 2.99 + 1 ) )&lt;br /&gt;
a = t&lt;br /&gt;
END IF&lt;br /&gt;
NEXT t&lt;br /&gt;
IF a = 0 THEN&lt;br /&gt;
&#039;geen sleutel gevonden ?&lt;br /&gt;
&#039;no key fount ?&lt;br /&gt;
IF mijn$ = &amp;quot;&amp;quot; THEN&lt;br /&gt;
&#039;geen vorig bezit ?&lt;br /&gt;
&#039;no item stored ?&lt;br /&gt;
t = 1&lt;br /&gt;
while word$( zin , t ) &amp;lt;&amp;gt; &amp;quot;&amp;quot;&lt;br /&gt;
t = t + 1&lt;br /&gt;
wend&lt;br /&gt;
IF word$( zin$ , t - 1 ) = &amp;quot;mijn&amp;quot; THEN&lt;br /&gt;
&#039;bezit in zin ?&lt;br /&gt;
&#039;item in sentence ?&lt;br /&gt;
mijn$ = word$( zin$ , t ) &#039;sla bezit op&lt;br /&gt;
END IF&lt;br /&gt;
SELECT CASE INT(RND * 4)&lt;br /&gt;
&#039;reageer als niets is gevonden&lt;br /&gt;
&#039;react when nothing fount&lt;br /&gt;
CASE IS = 0&lt;br /&gt;
PRINT &amp;quot;can you tel me more ?&amp;quot;&lt;br /&gt;
CASE IS = 1&lt;br /&gt;
PRINT &amp;quot;that is verry intresting .&amp;quot;&lt;br /&gt;
CASE IS = 2&lt;br /&gt;
PRINT &amp;quot;plaese eleborate on that .&amp;quot;&lt;br /&gt;
CASE IS = 3&lt;br /&gt;
PRINT &amp;quot;that is not seldom .&amp;quot;&lt;br /&gt;
END SELECT&lt;br /&gt;
ELSE&lt;br /&gt;
&#039;reageer op laatste bezit en vergeet bezit&lt;br /&gt;
&#039;react on last item and forget last item&lt;br /&gt;
PRINT &amp;quot;Before you told me about your &amp;quot;; mijn$ ; &amp;quot; .&amp;quot;&lt;br /&gt;
PRINT &amp;quot;Can you tel me more about your &amp;quot;; mijn$ ; &amp;quot; ?&amp;quot;&lt;br /&gt;
mijn$ = &amp;quot;&amp;quot;&lt;br /&gt;
END IF&lt;br /&gt;
else&lt;br /&gt;
IF RIGHT$( antwoord$ , 1 ) = &amp;quot;=&amp;quot; THEN&lt;br /&gt;
&#039;reactiezin heeft aanhangsel&lt;br /&gt;
&#039;reaction has mirror-part&lt;br /&gt;
antwoord$ = LEFT$( antwoord$ , LEN( antwoord$ ) - 1 )&lt;br /&gt;
&#039;verwijder sleutel van zin&lt;br /&gt;
&#039;remove key from sentence&lt;br /&gt;
zin$ = RIGHT$( zin$ , LEN( zin$ ) - LEN( zin$( a , 0 ) ) )&lt;br /&gt;
PRINT antwoord$;&lt;br /&gt;
&#039;plak spiegel worden achter reactiezin&lt;br /&gt;
&#039;te gebruiken voor vertaler&lt;br /&gt;
&#039;paste mirror after reaction&lt;br /&gt;
&#039;can be used for translator&lt;br /&gt;
t = 1&lt;br /&gt;
while word$( zin$ , t ) &amp;lt;&amp;gt; &amp;quot;&amp;quot;&lt;br /&gt;
&#039;alle woorden uit zin&lt;br /&gt;
&#039;al words out sentence&lt;br /&gt;
qq = 0&lt;br /&gt;
FOR e = 0 TO maxwoord&lt;br /&gt;
IF word$( zin$ , t ) = a$( e ) THEN&lt;br /&gt;
&#039;is woord een spiegelwoord ?&lt;br /&gt;
&#039;is word a mirror-word ?&lt;br /&gt;
PRINT b$( e ) + &amp;quot; &amp;quot;;&lt;br /&gt;
qq = 1&lt;br /&gt;
END IF&lt;br /&gt;
NEXT e&lt;br /&gt;
IF qq = 0 THEN PRINT word$( zin$ , t ) + &amp;quot; &amp;quot;;&lt;br /&gt;
t = t + 1&lt;br /&gt;
wend&lt;br /&gt;
PRINT &amp;quot;?&amp;quot;&lt;br /&gt;
ELSE&lt;br /&gt;
PRINT antwoord$&lt;br /&gt;
END IF&lt;br /&gt;
end if&lt;br /&gt;
wend&lt;br /&gt;
print &amp;quot;Bey bey .&amp;quot;&lt;br /&gt;
END&lt;br /&gt;
&#039; mirror-data&lt;br /&gt;
&#039;het is zeer warschijnlijk&lt;br /&gt;
&#039;dat ik hier wat vergeten ben&lt;br /&gt;
&#039;aub uitbreiden .&lt;br /&gt;
&#039;it is posible that i forgot&lt;br /&gt;
&#039;somthing here&lt;br /&gt;
&#039;please expand&lt;br /&gt;
DATA &amp;quot;i&amp;quot; , &amp;quot;you&amp;quot; , &amp;quot;you&amp;quot; , &amp;quot;i&amp;quot;&lt;br /&gt;
DATA &amp;quot;mine&amp;quot;,&amp;quot;your&amp;quot;,&amp;quot;your&amp;quot;,&amp;quot;mine&amp;quot;&lt;br /&gt;
DATA &amp;quot;am&amp;quot;,&amp;quot;are&amp;quot;,&amp;quot;are&amp;quot;,&amp;quot;am&amp;quot;&lt;br /&gt;
DATA &amp;quot;=&amp;quot;,&amp;quot;=&amp;quot;&lt;br /&gt;
&#039; sleutel en zinnen data&lt;br /&gt;
&#039; key and reaction data&lt;br /&gt;
&#039;dit is het interesantste gedeelte&lt;br /&gt;
&#039;this is the most intresting part&lt;br /&gt;
&#039;en voor uitbreidig en verbetering vatbaar&lt;br /&gt;
&#039;and must be expand en inproved&lt;br /&gt;
&#039;een sleutel bestaat uit een of meer woorden&lt;br /&gt;
&#039;a key exist out one or two words&lt;br /&gt;
&#039;en heeft 3 reactie zinnen .&lt;br /&gt;
&#039;and has 3 reaction sentences .&lt;br /&gt;
&#039;als je de reactie zin met = laat eindigen&lt;br /&gt;
&#039;if you end the sentence with a =&lt;br /&gt;
&#039;plakt het progamma het&lt;br /&gt;
&#039;the program wil paste&lt;br /&gt;
&#039;gespiegelde gedeelte erachter&lt;br /&gt;
&#039;the mirrored part behind it&lt;br /&gt;
&#039;dan moet de sleutel wel in t begin&lt;br /&gt;
&#039;then the key must be at the beginining&lt;br /&gt;
&#039;van de zin staan&lt;br /&gt;
&#039;of the sentence&lt;br /&gt;
DATA &amp;quot;naturly&amp;quot;&lt;br /&gt;
DATA &amp;quot;Are you always so sure ?&amp;quot;&lt;br /&gt;
DATA &amp;quot;Do you know for sure ?&amp;quot;&lt;br /&gt;
DATA &amp;quot;You are verry sure .&amp;quot;&lt;br /&gt;
DATA &amp;quot;computers&amp;quot;&lt;br /&gt;
DATA &amp;quot;Do you meen me too ?&amp;quot;&lt;br /&gt;
DATA &amp;quot;Do you have that more with computers ?&amp;quot;&lt;br /&gt;
DATA &amp;quot;All computers ?&amp;quot;&lt;br /&gt;
DATA &amp;quot;i have&amp;quot;&lt;br /&gt;
DATA &amp;quot;Why you have =&amp;quot;&lt;br /&gt;
DATA &amp;quot;Howlong you have =&amp;quot;&lt;br /&gt;
DATA &amp;quot;Do you often have =&amp;quot;&lt;br /&gt;
DATA &amp;quot;i am&amp;quot;&lt;br /&gt;
DATA &amp;quot;Are you often =&amp;quot;&lt;br /&gt;
DATA &amp;quot;Why you are =&amp;quot;&lt;br /&gt;
DATA &amp;quot;Howlong you are =&amp;quot;&lt;br /&gt;
DATA &amp;quot;i wish that&amp;quot;&lt;br /&gt;
DATA &amp;quot;Does it make a difference if =&amp;quot;&lt;br /&gt;
DATA &amp;quot;Why you wish that =&amp;quot;&lt;br /&gt;
DATA &amp;quot;Wish you often that =&amp;quot;&lt;br /&gt;
DATA &amp;quot;i think that&amp;quot;&lt;br /&gt;
DATA &amp;quot;Do you doubt that =&amp;quot;&lt;br /&gt;
DATA &amp;quot;Think you often that =&amp;quot;&lt;br /&gt;
DATA &amp;quot;Why you think that =&amp;quot;&lt;br /&gt;
DATA &amp;quot;i want&amp;quot;&lt;br /&gt;
DATA &amp;quot;Why you want =&amp;quot;&lt;br /&gt;
DATA &amp;quot;Do you often want =&amp;quot;&lt;br /&gt;
DATA &amp;quot;Howlong do you want =&amp;quot;&lt;br /&gt;
DATA &amp;quot;i hate&amp;quot;&lt;br /&gt;
DATA &amp;quot;Do you often hate =&amp;quot;&lt;br /&gt;
DATA &amp;quot;Why you hate =&amp;quot;&lt;br /&gt;
DATA &amp;quot;When you hate =&amp;quot;&lt;br /&gt;
DATA &amp;quot;i love&amp;quot;&lt;br /&gt;
DATA &amp;quot;Do you muth love =&amp;quot;&lt;br /&gt;
DATA &amp;quot;Why you love =&amp;quot;&lt;br /&gt;
DATA &amp;quot;Do you often love =&amp;quot;&lt;br /&gt;
DATA &amp;quot;=&amp;quot;,&amp;quot;=&amp;quot;,&amp;quot;=&amp;quot;,&amp;quot;=&amp;quot;</description>
          </item>
    <item>
      <title>AI Finite State Machine Stop Light</title>
      <link>https://basic.wikispaces.com/AI+Finite+State+Machine+Stop+Light</link>
      <dc:creator>bluatigro</dc:creator>
      <guid isPermaLink="true">https://basic.wikispaces.com/AI+Finite+State+Machine+Stop+Light</guid>
      <comments>https://basic.wikispaces.com/page/messages/AI+Finite+State+Machine+Stop+Light</comments>
      <pubDate>Sun, 04 Apr 2010 11:33:18 GMT</pubDate>
      <description>WindowWidth = 700&lt;br /&gt;
WindowHeight = 500&lt;br /&gt;
nomainwin&lt;br /&gt;
timer 250 , [tmr]&lt;br /&gt;
global red , green , orange&lt;br /&gt;
global north , west , south , east , foot&lt;br /&gt;
global frame , state , shift , clicked&lt;br /&gt;
dim x( 5 ) , y( 5 )&lt;br /&gt;
shift = 16&lt;br /&gt;
red = 1 * shift&lt;br /&gt;
green = 2 * shift&lt;br /&gt;
orange = 3 * shift&lt;br /&gt;
north = 0&lt;br /&gt;
west = 1&lt;br /&gt;
south = 2&lt;br /&gt;
east = 3&lt;br /&gt;
foot = 4&lt;br /&gt;
x( north ) = 200 : y( north ) = 0&lt;br /&gt;
x( west ) = 50 : y( west ) = 150&lt;br /&gt;
x( south ) = 200 : y( south ) = 300&lt;br /&gt;
x( east ) = 350 : y( east ) = 150&lt;br /&gt;
x( foot ) = 200 : y( foot ) = 150&lt;br /&gt;
state = north + red&lt;br /&gt;
frame = 2&lt;br /&gt;
clicked = 0&lt;br /&gt;
open &amp;quot;StopLight&amp;quot; for graphics as #m&lt;br /&gt;
#m &amp;quot;trapclose [quit]&amp;quot;&lt;br /&gt;
#m &amp;quot;when leftBottonDown [leftbutton]&amp;quot;&lt;br /&gt;
call light north , red&lt;br /&gt;
call light west , red&lt;br /&gt;
call light south , red&lt;br /&gt;
call light east , red&lt;br /&gt;
call light foot , red&lt;br /&gt;
#m &amp;quot;flush&amp;quot;&lt;br /&gt;
wait&lt;br /&gt;
[leftbutton]&lt;br /&gt;
clicked = abs( not( 0 ) )&lt;br /&gt;
wait&lt;br /&gt;
[tmr]&lt;br /&gt;
frame = frame - 1&lt;br /&gt;
select case state&lt;br /&gt;
case north + red&lt;br /&gt;
call light north , red&lt;br /&gt;
if frame &amp;lt; 0 then&lt;br /&gt;
frame = 30&lt;br /&gt;
state = north + green&lt;br /&gt;
end if&lt;br /&gt;
case north + green&lt;br /&gt;
call light north , green&lt;br /&gt;
if frame &amp;lt; 0 then&lt;br /&gt;
frame = 10&lt;br /&gt;
state = north + orange&lt;br /&gt;
end if&lt;br /&gt;
case north + orange&lt;br /&gt;
call light north , orange&lt;br /&gt;
if frame &amp;lt; 0 then&lt;br /&gt;
frame = 2&lt;br /&gt;
state = west + red&lt;br /&gt;
call light north , red&lt;br /&gt;
end if&lt;br /&gt;
case west + red&lt;br /&gt;
call light west , red&lt;br /&gt;
if frame &amp;lt; 0 then&lt;br /&gt;
frame = 30&lt;br /&gt;
state = west + green&lt;br /&gt;
end if&lt;br /&gt;
case west + green&lt;br /&gt;
call light west , green&lt;br /&gt;
if frame &amp;lt; 0 then&lt;br /&gt;
frame = 10&lt;br /&gt;
state = west + orange&lt;br /&gt;
end if&lt;br /&gt;
case west + orange&lt;br /&gt;
call light west , orange&lt;br /&gt;
if frame &amp;lt; 0 then&lt;br /&gt;
frame = 2&lt;br /&gt;
state = south + red&lt;br /&gt;
call light west , red&lt;br /&gt;
end if&lt;br /&gt;
case south + red&lt;br /&gt;
call light south , red&lt;br /&gt;
if frame &amp;lt; 0 then&lt;br /&gt;
frame = 30&lt;br /&gt;
state = south + green&lt;br /&gt;
end if&lt;br /&gt;
case south + green&lt;br /&gt;
call light south , green&lt;br /&gt;
if frame &amp;lt; 0 then&lt;br /&gt;
frame = 10&lt;br /&gt;
state = south + orange&lt;br /&gt;
end if&lt;br /&gt;
case south + orange&lt;br /&gt;
call light south , orange&lt;br /&gt;
if frame &amp;lt; 0 then&lt;br /&gt;
frame = 2&lt;br /&gt;
state = east + red&lt;br /&gt;
call light south , red&lt;br /&gt;
end if&lt;br /&gt;
case east + red&lt;br /&gt;
call light east , red&lt;br /&gt;
if frame &amp;lt; 0 then&lt;br /&gt;
frame = 30&lt;br /&gt;
state = east + green&lt;br /&gt;
end if&lt;br /&gt;
case east + green&lt;br /&gt;
call light east , green&lt;br /&gt;
if frame &amp;lt; 0 then&lt;br /&gt;
frame = 10&lt;br /&gt;
state = east + orange&lt;br /&gt;
end if&lt;br /&gt;
case east + orange&lt;br /&gt;
call light east , orange&lt;br /&gt;
if frame &amp;lt; 0 then&lt;br /&gt;
frame = 2&lt;br /&gt;
if clicked then&lt;br /&gt;
state = foot + red&lt;br /&gt;
clicked = 0&lt;br /&gt;
else&lt;br /&gt;
state = north + red&lt;br /&gt;
end if&lt;br /&gt;
call light east , red&lt;br /&gt;
end if&lt;br /&gt;
case foot + red&lt;br /&gt;
call light foot , red&lt;br /&gt;
if frame &amp;lt; 0 then&lt;br /&gt;
frame = 30&lt;br /&gt;
state = foot + green&lt;br /&gt;
end if&lt;br /&gt;
case foot + green&lt;br /&gt;
call light foot , green&lt;br /&gt;
if frame &amp;lt; 0 then&lt;br /&gt;
frame = 10&lt;br /&gt;
state = foot + orange&lt;br /&gt;
end if&lt;br /&gt;
case foot + orange&lt;br /&gt;
call light foot , orange&lt;br /&gt;
if frame &amp;lt; 0 then&lt;br /&gt;
frame = 2&lt;br /&gt;
state = north + red&lt;br /&gt;
call light foot , red&lt;br /&gt;
end if&lt;br /&gt;
case else&lt;br /&gt;
end select&lt;br /&gt;
wait&lt;br /&gt;
sub light no , clr&lt;br /&gt;
#m &amp;quot;up&amp;quot;&lt;br /&gt;
#m &amp;quot;goto &amp;quot; ; x( no ) ; &amp;quot; &amp;quot; ; y( no )&lt;br /&gt;
#m &amp;quot;color black&amp;quot;&lt;br /&gt;
#m &amp;quot;backcolor black&amp;quot;&lt;br /&gt;
#m &amp;quot;down&amp;quot;&lt;br /&gt;
#m &amp;quot;boxfilled &amp;quot; ; x( no ) + 30 _&lt;br /&gt;
; &amp;quot; &amp;quot; ; y( no ) + 90&lt;br /&gt;
#m &amp;quot;up&amp;quot;&lt;br /&gt;
select case clr&lt;br /&gt;
case red&lt;br /&gt;
#m &amp;quot;color red&amp;quot;&lt;br /&gt;
#m &amp;quot;backcolor red&amp;quot;&lt;br /&gt;
#m &amp;quot;goto &amp;quot; ; x( no ) + 15 ; &amp;quot; &amp;quot; ; y( no ) + 15&lt;br /&gt;
#m &amp;quot;down&amp;quot;&lt;br /&gt;
#m &amp;quot;circlefilled 15&amp;quot;&lt;br /&gt;
case orange&lt;br /&gt;
#m &amp;quot;color yellow&amp;quot;&lt;br /&gt;
#m &amp;quot;backcolor yellow&amp;quot;&lt;br /&gt;
#m &amp;quot;goto &amp;quot; ; x( no ) + 15 ; &amp;quot; &amp;quot; ; y( no ) + 45&lt;br /&gt;
#m &amp;quot;down&amp;quot;&lt;br /&gt;
#m &amp;quot;circlefilled 15&amp;quot;&lt;br /&gt;
case green&lt;br /&gt;
#m &amp;quot;color green&amp;quot;&lt;br /&gt;
#m &amp;quot;backcolor green&amp;quot;&lt;br /&gt;
#m &amp;quot;goto &amp;quot; ; x( no ) + 15 ; &amp;quot; &amp;quot; ; y( no ) + 75&lt;br /&gt;
#m &amp;quot;down&amp;quot;&lt;br /&gt;
#m &amp;quot;circlefilled 15&amp;quot;&lt;br /&gt;
case else&lt;br /&gt;
end select&lt;br /&gt;
#m &amp;quot;flush&amp;quot;&lt;br /&gt;
end sub&lt;br /&gt;
[quit]&lt;br /&gt;
close #m&lt;br /&gt;
end</description>
          </item>

  </channel>
</rss>