<?xml version='1.0' encoding='UTF-8'?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/" xmlns:blogger="http://schemas.google.com/blogger/2008" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-9171970165728700117</atom:id><lastBuildDate>Fri, 20 Sep 2024 14:14:45 +0000</lastBuildDate><category>degree</category><category>ball</category><category>bouncing</category><category>solver</category><category>1st</category><category>2nd</category><category>balls</category><category>bounce</category><category>catapult</category><category>equation</category><category>equations</category><category>fire</category><category>first</category><category>graph</category><category>gun</category><category>missle</category><category>pool</category><category>second</category><category>shapes</category><category>solve</category><category>table</category><category>trajectory</category><title>MSWLOGO Code Posting Site</title><description>This blog is where I post computer code that I have made or found using LOGO; specifically, the free version, MSWLOGO, for Windows.&#xa; All the &quot;shape&quot; codes will go into one post. Feel free to give advice, questions, or even suggestions as to what I should make or have made. If you need any help, I would be glad to give my assistance, as long as I have the time. Feel free to post your own code as well.</description><link>http://mswlogohelp.blogspot.com/</link><managingEditor>noreply@blogger.com (Vanderdecken12)</managingEditor><generator>Blogger</generator><openSearch:totalResults>10</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><item><guid isPermaLink="false">tag:blogger.com,1999:blog-9171970165728700117.post-9143502625381815701</guid><pubDate>Fri, 06 Feb 2009 18:59:00 +0000</pubDate><atom:updated>2009-02-06T11:04:41.311-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">2nd</category><category domain="http://www.blogger.com/atom/ns#">degree</category><title>solve 2nd degree equations</title><description>This is will output second degree equations using the quadratic formula. It is perfect except for two things: first, it outputs without parentheses around the parts before the fraction, so you must remember that you are dividing everything on the top by the bottom, not just the last part. Second, it does not reduce the square root. For example, the square root of 40 can be reduced to 2 times the square root of ten. However, I couldn&#39;t think of an effective way to do that. Still, it gives the right answer, and that&#39;s what counts in the end:&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;to solve.second :a :b :c&lt;/div&gt;&lt;div&gt;while [(:b*:b-4*:a*:c)&gt;0] [if [sqrt(:b*:b-4*:a*:c)= int (:b*:b-4*:a*:c)] [make &quot;q sqrt(:b*:b-4*:a*:c) show (word &quot;x &quot;= &quot;(-:b+:q)/(2*:a) &quot; and &quot; (-:b-:q)/(2*:a)) stop]]&lt;/div&gt;&lt;div&gt;show (word &quot; ) show (list &quot;the &quot;answers &quot;are) show (word  (-:b) &quot;+ &quot;sqrt &quot;(:b*:b-4*:a*:c) &quot;/ &quot;(2*:a)) show (list &quot;and) show (word &quot;&quot;(-:b) &quot;- &quot;sqrt &quot;(:b*:b-4*:a*:c) &quot;/ &quot;(2*:a))&lt;/div&gt;&lt;div&gt;end&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</description><link>http://mswlogohelp.blogspot.com/2009/02/solve-2nd-degree-equations.html</link><author>noreply@blogger.com (Vanderdecken12)</author><thr:total>4</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-9171970165728700117.post-8828686523288416697</guid><pubDate>Fri, 06 Feb 2009 18:36:00 +0000</pubDate><atom:updated>2009-02-06T10:41:59.760-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">1st</category><category domain="http://www.blogger.com/atom/ns#">degree</category><title>Solve 1st degree equations</title><description>Although this does the same thing as the solver before, it does it the direct way. Put your equation in the form ax+b=0 and insert a and b into the variables, and it spits out X:&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;to solve.first :a :b&lt;/div&gt;&lt;div&gt;show (word &quot;x &quot;= &quot;(-:b/:a))  setx (-:b/:a)&lt;/div&gt;&lt;div&gt;end&lt;/div&gt;&lt;/div&gt;</description><link>http://mswlogohelp.blogspot.com/2009/02/solve-1st-degree-equations.html</link><author>noreply@blogger.com (Vanderdecken12)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-9171970165728700117.post-3755548512301938147</guid><pubDate>Mon, 26 Jan 2009 00:20:00 +0000</pubDate><atom:updated>2009-01-25T16:27:12.091-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">degree</category><category domain="http://www.blogger.com/atom/ns#">equations</category><category domain="http://www.blogger.com/atom/ns#">second</category><category domain="http://www.blogger.com/atom/ns#">solve</category><category domain="http://www.blogger.com/atom/ns#">solver</category><title>solve second degree equations</title><description>&lt;div&gt;In their simplest form, second degree equations look like this: a*x^2+b*x+c.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This code will solve a formula starting in that solution. Unfortunately, however, it will only solve equations which have whole numbers as solutions. If there are 2 solutions (possible with a second degree equation), it will display both of them. It solves the first solution by narrowing in ot it from above. As it gets closer to the solution, the amount subtracted from X decreases, so that, when it gets to the number, it stops completely. It starts on the second number from the first number, and slowly goes up until it hits it. If there is no solution, you will not get an answer for a very long time. When you do, it will say &quot;no solution&quot;.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;to seconddegree :a :b :c&lt;/div&gt;&lt;div&gt;make &quot;x1 100000000000 make &quot;done 1&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;while [:a*:x1*:x1+:b*:x1+:c&gt;100000000] [make &quot;x1 :x1-100000000 IF :x1&gt;1000000000000 [show (list &quot;no &quot;solution)] while [:a*:x1*:x1+:b*:x1+:c&gt;10000000]  [make &quot;x1 :x1-10000000] while [:a*:x1*:x1+:b*:x1&gt;1000000] [make &quot;x1 :x1-1000000] while [:a*:x1*:x1+:b*:x1+:c&gt;100000] [make &quot;x1 :x1-100000] while [:a*:x1*:x1+:b*:x1+:c&gt;10000] [make &quot;x1 :x1-10000] while [:a*:x1*:x1+:b*:x1+:c&gt;1000] [make &quot;x1 :x1-1000] while [:a*:x1*:x1+:b*:x1&gt;100] [make &quot;x1 :x1-100] while [:a*:x1*:x1+:b*:x1+:c&gt;10] [make &quot;x1 :x1-10] while [:a*:x1*:x1+:b*:x1&gt;1] [make &quot;x1 :x1-1] while [:a*:x1*:x1+:b*:x1+:c&gt;0] [make &quot;x1 :x1-0.001]&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;make &quot;x2 :x1-.01 until [:a*:x2*:x2+:b*:x2+:c&gt;0] [make &quot;x2 :x2-.01 IF :x2&lt;-1000000000000 [show (list &quot;the &quot;answer &quot;is :x1) STOP]]]&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;while [:x1&gt;:x2] [show (list &quot;the &quot;answers &quot;are :x1 &quot;and :x2) Stop] show (list &quot;no &quot;solution)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;end&lt;/div&gt;</description><link>http://mswlogohelp.blogspot.com/2009/01/solve-second-degree-equations.html</link><author>noreply@blogger.com (Vanderdecken12)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-9171970165728700117.post-84685663654058802</guid><pubDate>Sun, 25 Jan 2009 06:18:00 +0000</pubDate><atom:updated>2009-01-24T22:46:28.738-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">equation</category><category domain="http://www.blogger.com/atom/ns#">solver</category><title>Simplified First-degree equation solver</title><description>In it&#39;s simplest form, a first degree equation looks like this: a*x+b=zero If you want to know what x equals, you would simply solve it. However, that would be impossible for more difficult equations, like 5th degree. That is what I&#39;m working on now. Until then, however, this what I&#39;ve gotten so far, only first degree. Notice, to get an answer with a possiblity as high as ten million, and accurate to the ten-thousandths place, it would take the computer practically forever, assuming it subtracted one ten-thousandth at a time. However, by making X &quot;swing&quot; back and forth around the number, it manages to zone in on it &lt;span class=&quot;Apple-style-span&quot; style=&quot;font-style: italic;&quot;&gt;much&lt;/span&gt; faster. X goes down by a large amount until it passes the number, and then it goes up by a slightly smaller amount, and then back down again, until it finally hit the number. If, after getting to negative ten million, it couldn&#39;t find a number, it spits out &quot;no solution&quot;. of course, unless X is too big, or too small, there will be a solution for every first degree equation. I only added that because I was thinking of the later equations, in which certain equations will have no solution.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;to firstdegree :a :b&lt;/div&gt;&lt;div&gt;make &quot;x 100000000000 &lt;/div&gt;&lt;div&gt;Until [:x=-10000000000] [while [:a*:x+:b&gt;0] [make &quot;x :x-100000000] while [:a*:x+:b&lt;0]&gt;0] [make &quot;x :x-1000000] while [:a*:x+:b&lt;0]&gt;0] [make &quot;x :x-10000] while [:a*:x+:b&lt;0]&gt;0] [make &quot;x :x-100] while [:a*:x+:b&lt;0]&gt;0] [make &quot;x :x-1] while [:a*:x+:b&lt;0]&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;end&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</description><link>http://mswlogohelp.blogspot.com/2009/01/simplified-first-degree-equation-solver.html</link><author>noreply@blogger.com (Vanderdecken12)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-9171970165728700117.post-7991018306842495669</guid><pubDate>Mon, 12 Jan 2009 20:54:00 +0000</pubDate><atom:updated>2009-01-23T10:50:01.152-08:00</atom:updated><title>Graphing a second-degree equation</title><description>This is for drawing two-variable, second-degree equations on a graph in their simplest form: y=a*(x^2)+bx+c&lt;br /&gt;&lt;br /&gt;Where :a is what is multiplied by x squared, :b is multiplied by x, and :c is added to the other two. :X is the x-cordinate. Wait a few seconds after you start the program, as it has to run for a while before the first condition is satisfied. This is to keep the turtle from drawing all over the screen, as it flies up and then appears at the bottom again and again.&lt;br /&gt;&lt;br /&gt;&lt;div&gt;to graph2 :a :b :c&lt;/div&gt;&lt;div&gt;make &quot;x -450&lt;/div&gt;&lt;div&gt;while [:a*:x*:x+:b*:x+:c&gt;450] [make &quot;x :x+.01]  penup make &quot;x :x+01 setx :x sety :a*xcor*xcor+:b*xcor+:c pendown while [ycor&lt;450]&gt;450] [stop] make &quot;x :x+01 setx :x sety :a*xcor*xcor+:b*xcor+:c]&lt;/div&gt;&lt;div&gt;end&lt;/div&gt;</description><link>http://mswlogohelp.blogspot.com/2009/01/graphing-second-degree-equation.html</link><author>noreply@blogger.com (Vanderdecken12)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-9171970165728700117.post-3871148791558574006</guid><pubDate>Mon, 12 Jan 2009 20:54:00 +0000</pubDate><atom:updated>2009-01-23T10:46:40.357-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">degree</category><category domain="http://www.blogger.com/atom/ns#">first</category><category domain="http://www.blogger.com/atom/ns#">graph</category><title>graphing a first degree equation</title><description>This is for drawing graphs of the most simplified form of any two-variable equation, y=ax+b.&lt;br /&gt;&lt;br /&gt;Where :a is what you multiply by X, :b is what you add to that, and :x is where the turtle is on the x-axis:&lt;br /&gt;&lt;br /&gt;&lt;div&gt;to graph :a :b&lt;/div&gt;&lt;div&gt;make &quot;x -450&lt;/div&gt;&lt;div&gt;while [:a*:x+:b&gt;450] [make &quot;x :x+.01]  penup make &quot;x :x+01 setx :x sety :a*xcor+:b pendown&lt;/div&gt;&lt;div&gt;while [xcor&lt;450]&gt;450] [stop] make &quot;x :x+01 setxy :x :a*:x+:b] &lt;/div&gt;&lt;div&gt;end&lt;/div&gt;</description><link>http://mswlogohelp.blogspot.com/2009/01/graphing-first-degree-equation.html</link><author>noreply@blogger.com (Vanderdecken12)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-9171970165728700117.post-7131010692505131928</guid><pubDate>Fri, 02 Jan 2009 02:52:00 +0000</pubDate><atom:updated>2009-01-01T18:57:11.771-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">ball</category><category domain="http://www.blogger.com/atom/ns#">balls</category><category domain="http://www.blogger.com/atom/ns#">bounce</category><category domain="http://www.blogger.com/atom/ns#">bouncing</category><category domain="http://www.blogger.com/atom/ns#">pool</category><category domain="http://www.blogger.com/atom/ns#">table</category><title>Pool table (1 ball)</title><description>This is code for a ball bouncing without gravity, but with walls all around it. Currently, I have not figured out an efficient way to get the ball to bounce off any wall. It has to be just straight lines that are preprogrammed; no cool zig zag bounces. Also, this equation only accounts for one ball. I plan on adding more balls later, but only have one right now.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;to pooltable :V :A :CS&lt;br /&gt;&lt;br /&gt;Make &quot;h 0 Make &quot;l 0 MAKE &quot;y 0 Make &quot;p 0 seth 0 rt :a&lt;br /&gt;while [:V&gt;.001] [MAKE &quot;l xcor MAKE &quot;h ycor fd :V IFelse ycor&gt;:h [Make &quot;y ycor-:h] [Make &quot;y :h-ycor] Ifelse xcor&gt;:l [Make &quot;z xcor-:l] [Make &quot;z :l-xcor]&lt;br /&gt; while [ycor&gt;300] [IF Heading&gt;180 [lt 180-(arctan (:y) (:z))*2] IF Heading&lt;180 [rt 180-(arctan (:y) (:z))*2] fd :V*:CS Make &quot;V :V*:CS]&lt;br /&gt;while [ycor&lt;-300] [IF Heading&gt;180 [rt 180-(arctan :y :z)*2] IF Heading&lt;180 [lt 180-(arctan :y :z)*2] FD :V*:CS Make &quot;V :V*:CS]&lt;br /&gt;while [xcor&gt;450] [If Heading&gt;90 [rt 180-(arctan :z :y)*2] If heading&lt;90 [lt 180-(arctan :z :y)*2] fd :V*:CS Make &quot;V :V*:CS]&lt;br /&gt;while [xcor&lt;-450] [ IF heading&lt;270&gt;270 [rt 180-((arctan :z :y)*2) fd 1] fd :V*:CS Make &quot;V :V*:CS ]]&lt;br /&gt;&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;Where :v is the starting velocity, :a is the starting angle, and :CS is coefficient of elasticity at which it will bounce off walls. I recomend putting the coefficient of elasticity at about .9 or .6 at the lowest. Keep velocity &lt;em&gt;very&lt;/em&gt; low. Preferably at only 1. Pick your own angle.</description><link>http://mswlogohelp.blogspot.com/2009/01/pool-table-1-ball.html</link><author>noreply@blogger.com (Vanderdecken12)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-9171970165728700117.post-1549370473021122714</guid><pubDate>Fri, 02 Jan 2009 02:49:00 +0000</pubDate><atom:updated>2009-01-01T18:57:50.941-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">ball</category><category domain="http://www.blogger.com/atom/ns#">bouncing</category><title>A bouncing ball</title><description>To calculate the formula for a bouncing ball, combine the formula for trajectory with a formula to rotate the turtle every time it hits the ground.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;TO BOUNCE :A :V :CE&lt;br /&gt;make &quot;sx 0 make &quot;T 0&lt;br /&gt;WHILE [3 = 3] [&lt;br /&gt;MAKE &quot;T :T + 0.01&lt;br /&gt;SETX (:V * :T * COS :A) + :SX&lt;br /&gt;SETY :V * :T * (SIN :A) - 4.91 * :T*:T&lt;br /&gt;IF YCOR &lt; 0 [&lt;br /&gt;MAKE &quot;T 0&lt;br /&gt;MAKE &quot;V :V * :CE&lt;br /&gt;MAKE &quot;SX XCOR SETY 0&lt;br /&gt;IF :V &lt; 1 [STOP]&lt;br /&gt;]&lt;br /&gt;]&lt;br /&gt;&lt;br /&gt;END&lt;br /&gt;&lt;br /&gt;Where :A is the starting angle, :V is the starting trajectory, and :CE is the coefficient of elasticity. What is that? It&#39;s the thing you multiply velocity by to get the new velocity. CE is the reason when you bounce a ball, it doesn&#39;t go straight back up to your hand.&lt;br /&gt;I recomend putting :V at a maximum of 100 and :CE about .9 or .5 at the lowest.</description><link>http://mswlogohelp.blogspot.com/2009/01/bouncing-ball.html</link><author>noreply@blogger.com (Vanderdecken12)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-9171970165728700117.post-8556747248557729986</guid><pubDate>Fri, 02 Jan 2009 02:38:00 +0000</pubDate><atom:updated>2009-04-25T10:53:58.161-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">catapult</category><category domain="http://www.blogger.com/atom/ns#">fire</category><category domain="http://www.blogger.com/atom/ns#">gun</category><category domain="http://www.blogger.com/atom/ns#">missle</category><category domain="http://www.blogger.com/atom/ns#">trajectory</category><title>Trajectory</title><description>To make the trajectory a missle would follow (assuming no wind resistance), enter:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;to fire :a :v&lt;/div&gt;&lt;div&gt;make &quot;s Distance [0 0] make &quot;t 0 make &quot;h 0 make &quot;l 0 make &quot;q 0&lt;/div&gt;&lt;div&gt;until [ycor&lt;0]&gt;.001 ift [seth (arctan ycor-:l xcor-:h)]&lt;/div&gt;&lt;div&gt;end&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Where &quot;a&quot; is the angle it launches at and &quot;v&quot; is the starting velocity. You can shoot your missle from anywhere, as long as it starts on the x-axis. The missle will also point in the direction it is shooting. I used the formulas for trajectory:&lt;br /&gt;&lt;br /&gt;velocity times the amount of time which has passed times the sine of the the starter angle will equal the current distance forward. The velocity times the time times the cosine of the starting angle, all subtracted by time squared times gravity (which is 4.905 meters per second) will give you the current height.&lt;br /&gt;I recomend putting :v at a maximum of 100, and :a at whatever you like. Negative angles are angles which point to the left instead of to the right.</description><link>http://mswlogohelp.blogspot.com/2009/01/trajectory.html</link><author>noreply@blogger.com (Vanderdecken12)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-9171970165728700117.post-1597340651445132970</guid><pubDate>Fri, 02 Jan 2009 01:21:00 +0000</pubDate><atom:updated>2009-08-15T16:58:53.792-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">shapes</category><title>Shapes</title><description>Shapes with sides of the same length are generally easy to make. In fact, there is one, solve-all formula which you can use. It is:&lt;br /&gt;&lt;br /&gt;TO POLYGON :length :sides&lt;br /&gt;REPEAT :sides [FD :length RT 360.0/:sides]&lt;br /&gt;END&lt;br /&gt;&lt;br /&gt;Type in polygon, the length you want the sides to be, and then how many sides you want, and boom, you have yourself a square or a triangle or a decagon or chiliagon (1,000 sides) , depending on what you entered.</description><link>http://mswlogohelp.blogspot.com/2009/01/shapes.html</link><author>noreply@blogger.com (Vanderdecken12)</author><thr:total>2</thr:total></item></channel></rss>