<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='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'><id>tag:blogger.com,1999:blog-7146009276796834082</id><updated>2024-08-28T18:10:12.891-07:00</updated><title type='text'>Make your presence count!!!</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://tech-doodles.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7146009276796834082/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://tech-doodles.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Rachit Garg</name><uri>http://www.blogger.com/profile/12632649277817309542</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>6</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7146009276796834082.post-8201190274300721916</id><published>2012-05-22T00:45:00.002-07:00</published><updated>2012-08-03T07:13:39.117-07:00</updated><title type='text'>DNA Reshuffled!</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
From the eyes of a Computer Engineer, I will try to put
forth the genetics.&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
1.) Lets say we need to fill a register of Genetic code
(just like an IP address). For a different person, we need a different code. A
code represents a unique person. &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
For now lets say that there are quadrillion/1000 Trillion
different possibilities (considering the fact that current population is just
7billion)&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
So the no. of bits this register need to have is 50. So, to
let you get the feel of this register being the genetic code, Lets say there
may be 64 types of eyes, so 6 bits for eyes, 128 different colour of skin, so 7
bits for skin colour, 16000 different face cuts, so 14 bits for face cut and so
on..&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
Now this might let you wonder that 50 bits are such a small
register size, and this indeed means that possibility is way over a 1000
Trillion. So God can indeed make more than 10^15/7*10^9 times the population of
earth without repeating a single character.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
Below is a little illustration of how the IP addresses are
allocated, if you know it you can skip it and start reading from&amp;nbsp; ***STAR***.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
2.)The distribution of Ip address to companies done
depending how large the chunk you want to give to a particular company. So,
Lets say I have an address of 16bits (a total of 64K addresses) and we want to
divide it to 32K+16K+8K+8K. So I will fix the first bit to say 0 and give it to
company A. fix first 2 bits as 10 and give it to B. and fix first 3 bits as 110
and 111 and give them for use to C and D. Now, A B C D all have 15,14,13,13
bits resp. to vary and hence 32K, 16K, 8K, 8K addresses.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
***STAR***&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
3.) Now lets assume division of Genetic code over 7
continents. Asia is most populated so we have lets say 10 bits fixed for all
Asians. Lets say these fixed bits represent colour, nature and all those
features that you think are common in all asians. Do the same thing for all the
continents.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
One can further divide these continents into countries. Lets
say Indians and Chinese dont have similar eyes, similar voice etc, but are
similar in colour etc.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
So lets fix 10 bits between Chinese and Indians. So in total
Indians and chinese are more similar than an Indian and American coz they have
20 bits in common rather than 10 bits.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
4.) Now lets go up to the illustration of the company (2),
Suppose the company initially bought more no. of IP addresses than it uses,
then those extra bits are being wasted. And no one can use those IP addresses.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
Similar is the case with genetic code, the continents whose
population is less are not able to fill up that big gap of available genetic
diversity.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
5.) Now, the child bears the genetic code which is
intermediate value of the genetic code of its parents. Because the child will
either pick up the characteristic of its father or its mother, thus giving it
an overall intermediate value.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
6.) Now the Hypothesis is that if the Parents are
genetically very diverse, say belonging to different continents, then only we
can fill up those intermediate gaps inbetween. Because we are only using a very
small fraction of the available genetic code. only 7 billion reside on earth
when the possibility is as large as quadrillion, So it will be better for human
race that all these 7 billion genetic codes that we are using right now are
very sparse apart rather than being chunked up.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://1.bp.blogspot.com/-1Ul_Ro71XAM/T7tE7AOyLjI/AAAAAAAAAGM/hV8_AQZrYn0/s1600/Untitled.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;109&quot; src=&quot;http://1.bp.blogspot.com/-1Ul_Ro71XAM/T7tE7AOyLjI/AAAAAAAAAGM/hV8_AQZrYn0/s320/Untitled.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
So inter racial marriages and children are the need of the
hour!! go for it!!&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tech-doodles.blogspot.com/feeds/8201190274300721916/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tech-doodles.blogspot.com/2012/05/dna-reshuffled.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7146009276796834082/posts/default/8201190274300721916'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7146009276796834082/posts/default/8201190274300721916'/><link rel='alternate' type='text/html' href='http://tech-doodles.blogspot.com/2012/05/dna-reshuffled.html' title='DNA Reshuffled!'/><author><name>Rachit Garg</name><uri>http://www.blogger.com/profile/12632649277817309542</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-1Ul_Ro71XAM/T7tE7AOyLjI/AAAAAAAAAGM/hV8_AQZrYn0/s72-c/Untitled.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7146009276796834082.post-2531639859028225154</id><published>2012-01-21T07:10:00.000-08:00</published><updated>2012-01-21T07:10:12.241-08:00</updated><title type='text'>Shannon!</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
One can predict, predict and predict unless the residue becomes perfect noise and that is the limit of compression, the Shannon limit!!&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tech-doodles.blogspot.com/feeds/2531639859028225154/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tech-doodles.blogspot.com/2012/01/shannon.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7146009276796834082/posts/default/2531639859028225154'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7146009276796834082/posts/default/2531639859028225154'/><link rel='alternate' type='text/html' href='http://tech-doodles.blogspot.com/2012/01/shannon.html' title='Shannon!'/><author><name>Rachit Garg</name><uri>http://www.blogger.com/profile/12632649277817309542</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7146009276796834082.post-286461370756301729</id><published>2012-01-14T00:20:00.000-08:00</published><updated>2012-01-14T00:20:06.957-08:00</updated><title type='text'>Denoise it!!</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
This algorithm may not be very competent but it still gave appreciable results as I made them on my own without any background on image processing. What I have done is, First found out the irregular value in 3X3 matrix, which could possibly be noise. By irregular value I mean, the value which is 20 (this factor can be varied to study its effect) units farther from its&amp;nbsp;neighborhood. Then we substitute the mean of regular values in the matrix to the irregular value.&lt;br /&gt;
&lt;br /&gt;
Below is the MATLAB code for the same and in the end the result. A 3 to 4dB gain in PSNR is observed. Cheers!!&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;a=imread(&#39;plane.jpg&#39;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;sze=1200;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;a=a(1:sze,1:sze,:);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;b=imnoise(a,&#39;gaussian&#39;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;c=b;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;d=a;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #660000; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: #660000;&quot;&gt;for&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt; rgb=1:3&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; rgb &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #274e13; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;% for R, G and B matrices&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;for&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt; i=2:sze-1&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; i;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;for&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt; j=2:sze-1&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; z=0;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; arr=zeros(3,3,3);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;for&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt; l=1:3&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;for&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt; n=1:3 &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;% if statement for neighborhood&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; pqr=0; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #274e13; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;% limit&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #660000;&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;((c(i-2+l,j-2+n,rgb))-c(i,j,rgb)&amp;lt;20 &amp;amp;&amp;amp; (c(i-2+l,j-2+n,rgb))-c(i,j,rgb)&amp;gt;-20)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; z=z+1;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; pqr=1;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; arr(l,n,rgb)=c(i-2+l,j-2+n,rgb); &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #660000; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt; end&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #660000; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; end&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #660000; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; end&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; c(i,j,rgb)=round((9/z)*(mean(mean(arr(1:3,1:3,rgb)))));&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #660000; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;end&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #660000; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;end&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #660000; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;end&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;imwrite(b,&#39;&lt;/span&gt;&lt;span style=&quot;color: #741b47; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;3noised.png&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&#39;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;imwrite(a,&#39;&lt;/span&gt;&lt;span style=&quot;color: #4c1130; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;3original.png&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&#39;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;imwrite(c,&#39;&lt;/span&gt;&lt;span style=&quot;color: #4c1130; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;3noise+myalgo.png&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&#39;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;error_diff = c - b; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;decibels=20*log10(255/(sqrt(mean(mean(error_diff.^2)))));&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;disp(sprintf(&#39;PSNR after reduction= +%5.2f dB&#39;,decibels)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;error_diff = b - a;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;decibels=20*log10(255/(sqrt(mean(mean(error_diff.^2)))));&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;disp(sprintf(&#39;PSNR of noised image = +%5.2f dB&#39;,decibels))&lt;/span&gt;&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://2.bp.blogspot.com/-07H45yGenL4/TxExb2wPzoI/AAAAAAAAAEs/gzpPoWKRrKE/s1600/3original.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;http://2.bp.blogspot.com/-07H45yGenL4/TxExb2wPzoI/AAAAAAAAAEs/gzpPoWKRrKE/s320/3original.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;original Image&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://4.bp.blogspot.com/-W5toBfN1olM/TxExhcxVbJI/AAAAAAAAAE0/feSHLRgZC1Q/s1600/3noised.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;http://4.bp.blogspot.com/-W5toBfN1olM/TxExhcxVbJI/AAAAAAAAAE0/feSHLRgZC1Q/s320/3noised.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Noised Image&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://4.bp.blogspot.com/-mwtVi1HIuQQ/TxExtiEChYI/AAAAAAAAAE8/cCtjwAk1mc8/s1600/3noise%252Bmyalgo.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;http://4.bp.blogspot.com/-mwtVi1HIuQQ/TxExtiEChYI/AAAAAAAAAE8/cCtjwAk1mc8/s320/3noise%252Bmyalgo.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Noised image, denoised!&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-5iP0iPRRgF0/TxE44jnAb4I/AAAAAAAAAFE/u67E-hpgD24/s1600/2noise%252Bmyalgo.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;200&quot; src=&quot;http://1.bp.blogspot.com/-5iP0iPRRgF0/TxE44jnAb4I/AAAAAAAAAFE/u67E-hpgD24/s320/2noise%252Bmyalgo.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;font-size: 13px;&quot;&gt;Quater image denoised&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br class=&quot;Apple-interchange-newline&quot; /&gt;&lt;br /&gt;&lt;div&gt;
&lt;div style=&quot;font-size: medium; text-align: left;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; font-size: medium;&quot;&gt;
&lt;a href=&quot;http://3.bp.blogspot.com/-RQmgbmhIsaI/TxE5G9PnpeI/AAAAAAAAAFM/WjD8WQlTrQ0/s1600/2changecaused.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;200&quot; src=&quot;http://3.bp.blogspot.com/-RQmgbmhIsaI/TxE5G9PnpeI/AAAAAAAAAFM/WjD8WQlTrQ0/s320/2changecaused.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
removed noise!!&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tech-doodles.blogspot.com/feeds/286461370756301729/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tech-doodles.blogspot.com/2012/01/denoise-it.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7146009276796834082/posts/default/286461370756301729'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7146009276796834082/posts/default/286461370756301729'/><link rel='alternate' type='text/html' href='http://tech-doodles.blogspot.com/2012/01/denoise-it.html' title='Denoise it!!'/><author><name>Rachit Garg</name><uri>http://www.blogger.com/profile/12632649277817309542</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/-07H45yGenL4/TxExb2wPzoI/AAAAAAAAAEs/gzpPoWKRrKE/s72-c/3original.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7146009276796834082.post-1255124464304851854</id><published>2012-01-05T11:07:00.000-08:00</published><updated>2012-01-05T11:07:53.732-08:00</updated><title type='text'>The Colours!!</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
See the world around us! Its beautiful, isn&#39;t it? Why?&lt;br /&gt;
I guess beauty is defined as correct composition of shapes and colors that somehow appears nice to our mind, even if you cant perceive it. Now just look around you and observe the no. of colors you might see. For example I can see my roommate in &lt;span style=&quot;color: #6aa84f;&quot;&gt;green&lt;/span&gt; jacket, the color of wall of my hostel room - &lt;span style=&quot;color: #f1c232;&quot;&gt;Yellow&lt;/span&gt;, the table - &lt;span style=&quot;color: #660000;&quot;&gt;Brown&lt;/span&gt;, my pillow cover - &lt;span style=&quot;color: #0b5394;&quot;&gt;Blue&lt;/span&gt;. I mean we are just covered with millions of colors.&lt;br /&gt;
And the strangest thing majority of elements which, surprisingly comprises of more than 99% of Universe, more than 90% of earth&#39;s crust, the s and p block elements are either &lt;span style=&quot;background-color: black;&quot;&gt;&lt;span style=&quot;color: white;&quot;&gt;colorless or white&lt;/span&gt;&lt;/span&gt;. The f block is too radio active to be around us.&lt;br /&gt;
So it is &lt;span style=&quot;color: purple;&quot;&gt;d&lt;/span&gt; block elements that surround us and adds colors to our life. The surroundings of yours wouldn&#39;t be as colorful as they are without the presence of these &lt;span style=&quot;color: purple;&quot;&gt;d&lt;/span&gt; block elements. These small percentage mass of earth&#39;s crust has somehow become so important that the earth; leave earth, even our imaginations, our dreams wouldn&#39;t be as beautiful as they are, so colorful, so beautiful and so happening. &amp;nbsp;We must respect nature for all it has given to us and keep our search on, to unveil the secrets.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tech-doodles.blogspot.com/feeds/1255124464304851854/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tech-doodles.blogspot.com/2012/01/colours.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7146009276796834082/posts/default/1255124464304851854'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7146009276796834082/posts/default/1255124464304851854'/><link rel='alternate' type='text/html' href='http://tech-doodles.blogspot.com/2012/01/colours.html' title='The Colours!!'/><author><name>Rachit Garg</name><uri>http://www.blogger.com/profile/12632649277817309542</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7146009276796834082.post-368084650725913841</id><published>2011-07-02T03:17:00.000-07:00</published><updated>2011-07-02T03:22:24.792-07:00</updated><title type='text'>Dropping the stone!!</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Its a rainy season in India, and standing by my balcony, I saw the beautiful patterns made by falling droplets on the pond..&lt;br /&gt;
10 minutes on matlab landed me to this image!!&lt;br /&gt;
Now the waves are sinusoidal so I started with sine wave multiplied with log so that the amplitude decreases with distance!!&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;, sans-serif;&quot;&gt;a=imread(&#39;lena.jpg&#39;);&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;, sans-serif;&quot;&gt;&lt;span style=&quot;color: #a64d79;&quot;&gt;for&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;, sans-serif;&quot;&gt; i=1:1028&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: purple;&quot;&gt;for&lt;/span&gt; j=1:1028&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;, sans-serif;&quot;&gt;&amp;nbsp;           &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;d=1000*sqrt((i-125)^2+(j-355)^2);&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;, sans-serif;&quot;&gt;&amp;nbsp;           &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;a(i,j)=(log10(d)-6)*sin(d/5000)*21+128;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;, sans-serif;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;end&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;, sans-serif;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;end&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;, sans-serif;&quot;&gt;imshow(a);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times&amp;quot;, &amp;quot;Times New Roman&amp;quot;, serif;&quot;&gt;The centre taken is (125,355)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times&amp;quot;, &amp;quot;Times New Roman&amp;quot;, serif;&quot;&gt;I am reading lena.jpg. You can read any image file you want..&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times&amp;quot;, &amp;quot;Times New Roman&amp;quot;, serif;&quot;&gt;The only use of reading this is to make an array in jpg format. &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://4.bp.blogspot.com/-WJcAhALEZ3Q/Tg7vpgHu9bI/AAAAAAAAAD0/VlE8le1t4zQ/s1600/stone.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;http://4.bp.blogspot.com/-WJcAhALEZ3Q/Tg7vpgHu9bI/AAAAAAAAAD0/VlE8le1t4zQ/s320/stone.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times&amp;quot;, &amp;quot;Times New Roman&amp;quot;, serif;&quot;&gt;You can change the parameters and scaling factors to &amp;nbsp;see very interesting results!!&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times&amp;quot;, &amp;quot;Times New Roman&amp;quot;, serif;&quot;&gt;It looks like Newton&#39;s Rings&#39;, Isn&#39;t it??&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;, sans-serif;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tech-doodles.blogspot.com/feeds/368084650725913841/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tech-doodles.blogspot.com/2011/07/dropping-stone.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7146009276796834082/posts/default/368084650725913841'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7146009276796834082/posts/default/368084650725913841'/><link rel='alternate' type='text/html' href='http://tech-doodles.blogspot.com/2011/07/dropping-stone.html' title='Dropping the stone!!'/><author><name>Rachit Garg</name><uri>http://www.blogger.com/profile/12632649277817309542</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/-WJcAhALEZ3Q/Tg7vpgHu9bI/AAAAAAAAAD0/VlE8le1t4zQ/s72-c/stone.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7146009276796834082.post-5991852206232979884</id><published>2011-05-14T09:41:00.000-07:00</published><updated>2011-05-24T07:59:57.437-07:00</updated><title type='text'>Swinging the pendulum!!!</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Watching the dell dock&#39;s swinging application challenged me as I saw matlab&#39;s icon swinging like pendulum.&lt;br /&gt;
I decided to make an object swing like simple pendulum on matlab.&lt;br /&gt;
&lt;br /&gt;
Sounds easy, isn&#39;t it??? That&#39;s what I thought before starting to work..&lt;br /&gt;
But the pursuit took me from coordinate geometry to physics to differential equations and back to matlab...&lt;br /&gt;
&lt;br /&gt;
First what I did was, used pythagoras theorem to compute the row coordinate while varying the column coordinate LINEARLY, and colored the neighborhood of equation describing the line segment joining the fixed point and computed coordinates. I thought it would work perfectly fine, But it looked strange, nowhere near the motion of a pendulum.&lt;br /&gt;
&lt;br /&gt;
Here is that code.... check this out!!!&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;color: #351c75; font-size: x-small;&quot;&gt;clear;&lt;br /&gt;a=zeros(150,400,3);&lt;br /&gt;len=100;&lt;br /&gt;t=0;&lt;br /&gt;p=-len;&lt;br /&gt;cir=zeros(150,400,3);&lt;br /&gt;mov=zeros(150,400,3,2*len+1);&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;color: #990000; font-size: x-small;&quot;&gt;for&lt;/span&gt;&lt;span style=&quot;color: #351c75; font-size: x-small;&quot;&gt; i=200-len:200+len-2&lt;br /&gt;&amp;nbsp;   &amp;nbsp; a=cir;&lt;br /&gt;&amp;nbsp;   &amp;nbsp; p=p+1; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #38761d; font-size: x-small;&quot;&gt;% linear increment of column coordinate.&lt;/span&gt;&lt;span style=&quot;color: #351c75; font-size: x-small;&quot;&gt;&lt;br /&gt;&amp;nbsp;   &amp;nbsp; j=round(sqrt((len*len)-(p*p))); &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #38761d; font-size: x-small;&quot;&gt;% pythagoras theorem&lt;/span&gt;&lt;span style=&quot;color: #351c75; font-size: x-small;&quot;&gt;.&lt;br /&gt;&amp;nbsp;  &amp;nbsp; cir(j:j+1,i:i+1,2)=123;&lt;br /&gt;&amp;nbsp;   &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #990000; font-size: x-small;&quot;&gt;for&lt;/span&gt;&lt;span style=&quot;color: #351c75; font-size: x-small;&quot;&gt; r=2:j&lt;br /&gt;&amp;nbsp;       &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #990000; font-size: x-small;&quot;&gt;for&lt;/span&gt;&lt;span style=&quot;color: #351c75; font-size: x-small;&quot;&gt; s=200-len:200+len&lt;br /&gt;&amp;nbsp;           &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #990000; font-size: x-small;&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;color: #351c75; font-size: x-small;&quot;&gt;((s-200)*j-r*(i-200)&amp;lt;100 &amp;amp;&amp;amp; (s-200)*j-r*(i-200)&amp;gt;-100)&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #351c75; font-size: x-small;&quot;&gt;&lt;br /&gt;&amp;nbsp;               &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; a(r-1:r+1,s-1:s+1,3)=255; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #38761d; font-size: x-small;&quot;&gt;%&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #38761d; font-size: x-small;&quot;&gt;coloring&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #38761d; font-size: x-small;&quot;&gt;neighborhood&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;
&lt;/span&gt;&lt;span style=&quot;color: #351c75; font-size: x-small;&quot;&gt;&lt;br /&gt;&amp;nbsp;               &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; a(r-1,s-1,2)=123; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #38761d; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; % of line segment&lt;/span&gt;&lt;span style=&quot;color: #351c75; font-size: x-small;&quot;&gt;&lt;br /&gt;&amp;nbsp;               &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; t=t+1;&lt;br /&gt;&amp;nbsp;           &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #990000; font-size: x-small;&quot;&gt;end&lt;br /&gt;&amp;nbsp;       &amp;nbsp; &amp;nbsp; &amp;nbsp; end&lt;br /&gt;&amp;nbsp;   &amp;nbsp; end&lt;/span&gt;&lt;span style=&quot;color: #351c75; font-size: x-small;&quot;&gt;&lt;br /&gt;&amp;nbsp;    &amp;nbsp; mov(1:101,1:400,1:3,i-200+len+1)=a(1:101,1:400,1:3);&lt;/span&gt;&lt;span style=&quot;color: #990000; font-size: x-small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;color: #990000; font-size: x-small;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #351c75; font-size: x-small;&quot;&gt;&lt;br /&gt;mov1=immovie(mov);&lt;br /&gt;implay(mov1,20);&lt;br /&gt;clear&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Georgia&amp;quot;, &amp;quot;Times New Roman&amp;quot;, serif;&quot;&gt;Now the aim was to match the motion with the motion of pendulum.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Georgia&amp;quot;, &amp;quot;Times New Roman&amp;quot;, serif;&quot;&gt;The challenge lied in incrementing time linearly and varying the column coordinate with respect to time in accordance with the force equations of a pendulum.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Georgia&amp;quot;, &amp;quot;Times New Roman&amp;quot;, serif;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Georgia&amp;quot;, &amp;quot;Times New Roman&amp;quot;, serif;&quot;&gt;Here is the solution---&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Georgia&amp;quot;, &amp;quot;Times New Roman&amp;quot;, serif;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Georgia&amp;quot;, &amp;quot;Times New Roman&amp;quot;, serif;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Georgia&amp;quot;, &amp;quot;Times New Roman&amp;quot;, serif;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Georgia&amp;quot;, &amp;quot;Times New Roman&amp;quot;, serif;&quot;&gt;&amp;nbsp;Free body diagram of the problem--&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4jX1MnJ61tJxajuIz7UvuTROXRZ1GbUGAYpsR5LxBEn8SrWzm3ACjWQX5RRnu54YrspHP446eJb9JB95Wp-A68GX4pg2oLyoHEBTsgGCPyiunFchLQGPmHolWDLBDYQEUi28FPKnwZHY/s1600/15052011.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4jX1MnJ61tJxajuIz7UvuTROXRZ1GbUGAYpsR5LxBEn8SrWzm3ACjWQX5RRnu54YrspHP446eJb9JB95Wp-A68GX4pg2oLyoHEBTsgGCPyiunFchLQGPmHolWDLBDYQEUi28FPKnwZHY/s320/15052011.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6p0EkbqV-HqnRNLSsil0TAGTb1dwvAEA4DmcQtKN99K3-jQubePHqC3_piAs09IC9SPnwDkMeAXROY0EpeaoWuJN2IabV7PluAFCZ2smK9LFJWs4k1CDhQWM8g283-pK7u_ouNNlIytU/s1600/15052011%2528001%2529.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;br /&gt;&lt;/a&gt;&lt;/div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Georgia&amp;quot;, &amp;quot;Times New Roman&amp;quot;, serif;&quot;&gt;&amp;nbsp;where-&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Georgia&amp;quot;, &amp;quot;Times New Roman&amp;quot;, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&#39;L&#39; is length of the thread.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Georgia&amp;quot;, &amp;quot;Times New Roman&amp;quot;, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&#39;Φ&#39; is angle subtended by thread.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Georgia&amp;quot;, &amp;quot;Times New Roman&amp;quot;, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&#39;m&#39; is the mass of the pendulum.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Georgia&amp;quot;, &amp;quot;Times New Roman&amp;quot;, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&#39;T&#39; is the tension in the string.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Georgia&amp;quot;, &amp;quot;Times New Roman&amp;quot;, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&#39;g&#39; is the acceleration due to gravity.&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Georgia&amp;quot;, &amp;quot;Times New Roman&amp;quot;, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Georgia&amp;quot;, &amp;quot;Times New Roman&amp;quot;, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&#39;x&#39; is the column coordinate.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Georgia&amp;quot;, &amp;quot;Times New Roman&amp;quot;, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&#39;y&#39; is the row coordinate.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Georgia&amp;quot;, &amp;quot;Times New Roman&amp;quot;, serif;&quot;&gt;Variables of concern--&amp;nbsp;
&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6p0EkbqV-HqnRNLSsil0TAGTb1dwvAEA4DmcQtKN99K3-jQubePHqC3_piAs09IC9SPnwDkMeAXROY0EpeaoWuJN2IabV7PluAFCZ2smK9LFJWs4k1CDhQWM8g283-pK7u_ouNNlIytU/s1600/15052011%2528001%2529.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6p0EkbqV-HqnRNLSsil0TAGTb1dwvAEA4DmcQtKN99K3-jQubePHqC3_piAs09IC9SPnwDkMeAXROY0EpeaoWuJN2IabV7PluAFCZ2smK9LFJWs4k1CDhQWM8g283-pK7u_ouNNlIytU/s320/15052011%2528001%2529.jpg&quot; width=&quot;240&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXW5CXDasAE4vYSIKa7Me90HfjJIDZU4_k4X0S49T0-LDqhfXN-1AUwRLRmpGs-w8R-rBnWWy79qdMX-Qdab84nkLuRud5KyYcKlS_Ojow44FdlQkAkLu7V8Q8U4obT9RErHsrCrRmboU/s1600/15052011%2528003%2529.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Georgia&amp;quot;, &amp;quot;Times New Roman&amp;quot;, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: &amp;quot;Georgia&amp;quot;, &amp;quot;Times New Roman&amp;quot;, serif;&quot;&gt;&amp;nbsp;it represent displacement, velocity and acceleration in x and y directions resp.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Georgia&amp;quot;, &amp;quot;Times New Roman&amp;quot;, serif;&quot;&gt;Solving the force equation from the free body diagram.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEigSf5ItPXggXQjW4mvYJ78pCyRsTLDluQjV2ShxOvhq2MvuYU6Uo7cxz2VQhNLvltT2La75zZvq-Vihte-sUEIsxFVOceCWyiadZ2eUHwqC8-QgFJH4Vjr6ro36MAN1ED0FPULVplnNgs/s1600/15052011%2528002%2529.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEigSf5ItPXggXQjW4mvYJ78pCyRsTLDluQjV2ShxOvhq2MvuYU6Uo7cxz2VQhNLvltT2La75zZvq-Vihte-sUEIsxFVOceCWyiadZ2eUHwqC8-QgFJH4Vjr6ro36MAN1ED0FPULVplnNgs/s320/15052011%2528002%2529.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Georgia&amp;quot;, &amp;quot;Times New Roman&amp;quot;, serif;&quot;&gt;where&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Georgia&amp;quot;, &amp;quot;Times New Roman&amp;quot;, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&#39;ay&#39; is acceleration downwards&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Georgia&amp;quot;, &amp;quot;Times New Roman&amp;quot;, serif;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Georgia&amp;quot;, &amp;quot;Times New Roman&amp;quot;, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&#39;ax&#39; is acceleration toward right.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Georgia&amp;quot;, &amp;quot;Times New Roman&amp;quot;, serif;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Georgia&amp;quot;, &amp;quot;Times New Roman&amp;quot;, serif;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Georgia&amp;quot;, &amp;quot;Times New Roman&amp;quot;, serif;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Georgia&amp;quot;, &amp;quot;Times New Roman&amp;quot;, serif;&quot;&gt;Substituting the values and solving,&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Georgia&amp;quot;, &amp;quot;Times New Roman&amp;quot;, serif;&quot;&gt;&amp;nbsp;we get solution(t&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Georgia&amp;quot;, &amp;quot;Times New Roman&amp;quot;, serif;&quot;&gt;he first equation in image&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Georgia&amp;quot;, &amp;quot;Times New Roman&amp;quot;, serif;&quot;&gt;) via Lagrange&#39;s equation.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXW5CXDasAE4vYSIKa7Me90HfjJIDZU4_k4X0S49T0-LDqhfXN-1AUwRLRmpGs-w8R-rBnWWy79qdMX-Qdab84nkLuRud5KyYcKlS_Ojow44FdlQkAkLu7V8Q8U4obT9RErHsrCrRmboU/s1600/15052011%2528003%2529.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXW5CXDasAE4vYSIKa7Me90HfjJIDZU4_k4X0S49T0-LDqhfXN-1AUwRLRmpGs-w8R-rBnWWy79qdMX-Qdab84nkLuRud5KyYcKlS_Ojow44FdlQkAkLu7V8Q8U4obT9RErHsrCrRmboU/s320/15052011%2528003%2529.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Georgia&amp;quot;, &amp;quot;Times New Roman&amp;quot;, serif;&quot;&gt;Finding the constants of the differential equation by putting the initial conditions of velocity and displacement.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Georgia&amp;quot;, &amp;quot;Times New Roman&amp;quot;, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, &amp;quot;Courier&amp;quot;, monospace;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;clear;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;a=zeros(150,400,3);&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;len=100;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;t=0;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;cir=zeros(150,400,3);&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;mov=zeros(150,400,3,2*len+1);&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;i=0;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;j=round(sqrt((len*len)-(i*i)));&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;q=zeros(1,200);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, &amp;quot;Courier&amp;quot;, monospace;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, &amp;quot;Courier&amp;quot;, monospace;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;while&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, &amp;quot;Courier&amp;quot;, monospace;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; i&amp;lt;=len-2&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;   &amp;nbsp; i=round(len*sin(-1.4303*sin(t/68+(11/7))))&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;   &amp;nbsp; t=t+1;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;   &amp;nbsp; a=cir;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, &amp;quot;Courier&amp;quot;, monospace;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, &amp;quot;Courier&amp;quot;, monospace;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;   &amp;nbsp; j=round(sqrt((len*len)-(i*i)));&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;   &amp;nbsp; cir(j:j+1,i+200:i+201,2)=123;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;   &amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, &amp;quot;Courier&amp;quot;, monospace;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;for&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, &amp;quot;Courier&amp;quot;, monospace;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;(r=2:j)&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;       &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, &amp;quot;Courier&amp;quot;, monospace;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt; for&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, &amp;quot;Courier&amp;quot;, monospace;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; s=200-len:200+len&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;           &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, &amp;quot;Courier&amp;quot;, monospace;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;if&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, &amp;quot;Courier&amp;quot;, monospace;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;((s-200)*j-r*(i)&amp;lt;75 &amp;amp;&amp;amp; (s-200)*j-r*(i)&amp;gt;-75)&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;               &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; a(r-1:r+1,s-1:s+1,3)=255;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;               &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; a(r-1,s-1,2)=123;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;           &amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #990000;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, &amp;quot;Courier&amp;quot;, monospace;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; end&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;       &amp;nbsp; &amp;nbsp; &amp;nbsp; end&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;   &amp;nbsp; end&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, &amp;quot;Courier&amp;quot;, monospace;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;    &amp;nbsp; mov(1:101,1:400,1:3,t)=a(1:101,1:400,1:3);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, &amp;quot;Courier&amp;quot;, monospace;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;end&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, &amp;quot;Courier&amp;quot;, monospace;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;mov1=immovie(mov);&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;implay(mov1,50);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Georgia&amp;quot;, &amp;quot;Times New Roman&amp;quot;, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Georgia&amp;quot;, &amp;quot;Times New Roman&amp;quot;, serif;&quot;&gt;&lt;br /&gt;        &lt;br /&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div align=&quot;left&quot; class=&quot;&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Georgia&amp;quot;, &amp;quot;Times New Roman&amp;quot;, serif;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Georgia&amp;quot;, &amp;quot;Times New Roman&amp;quot;, serif;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;left&quot; class=&quot;&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Georgia&amp;quot;, &amp;quot;Times New Roman&amp;quot;, serif;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Georgia&amp;quot;, &amp;quot;Times New Roman&amp;quot;, serif;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tech-doodles.blogspot.com/feeds/5991852206232979884/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tech-doodles.blogspot.com/2011/05/swinging-pendulum.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7146009276796834082/posts/default/5991852206232979884'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7146009276796834082/posts/default/5991852206232979884'/><link rel='alternate' type='text/html' href='http://tech-doodles.blogspot.com/2011/05/swinging-pendulum.html' title='Swinging the pendulum!!!'/><author><name>Rachit Garg</name><uri>http://www.blogger.com/profile/12632649277817309542</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4jX1MnJ61tJxajuIz7UvuTROXRZ1GbUGAYpsR5LxBEn8SrWzm3ACjWQX5RRnu54YrspHP446eJb9JB95Wp-A68GX4pg2oLyoHEBTsgGCPyiunFchLQGPmHolWDLBDYQEUi28FPKnwZHY/s72-c/15052011.jpg" height="72" width="72"/><thr:total>0</thr:total></entry></feed>