{"id":186,"date":"2008-01-21T12:58:29","date_gmt":"2008-01-21T17:58:29","guid":{"rendered":"http:\/\/www.pixelwit.com\/blog\/2008\/01\/21\/swing-pendulum-arc\/"},"modified":"2009-08-14T17:54:05","modified_gmt":"2009-08-14T22:54:05","slug":"swing-pendulum-arc","status":"publish","type":"post","link":"https:\/\/www.pixelwit.com\/blog\/2008\/01\/21\/swing-pendulum-arc\/","title":{"rendered":"How to Swing a Pendulum Arc"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.pixelwit.com\/blog\/wp-content\/uploads\/2008\/08\/pendulum-path.png\" alt=\"\" title=\"Pendulum Path\" width=\"264\" height=\"184\" class=\"alignnone size-full wp-image-466\" \/><\/p>\n<p>In my previous article explaining <a title=\"ActionScript Arc Drawing Tutorial\" href=\"https:\/\/www.pixelwit.com\/blog\/2007\/07\/draw-an-arc-with-actionscript\/\">How to Draw an Arc with ActionScript<\/a> a few readers asked how to simulate the swing of a pendulum or the swaying motion of a falling leaf.  Hopefully this tutorial will add a little insight into that process.  The technique I&#8217;ll be using won&#8217;t mimic the effects of gravity but will be more similar to the metered swing of a clock&#8217;s pendulum or a large <a title=\"Arrrgh Me Matey\" href=\"http:\/\/www.kennywood.com\/img\/ride_photos\/pirate_2lg.jpg\">carnival ride<\/a>.<br \/>\n<strong><br \/>\nObservations<\/strong>: Before we start writing any code, let&#8217;s make a few general observations.  If you were to swing a pendulum from right to left, you could note the following:<\/p>\n<ol>\n<li>Once the pendulum is dropped or released, it begins to pick up speed as it approaches the bottom of its arc.  This gradual acceleration is similar to &#8220;Easing In&#8221;.<\/li>\n<li>Once the pendulum passes the bottom of its arc, it begins to swing upward and consequently slows down which is similar to &#8220;Easing Out&#8221;.<\/li>\n<li>Once the pendulum reaches the top of its arc on the left, it begins to swing backwards from left to right.  The swing from left to right is a mirror image of the previous swing from right to left.<\/li>\n<\/ol>\n<p><strong>Conventions<\/strong>: With those observations in mind we can start<!--more--> hammering out some conventions to simplify the writing of our Pendulum function.  <\/p>\n<ol>\n<li>When the pendulum is at the bottom of its arc it can be assumed to be at an angle of 0.<\/li>\n<li>To swing the pendulum, we need to know how high to lift it, or if you want to get all fancy about it, we need to know its &#8220;Angle Of Inclination&#8221;.  We&#8217;ll call this AOI.<\/li>\n<li>Once you know the AOI, you can describe the pendulum&#8217;s position as being anywhere between -1 * AOI (full left raised position) to +1 * AOI (full right raised position).<\/li>\n<li>There are many ways to describe angles but, because I&#8217;m a <a title=\"Family Foto\" href=\"http:\/\/www.noirfilm.com\/freaks_1.jpg\">freak<\/a>, I like to use ratios between 0 and 1.  Zero represents no rotation while 1 represents one full rotation or 360 degrees.  An angle of 90 degrees would be described as .25 or similarly 90\/360<\/li>\n<\/ol>\n<p><strong>Deductions<\/strong>: With our observations and conventions in hand we can start visualizing what we will need to make everything &#8220;go&#8221;.<\/p>\n<ol>\n<li>To swing from right to left we need to generate values from +1 to -1.<\/li>\n<li>To swing from left to right we need to generate values from -1 to +1.<\/li>\n<li>The values generated need to be eased.  <strong>More<\/strong> easing when near -1 or +1.  <strong>Less<\/strong> easing when near 0.<\/li>\n<\/ol>\n<p>Achieving all of the above goals may seem like a fairly daunting task until you realize that this is a problem that you solve every time you draw a circle.  In my <a href=\"https:\/\/www.pixelwit.com\/blog\/2007\/06\/basic-circle-drawing-actionscript\/\">How to Draw a Circle tutorial<\/a> I discussed a Magic Trig Function which just <em>happens<\/em> to be the perfect mechanism for driving the &#8220;swing&#8221; of our pendulum.  Let&#8217;s take a look at this <em>Magic<\/em> function shall we?  I think we shall&#8230;<\/p>\n<div class=\"codecolorer-container actionscript default\" style=\"overflow:auto;white-space:nowrap;width:100%;\"><div class=\"actionscript codecolorer\"><span class=\"co1\">\/\/<\/span><br \/>\n<span class=\"co1\">\/\/<\/span><br \/>\n<span class=\"kw2\">function<\/span> magicTrigFunction <span class=\"br0\">&#40;<\/span>pointRatio<span class=\"br0\">&#41;<\/span><span class=\"br0\">&#123;<\/span><br \/>\n&nbsp; &nbsp; <span class=\"kw1\">return<\/span> <span class=\"kw3\">Math<\/span>.<span class=\"kw3\">cos<\/span><span class=\"br0\">&#40;<\/span>pointRatio<span class=\"sy0\">*<\/span><span class=\"nu0\">2<\/span><span class=\"sy0\">*<\/span><span class=\"kw3\">Math<\/span>.<span class=\"kw3\">PI<\/span><span class=\"br0\">&#41;<\/span>;<br \/>\n<span class=\"br0\">&#125;<\/span><br \/>\n<span class=\"kw1\">for<\/span><span class=\"br0\">&#40;<\/span><span class=\"kw2\">var<\/span> i=<span class=\"nu0\">0<\/span>; i<span class=\"sy0\">&lt;<\/span>=<span class=\"nu0\">22<\/span>; i++<span class=\"br0\">&#41;<\/span><span class=\"br0\">&#123;<\/span><br \/>\n&nbsp; &nbsp; <span class=\"co1\">\/\/ Input numbers between 0 and 1.<\/span><br \/>\n&nbsp; &nbsp; <span class=\"kw2\">var<\/span> ratio = i<span class=\"sy0\">\/<\/span><span class=\"nu0\">22<\/span>;<br \/>\n&nbsp; &nbsp; <span class=\"co1\">\/\/ Output eased values between -1 an +1.<\/span><br \/>\n&nbsp; &nbsp; <span class=\"kw3\">trace<\/span><span class=\"br0\">&#40;<\/span>magicTrigFunction<span class=\"br0\">&#40;<\/span>ratio<span class=\"br0\">&#41;<\/span><span class=\"br0\">&#41;<\/span>;<br \/>\n<span class=\"br0\">&#125;<\/span><br \/>\n<span class=\"co1\">\/\/<\/span><br \/>\n<span class=\"co1\">\/\/<\/span><\/div><\/div>\n<p>Running the above code will produce the following results:<\/p>\n<div class=\"codecolorer-container text default\" style=\"overflow:auto;white-space:nowrap;width:100%;\"><div class=\"text codecolorer\">1<br \/>\n0.959492973614497<br \/>\n0.841253532831181<br \/>\n0.654860733945285<br \/>\n0.415415013001886<br \/>\n0.142314838273285<br \/>\n-0.142314838273285<br \/>\n-0.415415013001886<br \/>\n-0.654860733945285<br \/>\n-0.841253532831181<br \/>\n-0.959492973614497<br \/>\n-1<br \/>\n-0.959492973614497<br \/>\n-0.841253532831181<br \/>\n-0.654860733945285<br \/>\n-0.415415013001887<br \/>\n-0.142314838273285<br \/>\n0.142314838273285<br \/>\n0.415415013001887<br \/>\n0.654860733945285<br \/>\n0.841253532831181<br \/>\n0.959492973614497<br \/>\n1<\/div><\/div>\n<p>As you can see, the returned values go from +1 through 0 to -1 and then they reverse back through 0 to +1.  That&#8217;s just what we need, and to put icing on the cake, the values are being eased the right way at the right time.  Changes in values near 0 are large while changes near -1 and +1 are small.  Perfect.<\/p>\n<p><strong>Arguments<\/strong>: Now that we understand the mechanism that will swing the pendulum, it&#8217;s time to think about the arguments we must give to our pendulum function.  We&#8217;ll need a center for the pendulum to swing from, this will be noted with &#8220;centerX&#8221; and &#8220;centerY&#8221;.  We&#8217;ll also need to know the distance of the pendulum form center, we&#8217;ll call this &#8220;radius&#8221;.  Next we&#8217;ll need to know the maximum Angle Of Inclination (how far the pendulum swings), we&#8217;ll call this &#8220;aoi&#8221;. <\/p>\n<p>The next argument we&#8217;ll need to provide is a &#8220;ratio of completion&#8221;.  The position of the pendulum depends on the time it was set into motion so we must keep track of the amount of time that the pendulum has been swinging.<\/p>\n<ul>\n<li>Before you release the pendulum, it has a &#8220;completion ratio&#8221; of 0.<\/li>\n<li>After the pendulum is released, as it reaches the bottom of its swing it will have a completion ratio of .25.<\/li>\n<li>Once the pendulum reaches its maximum height on the opposite side it will have a completion ratio of .5.<\/li>\n<li>After reaching the opposite side, the pendulum swings back towards its starting position.  As the pendulum reaches the bottom of this swing it will have a completion ratio of .75.<\/li>\n<li>When the pendulum swings all the way back to the height of its starting position, it can be said to have a completion ratio of 1.<\/li>\n<\/ul>\n<p>Measuring this change in time is what will drive the pendulum animation.<\/p>\n<p>So now we can see that the pendulum function will have the following arguments:<\/p>\n<div class=\"codecolorer-container actionscript default\" style=\"overflow:auto;white-space:nowrap;width:100%;\"><div class=\"actionscript codecolorer\"><span class=\"co1\">\/\/<\/span><br \/>\n<span class=\"co1\">\/\/<\/span><br \/>\n<span class=\"kw2\">function<\/span> pendulum <span class=\"br0\">&#40;<\/span>centerX, centerY, radius, aoi, completionRatio<span class=\"br0\">&#41;<\/span><span class=\"br0\">&#123;<\/span><br \/>\n&nbsp; &nbsp; <span class=\"co1\">\/\/Some Code.<\/span><br \/>\n<span class=\"br0\">&#125;<\/span><br \/>\n<span class=\"co1\">\/\/<\/span><br \/>\n<span class=\"co1\">\/\/<\/span><\/div><\/div>\n<p><strong>Doin&#8217; It<\/strong>: It has taken quite a while to get to this point, but now that we&#8217;ve done most of the mental grunt work (Observations, Conventions, Deductions, Arguments) writing the actual code will be pretty easy.  You can follow along by reading the comments.<\/p>\n<div class=\"codecolorer-container actionscript default\" style=\"overflow:auto;white-space:nowrap;width:100%;height:700px;\"><div class=\"actionscript codecolorer\"><span class=\"co1\">\/\/<\/span><br \/>\n<span class=\"co1\">\/\/<\/span><br \/>\n<span class=\"co1\">\/\/<\/span><br \/>\n<span class=\"co1\">\/\/ Initial variables.<\/span><br \/>\n<span class=\"kw2\">var<\/span> pendX = <span class=\"nu0\">250<\/span>;<br \/>\n<span class=\"kw2\">var<\/span> pendY = <span class=\"nu0\">250<\/span>;<br \/>\n<span class=\"kw2\">var<\/span> pendRadius = <span class=\"nu0\">200<\/span>;<br \/>\n<span class=\"kw2\">var<\/span> pendArc = <span class=\"nu0\">135<\/span><span class=\"sy0\">\/<\/span><span class=\"nu0\">360<\/span>;<br \/>\n<span class=\"kw2\">var<\/span> pendSpeed = .005;<br \/>\n<span class=\"kw2\">var<\/span> pendCount = <span class=\"nu0\">0<\/span>;<br \/>\n<span class=\"co1\">\/\/<\/span><br \/>\n<span class=\"co1\">\/\/<\/span><br \/>\n<span class=\"co1\">\/\/<\/span><br \/>\n<span class=\"co1\">\/\/ Make a red footbal-shaped clip.<\/span><br \/>\n<span class=\"kw3\">createEmptyMovieClip<\/span><span class=\"br0\">&#40;<\/span><span class=\"st0\">&quot;Pendu&quot;<\/span>, <span class=\"nu0\">10<\/span><span class=\"br0\">&#41;<\/span>;<br \/>\n<span class=\"kw3\">with<\/span><span class=\"br0\">&#40;<\/span>Pendu<span class=\"br0\">&#41;<\/span><span class=\"br0\">&#123;<\/span><br \/>\n&nbsp; &nbsp; <span class=\"kw3\">beginFill<\/span><span class=\"br0\">&#40;<\/span>0xFF0000<span class=\"br0\">&#41;<\/span>;<br \/>\n&nbsp; &nbsp; <span class=\"kw3\">moveTo<\/span><span class=\"br0\">&#40;<\/span>-<span class=\"nu0\">20<\/span>, <span class=\"nu0\">0<\/span><span class=\"br0\">&#41;<\/span>;<br \/>\n&nbsp; &nbsp; <span class=\"kw3\">curveTo<\/span><span class=\"br0\">&#40;<\/span><span class=\"nu0\">0<\/span>, <span class=\"nu0\">15<\/span>, <span class=\"nu0\">20<\/span>, <span class=\"nu0\">0<\/span><span class=\"br0\">&#41;<\/span>;<br \/>\n&nbsp; &nbsp; <span class=\"kw3\">curveTo<\/span><span class=\"br0\">&#40;<\/span><span class=\"nu0\">0<\/span>, -<span class=\"nu0\">15<\/span>, -<span class=\"nu0\">20<\/span>, <span class=\"nu0\">0<\/span><span class=\"br0\">&#41;<\/span>;<br \/>\n<span class=\"br0\">&#125;<\/span><br \/>\n<span class=\"co1\">\/\/<\/span><br \/>\n<span class=\"co1\">\/\/ Make a clip in which to draw the stick holding the pendulum.<\/span><br \/>\n<span class=\"kw3\">createEmptyMovieClip<\/span><span class=\"br0\">&#40;<\/span><span class=\"st0\">&quot;Stick&quot;<\/span>, <span class=\"nu0\">5<\/span><span class=\"br0\">&#41;<\/span>;<br \/>\n<span class=\"co1\">\/\/<\/span><br \/>\n<span class=\"co1\">\/\/<\/span><br \/>\n<span class=\"co1\">\/\/<\/span><br \/>\n<span class=\"co1\">\/\/ Swing a point on an eased arc with the given properties.<\/span><br \/>\n<span class=\"kw2\">function<\/span> pendulum <span class=\"br0\">&#40;<\/span>centerX, centerY, radius, aoi, completionRatio<span class=\"br0\">&#41;<\/span><span class=\"br0\">&#123;<\/span><br \/>\n&nbsp; &nbsp; <span class=\"co1\">\/\/<\/span><br \/>\n&nbsp; &nbsp; <span class=\"co1\">\/\/ Use magic trig function to turn linear values between 0<\/span><br \/>\n&nbsp; &nbsp; <span class=\"co1\">\/\/ and 1 to eased values between -1 and +1.<\/span><br \/>\n&nbsp; &nbsp; <span class=\"kw2\">var<\/span> easedOneToNegOne = <span class=\"kw3\">Math<\/span>.<span class=\"kw3\">cos<\/span><span class=\"br0\">&#40;<\/span>completionRatio<span class=\"sy0\">*<\/span><span class=\"nu0\">2<\/span><span class=\"sy0\">*<\/span><span class=\"kw3\">Math<\/span>.<span class=\"kw3\">PI<\/span><span class=\"br0\">&#41;<\/span>;<br \/>\n&nbsp; &nbsp; <span class=\"co1\">\/\/<\/span><br \/>\n&nbsp; &nbsp; <span class=\"co1\">\/\/ Convert &quot;Angle Of Inclination&quot; from a ratio between 0<\/span><br \/>\n&nbsp; &nbsp; <span class=\"co1\">\/\/ and 1 to radians.<\/span><br \/>\n&nbsp; &nbsp; <span class=\"kw2\">var<\/span> aoiRadians = aoi <span class=\"sy0\">*<\/span> <span class=\"nu0\">2<\/span> <span class=\"sy0\">*<\/span> <span class=\"kw3\">Math<\/span>.<span class=\"kw3\">PI<\/span>;<br \/>\n&nbsp; &nbsp; <span class=\"co1\">\/\/<\/span><br \/>\n&nbsp; &nbsp; <span class=\"co1\">\/\/ Determine eased rotation of the pendulum in radians.<\/span><br \/>\n&nbsp; &nbsp; <span class=\"co1\">\/\/ Derived from #3 in the above &quot;Conventions&quot; section.<\/span><br \/>\n&nbsp; &nbsp; <span class=\"kw2\">var<\/span> currentRotation = easedOneToNegOne <span class=\"sy0\">*<\/span> aoiRadians;<br \/>\n&nbsp; &nbsp; <span class=\"co1\">\/\/<\/span><br \/>\n&nbsp; &nbsp; <span class=\"co1\">\/\/ Get X and Y coordinates of pendulum at eased angle of rotation.<\/span><br \/>\n&nbsp; &nbsp; <span class=\"kw2\">var<\/span> x = centerX + <span class=\"kw3\">Math<\/span>.<span class=\"kw3\">sin<\/span><span class=\"br0\">&#40;<\/span>currentRotation<span class=\"br0\">&#41;<\/span> <span class=\"sy0\">*<\/span> radius;<br \/>\n&nbsp; &nbsp; <span class=\"kw2\">var<\/span> y = centerY + <span class=\"kw3\">Math<\/span>.<span class=\"kw3\">cos<\/span><span class=\"br0\">&#40;<\/span>currentRotation<span class=\"br0\">&#41;<\/span> <span class=\"sy0\">*<\/span> radius;<br \/>\n&nbsp; &nbsp; <span class=\"co1\">\/\/<\/span><br \/>\n&nbsp; &nbsp; <span class=\"co1\">\/\/ Return both X and Y coordinates inside a single 'point' object.<\/span><br \/>\n&nbsp; &nbsp; <span class=\"kw1\">return<\/span> <span class=\"br0\">&#123;<\/span>x:x, y:y<span class=\"br0\">&#125;<\/span>;<br \/>\n<span class=\"br0\">&#125;<\/span><br \/>\n<span class=\"co1\">\/\/<\/span><br \/>\n<span class=\"co1\">\/\/<\/span><br \/>\n<span class=\"co1\">\/\/<\/span><br \/>\n<span class=\"co1\">\/\/ Advance the pendulum to its next position.<\/span><br \/>\n<span class=\"kw2\">function<\/span> swingPendulum <span class=\"br0\">&#40;<\/span><span class=\"br0\">&#41;<\/span><span class=\"br0\">&#123;<\/span><br \/>\n&nbsp; &nbsp; <span class=\"co1\">\/\/<\/span><br \/>\n&nbsp; &nbsp; <span class=\"co1\">\/\/ Increment the clock counter.<\/span><br \/>\n&nbsp; &nbsp; pendCount += pendSpeed;<br \/>\n&nbsp; &nbsp; pendCount <span class=\"sy0\">%<\/span>= <span class=\"nu0\">1<\/span>;<br \/>\n&nbsp; &nbsp; <span class=\"co1\">\/\/<\/span><br \/>\n&nbsp; &nbsp; <span class=\"co1\">\/\/ Get the pendulum's new coordinates.<\/span><br \/>\n&nbsp; &nbsp; <span class=\"kw2\">var<\/span> point = pendulum <span class=\"br0\">&#40;<\/span>pendX, pendY, pendRadius, pendArc, pendCount<span class=\"br0\">&#41;<\/span>;<br \/>\n&nbsp; &nbsp; <span class=\"co1\">\/\/<\/span><br \/>\n&nbsp; &nbsp; <span class=\"co1\">\/\/ Place the pendulum at its new coordinates.<\/span><br \/>\n&nbsp; &nbsp; Pendu.<span class=\"kw3\">_x<\/span> = point.<span class=\"me1\">x<\/span>;<br \/>\n&nbsp; &nbsp; Pendu.<span class=\"kw3\">_y<\/span> = point.<span class=\"me1\">y<\/span>;<br \/>\n&nbsp; &nbsp; <span class=\"co1\">\/\/<\/span><br \/>\n&nbsp; &nbsp; <span class=\"co1\">\/\/ Draw a line from the center to the pendulum.<\/span><br \/>\n&nbsp; &nbsp; <span class=\"kw3\">with<\/span> <span class=\"br0\">&#40;<\/span>Stick<span class=\"br0\">&#41;<\/span><span class=\"br0\">&#123;<\/span><br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; <span class=\"kw3\">clear<\/span><span class=\"br0\">&#40;<\/span><span class=\"br0\">&#41;<\/span>;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; <span class=\"kw3\">lineStyle<\/span><span class=\"br0\">&#40;<\/span><span class=\"nu0\">2<\/span>, <span class=\"nu0\">0<\/span><span class=\"br0\">&#41;<\/span>;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; <span class=\"kw3\">moveTo<\/span><span class=\"br0\">&#40;<\/span>pendX, pendY<span class=\"br0\">&#41;<\/span>;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; <span class=\"kw3\">lineTo<\/span><span class=\"br0\">&#40;<\/span>point.<span class=\"me1\">x<\/span>, point.<span class=\"me1\">y<\/span><span class=\"br0\">&#41;<\/span>;<br \/>\n&nbsp; &nbsp; <span class=\"br0\">&#125;<\/span><br \/>\n<span class=\"br0\">&#125;<\/span><br \/>\n<span class=\"co1\">\/\/<\/span><br \/>\n<span class=\"co1\">\/\/ Keep Swinging the pendulum every time we enter a frame.<\/span><br \/>\n<span class=\"kw3\">onEnterFrame<\/span> = swingPendulum;<br \/>\n<span class=\"co1\">\/\/<\/span><br \/>\n<span class=\"co1\">\/\/<\/span><br \/>\n<span class=\"co1\">\/\/<\/span><br \/>\n<span class=\"co1\">\/\/<\/span><\/div><\/div>\n<p>The above code will produce the following SWF:<\/p>\n\n<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\"\n\t\t\tid=\"fm_pendulumarc_02_1321464432\"\n\t\t\tclass=\"flashmovie\"\n\t\t\twidth=\"500\"\n\t\t\theight=\"500\">\n\t<param name=\"movie\" value=\"\/blog\/wp-content\/uploads\/2008\/01\/pendulumarc_02.swf\" \/>\n\t<!--[if !IE]>-->\n\t<object\ttype=\"application\/x-shockwave-flash\"\n\t\t\tdata=\"\/blog\/wp-content\/uploads\/2008\/01\/pendulumarc_02.swf\"\n\t\t\tname=\"fm_pendulumarc_02_1321464432\"\n\t\t\twidth=\"500\"\n\t\t\theight=\"500\">\n\t<!--<![endif]-->\n\t\t\n\t<!--[if !IE]>-->\n\t<\/object>\n\t<!--<![endif]-->\n<\/object>\n<p>And so it goes.  One pendulum swinging in an arc.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A detailed Flash tutorial explaining one way to simulate the swing of a pendulum with ActionScript and the thought process involved in its creation.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0,"footnotes":""},"categories":[8],"tags":[23,45,36,37],"class_list":["post-186","post","type-post","status-publish","format-standard","hentry","category-flash","tag-actionscript","tag-draw","tag-swfs","tag-tutorial"],"_links":{"self":[{"href":"https:\/\/www.pixelwit.com\/blog\/wp-json\/wp\/v2\/posts\/186","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.pixelwit.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.pixelwit.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.pixelwit.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.pixelwit.com\/blog\/wp-json\/wp\/v2\/comments?post=186"}],"version-history":[{"count":0,"href":"https:\/\/www.pixelwit.com\/blog\/wp-json\/wp\/v2\/posts\/186\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.pixelwit.com\/blog\/wp-json\/wp\/v2\/media?parent=186"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.pixelwit.com\/blog\/wp-json\/wp\/v2\/categories?post=186"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.pixelwit.com\/blog\/wp-json\/wp\/v2\/tags?post=186"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}