{"id":415,"date":"2016-02-20T17:05:20","date_gmt":"2016-02-20T16:05:20","guid":{"rendered":"http:\/\/bulletin-board.de\/watchfaces\/?p=415"},"modified":"2016-06-18T13:49:49","modified_gmt":"2016-06-18T11:49:49","slug":"moving-around-the-easy-way","status":"publish","type":"post","link":"https:\/\/bulletin-board.de\/watchfaces\/moving-around-the-easy-way\/","title":{"rendered":"Moving around &#8211; the easy way"},"content":{"rendered":"<p>In my recent\u00a0articles <a href=\"http:\/\/bulletin-board.de\/watchfaces\/back-to-trigonometry\/\">Back to Trigonometry<\/a>\u00a0and\u00a0<a href=\"http:\/\/bulletin-board.de\/watchfaces\/move-objects-in-a-circle-smoothly\/\">Move objects in a circle smoothly<\/a>, I described a formula to move objects around a circle.<\/p>\n<p>Since WatchMaker also offers rotation values in degrees for time, we can simplify those formulas and make them more efficient to calculate.<\/p>\n<p>In the original formulas I&#8217;ve used <em>{ds}<\/em>, which represented the seconds in time, as the input value. It&#8217;s much easier to use the rotation value <em>{drs}<\/em> as input. The only thing to do is to convert the degree values to radian values which can be done by the formula <img decoding=\"async\" src=\"https:\/\/s0.wp.com\/latex.php?latex=drs+%2A+%5Cfrac%7B%5Cpi%7D%7B180%7D&#038;bg=ffffff&#038;fg=000&#038;s=0&#038;c=20201002\" alt=\"drs * &#92;frac{&#92;pi}{180}\" class=\"latex\" \/>. Lua script offers this conversion function <em>math.rad()<\/em> out of the box. The formula looks like this.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/s0.wp.com\/latex.php?latex=x+%3D+%5Csin%28radian%28drs%29%29&#038;bg=ffffff&#038;fg=000&#038;s=0&#038;c=20201002\" alt=\"x = &#92;sin(radian(drs))\" class=\"latex\" \/><br \/>\n<img decoding=\"async\" src=\"https:\/\/s0.wp.com\/latex.php?latex=y+%3D+-%5Ccos%28radian%28drs%29%29&#038;bg=ffffff&#038;fg=000&#038;s=0&#038;c=20201002\" alt=\"y = -&#92;cos(radian(drs))\" class=\"latex\" \/><\/p>\n<p>If you compare this with the other\u00a0formula, you immediately see the difference:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/s0.wp.com\/latex.php?latex=x+%3D+%5Ccos%28%28ds+%2A+%5Cfrac%7B1%7D%7B60%7D+%2A+2+%5Cpi%29+-+%5Cfrac%7B%5Cpi%7D%7B2%7D%29+%3D+%5Csin%28radian%28drs%29%29&#038;bg=ffffff&#038;fg=000&#038;s=0&#038;c=20201002\" alt=\"x = &#92;cos((ds * &#92;frac{1}{60} * 2 &#92;pi) - &#92;frac{&#92;pi}{2}) = &#92;sin(radian(drs))\" class=\"latex\" \/><br \/>\n<img decoding=\"async\" src=\"https:\/\/s0.wp.com\/latex.php?latex=y+%3D+%5Csin%28%28ds+%2A+%5Cfrac%7B1%7D%7B60%7D+%2A+2+%5Cpi%29+-+%5Cfrac%7B%5Cpi%7D%7B2%7D%29+%3D+-%5Ccos%28radian%28drs%29%29&#038;bg=ffffff&#038;fg=000&#038;s=0&#038;c=20201002\" alt=\"y = &#92;sin((ds * &#92;frac{1}{60} * 2 &#92;pi) - &#92;frac{&#92;pi}{2}) = -&#92;cos(radian(drs))\" class=\"latex\" \/><\/p>\n<p>So in Lua script it looks like this:<\/p>\n<pre><code class=\"lua\">x = math.sin(math.rad({drs}))<br \/>\ny = -math.cos(math.rad({drs}))<\/code><\/pre>\n<p><script src=\"\/\/repl.it\/embed\/C3bI\/0.js\"><\/script><\/p>\n<p>To define the size of the circle, you just have to multiply the desired size:<\/p>\n<pre><code class=\"lua\">x = math.sin(math.rad({drs})) * 25<br \/>\ny = -math.cos(math.rad({drs})) * 25<\/code><\/pre>\n<p>You can use any rotation value with this formula just by replacing the tag, which is another big advantage compared to my prior formulas, because WatchMaker offers many rotation values.<\/p>\n<p>Therefore you can replace the little complex formula in <a href=\"http:\/\/bulletin-board.de\/watchfaces\/move-objects-in-a-circle-smoothly\/\">Move objects in a circle smoothly<\/a> just by the rotation value <em>{drss}<\/em> for smooth seconds resulting in the following Lua script code:<\/p>\n<pre><code class=\"lua\">x = math.sin(math.rad({drss})) * 200<br \/>\ny = -math.cos(math.rad({drss})) * 200<\/code><\/pre>\n<p><strong>Update:<\/strong> In the original article\u00a0<a href=\"http:\/\/bulletin-board.de\/watchfaces\/back-to-trigonometry\/\">Back to trigonometry<\/a>\u00a0I&#8217;ve described the eye movements of the\u00a0<a href=\"http:\/\/bulletin-board.de\/watchfaces\/portfolio\/homer-simpson-duff-beer-watch\/\">Homer watch<\/a>. Of course you do this with the new formula too. It would look like this:<\/p>\n<pre><code class=\"lua\">x=\"-48 + math.sin(math.rad({drs})) * 25\"<br \/>\ny=\"-42 - math.cos(math.rad({drs})) * 25\"<\/code><\/pre>\n<p><em>Thanks to\u00a0Brian Scott Oplinger for giving me the hint to add this aspect. \ud83d\ude09<\/em><\/p>\n<p><strong>Update:<\/strong> Here you can play around with the formula:<br \/>\n<script src=\"\/\/repl.it\/embed\/C3bZ\/3.js\"><\/script><\/p>\n<div class=\"twoclick-intro\"><div class=\"sharedaddy\">\n<h3 class=\"sd-title\">Like this on:<\/h3>\n<p>For privacy save likes click 2 times. Hover the <em>i<\/em> button for further information.\n<\/div>\n<\/div><div class=\"twoclick_social_bookmarks_post_415 social_share_privacy clearfix 1.6.4 locale-en_US sprite-en_US\"><\/div><div class=\"twoclick-js\"><script type=\"text\/javascript\">\/* <![CDATA[ *\/\njQuery(document).ready(function($){if($('.twoclick_social_bookmarks_post_415')){$('.twoclick_social_bookmarks_post_415').socialSharePrivacy({\"services\":{\"facebook\":{\"status\":\"on\",\"txt_info\":\"2 clicks for more privacy: The first click activates the like button, which already sends information to Facebook. The second click gives this content a Like.\",\"perma_option\":\"off\",\"action\":\"like\",\"language\":\"en_US\"},\"gplus\":{\"status\":\"on\",\"txt_info\":\"2 clicks for more privacy: The first click activates the like button, which already sends information to Google. The second click gives this content a Like.\",\"perma_option\":\"off\",\"referrer_track\":\"\"}},\"txt_help\":\"If you activate these fields by clicking, information will be send to Facebook, Twitter, Pinterest or Google. Click on the <em>i<\\\/em> button for further information.\",\"settings_perma\":\"Permanently activate the like buttons:\",\"info_link\":\"http:\\\/\\\/www.heise.de\\\/ct\\\/artikel\\\/2-Klicks-fuer-mehr-Datenschutz-1333879.html\",\"uri\":\"https:\\\/\\\/bulletin-board.de\\\/watchfaces\\\/moving-around-the-easy-way\\\/\",\"post_id\":415,\"post_title_referrer_track\":\"Moving+around+%26%238211%3B+the+easy+way\",\"display_infobox\":\"on\"});}});\n\/* ]]> *\/<\/script><\/div>","protected":false},"excerpt":{"rendered":"<p>In my recent\u00a0articles Back to Trigonometry\u00a0and\u00a0Move objects in a circle smoothly, I described a formula to move objects around a circle. Since WatchMaker also offers rotation values in degrees for time, we can simplify those formulas and make them more efficient to calculate. In the original formulas I&#8217;ve used {ds}, which represented the seconds in&hellip; <a href=\"https:\/\/bulletin-board.de\/watchfaces\/moving-around-the-easy-way\/\">Continue reading <span class=\"screen-reader-text\">Moving around &#8211; the easy way<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"Moving around - the easy way","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[1,72],"tags":[84,83,74,81],"class_list":["post-415","post","type-post","status-publish","format-standard","hentry","category-makers","category-lua","tag-circle","tag-geometry","tag-seconds","tag-trigonometry"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p5aacI-6H","jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":319,"url":"https:\/\/bulletin-board.de\/watchfaces\/back-to-trigonometry\/","url_meta":{"origin":415,"position":0},"title":"Back to trigonometry","author":"Tamio Honma","date":"February 8, 2016","format":false,"excerpt":"Since I'm scripting watch faces for smart watches, I was confronted with mathematical issues from my school days nearly 30\u00a0years ago. The basics The circle is\u00a0the main geometric form to support using watch faces. And so I was confronted with\u00a0\u03c0,\u00a0sine, angles and some other things from the trigonometry. One main\u2026","rel":"","context":"In &quot;For the Makers&quot;","block_context":{"text":"For the Makers","link":"https:\/\/bulletin-board.de\/watchfaces\/category\/makers\/"},"img":{"alt_text":"Circle-trig6.svg","src":"https:\/\/upload.wikimedia.org\/wikipedia\/commons\/thumb\/9\/9d\/Circle-trig6.svg\/1200px-Circle-trig6.svg.png","width":350,"height":200,"srcset":"https:\/\/upload.wikimedia.org\/wikipedia\/commons\/thumb\/9\/9d\/Circle-trig6.svg\/1200px-Circle-trig6.svg.png 1x, https:\/\/upload.wikimedia.org\/wikipedia\/commons\/thumb\/9\/9d\/Circle-trig6.svg\/1200px-Circle-trig6.svg.png 1.5x, https:\/\/upload.wikimedia.org\/wikipedia\/commons\/thumb\/9\/9d\/Circle-trig6.svg\/1200px-Circle-trig6.svg.png 2x, https:\/\/upload.wikimedia.org\/wikipedia\/commons\/thumb\/9\/9d\/Circle-trig6.svg\/1200px-Circle-trig6.svg.png 3x"},"classes":[]},{"id":388,"url":"https:\/\/bulletin-board.de\/watchfaces\/move-objects-in-a-circle-smoothly\/","url_meta":{"origin":415,"position":1},"title":"Move objects in a circle smoothly","author":"Tamio Honma","date":"February 11, 2016","format":false,"excerpt":"Some days ago, I posted an article called \"Back to trigonometry\" about moving objects in a circle by seconds, minutes or hours with a trigonometric formula. Today I write about the making of my new watch face Burner. Before writing about trigonometry again, I describe the production of the asset\u2026","rel":"","context":"In &quot;For the Makers&quot;","block_context":{"text":"For the Makers","link":"https:\/\/bulletin-board.de\/watchfaces\/category\/makers\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/bulletin-board.de\/watchfaces\/wp-content\/uploads\/2016\/02\/Burner-Photoshop-300x223.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/bulletin-board.de\/watchfaces\/wp-content\/uploads\/2016\/02\/Burner-Photoshop-300x223.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/bulletin-board.de\/watchfaces\/wp-content\/uploads\/2016\/02\/Burner-Photoshop-300x223.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/bulletin-board.de\/watchfaces\/wp-content\/uploads\/2016\/02\/Burner-Photoshop-300x223.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":298,"url":"https:\/\/bulletin-board.de\/watchfaces\/bouncing-seconds\/","url_meta":{"origin":415,"position":2},"title":"Bouncing seconds","author":"Tamio Honma","date":"February 7, 2016","format":false,"excerpt":"When I thought I was finished with the Homer watch face, I stumbled upon a video of the real Homer clock and saw a bouncing seconds hand. https:\/\/www.youtube.com\/watch?v=mEpl94fHuKw So I stopped my intention to load the watch face up and made the hand bounce like as follows: I set the\u2026","rel":"","context":"In &quot;For the Makers&quot;","block_context":{"text":"For the Makers","link":"https:\/\/bulletin-board.de\/watchfaces\/category\/makers\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/img.youtube.com\/vi\/mEpl94fHuKw\/0.jpg?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":451,"url":"https:\/\/bulletin-board.de\/watchfaces\/rotate-forms-for-round-watch-faces\/","url_meta":{"origin":415,"position":3},"title":"Rotate forms for round watch faces","author":"Tamio Honma","date":"February 29, 2016","format":false,"excerpt":"Especially in the beginning of designing round watch faces, I had to get used to place forms to\u00a0the right place in a circle. This is needed for markers, numbers and some\u00a0decoration elements. Photoshop doesn't offer circular guide lines or other help functions for these kind of layouts. In fact, it's\u2026","rel":"","context":"In &quot;Photoshop&quot;","block_context":{"text":"Photoshop","link":"https:\/\/bulletin-board.de\/watchfaces\/category\/makers\/photoshop\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/bulletin-board.de\/watchfaces\/wp-content\/uploads\/2016\/02\/rotate-hour-3.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/bulletin-board.de\/watchfaces\/wp-content\/uploads\/2016\/02\/rotate-hour-3.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/bulletin-board.de\/watchfaces\/wp-content\/uploads\/2016\/02\/rotate-hour-3.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/bulletin-board.de\/watchfaces\/wp-content\/uploads\/2016\/02\/rotate-hour-3.png?resize=700%2C400&ssl=1 2x, https:\/\/i0.wp.com\/bulletin-board.de\/watchfaces\/wp-content\/uploads\/2016\/02\/rotate-hour-3.png?resize=1050%2C600&ssl=1 3x"},"classes":[]},{"id":710,"url":"https:\/\/bulletin-board.de\/watchfaces\/multiple-colors-ucolor\/","url_meta":{"origin":415,"position":4},"title":"How to use multiple colors based on the new user color selector for {ucolor}","author":"Tamio Honma","date":"April 4, 2017","format":false,"excerpt":"The Watchmaker app was\u00a0updated some weeks ago and introduced a new cool color selector right inside the app. This is very convenient for both: The users and the designers \/\u00a0developers. As a developer you just have to use the variable {ucolor} instead of a color code or your own color\u2026","rel":"","context":"In &quot;Editor&quot;","block_context":{"text":"Editor","link":"https:\/\/bulletin-board.de\/watchfaces\/category\/makers\/editor\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/bulletin-board.de\/watchfaces\/wp-content\/uploads\/2017\/04\/ucolor.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":367,"url":"https:\/\/bulletin-board.de\/watchfaces\/supporting-round-and-square-watches-in-one-watch-face\/","url_meta":{"origin":415,"position":5},"title":"Supporting round and square watches in one watch face","author":"Tamio Honma","date":"February 9, 2016","format":false,"excerpt":"Shortly after I've released my Homer watch face for round smart watches, a user suggested that I should support square watches as well. So I did. It doesn't matter, if you usually design your watch faces on a square watch or on a round one. You can support both watches\u2026","rel":"","context":"In &quot;For the Makers&quot;","block_context":{"text":"For the Makers","link":"https:\/\/bulletin-board.de\/watchfaces\/category\/makers\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/bulletin-board.de\/watchfaces\/wp-content\/uploads\/2016\/02\/duff_0000_Rahmen-150x150.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]}],"_links":{"self":[{"href":"https:\/\/bulletin-board.de\/watchfaces\/wp-json\/wp\/v2\/posts\/415","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bulletin-board.de\/watchfaces\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bulletin-board.de\/watchfaces\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bulletin-board.de\/watchfaces\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/bulletin-board.de\/watchfaces\/wp-json\/wp\/v2\/comments?post=415"}],"version-history":[{"count":21,"href":"https:\/\/bulletin-board.de\/watchfaces\/wp-json\/wp\/v2\/posts\/415\/revisions"}],"predecessor-version":[{"id":613,"href":"https:\/\/bulletin-board.de\/watchfaces\/wp-json\/wp\/v2\/posts\/415\/revisions\/613"}],"wp:attachment":[{"href":"https:\/\/bulletin-board.de\/watchfaces\/wp-json\/wp\/v2\/media?parent=415"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bulletin-board.de\/watchfaces\/wp-json\/wp\/v2\/categories?post=415"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bulletin-board.de\/watchfaces\/wp-json\/wp\/v2\/tags?post=415"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}