<div dir="auto"><div><br><div class="gmail_quote">---------- Forwarded message ----------<br>From: "Artem Fedoskin" <<a href="mailto:afedoskin3@gmail.com">afedoskin3@gmail.com</a>><br>Date: Feb 15, 2017 2:00 PM<br>Subject: Fwd: Rotation of projection plane<br>To: "Jasem Mutlaq" <<a href="mailto:mutlaqja@ikarustech.com">mutlaqja@ikarustech.com</a>><br>Cc: <br><br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><div dir="ltr"><div><div><div>Dear contributors and users of <span id="m_-5454514902491010951m_117478898911365619:vn.1">KStars</span>,<br><br></div>At the moment I am working on "Automatic mode" for <span id="m_-5454514902491010951m_117478898911365619:vn.2">KStars</span> Lite (that is, a mode in which Sky Map is controlled by accelerometer and magnetometer of your <span id="m_-5454514902491010951m_117478898911365619:vn.3">smartphone</span>). I built Java <span id="m_-5454514902491010951m_117478898911365619:vn.4">backend</span> for getting data from sensors data but I have the following problem:<br><br></div>Imagine you a pointing to the Moon (a center of your screen is pointing to the Moon). If you will rotate the screen of you phone around the Moon without rotating the whole Sky Map the image will stay same. The goal is to rotate the Sky Map so that your <span id="m_-5454514902491010951m_117478898911365619:vn.5">smartphone</span> still points to the Moon but all other parts of Sky Map will change according to rotation (imagine of your <span id="m_-5454514902491010951m_117478898911365619:vn.6">smartphone</span> as a window to the sky or simply check Google <span id="m_-5454514902491010951m_117478898911365619:vn.7">Skymap</span> in Play Store).<br><br></div>Right now I am getting the following when I rotate <span id="m_-5454514902491010951m_117478898911365619:vn.8">SkyMapLite</span> according to roll data from sensors. As you can see, current projection system is not rotated therefore objects that should be drawn are hidden and ground polygon isn't drawn correctly ( I guess in case of ground I will simply disable its rectangle form and draw the whole thing in Automatic mode).<br><div><br>http://<span id="m_-5454514902491010951m_117478898911365619:vn.9">imgur</span>.com/a/<span id="m_-5454514902491010951m_117478898911365619:vn.10">QCFxc</span><br><br><img src="cid:ii_15a38071fb9c4051" alt="Inline image 1" width="248" height="441"> <br><br></div><div>What I have already tried is the following - <a href="http://math" target="_blank">http://math</a>.<span id="m_-5454514902491010951m_117478898911365619:vn.11">stackexchange</span>.com/<wbr>questions/270194/how-to-find-t<wbr>he-<span id="m_-5454514902491010951m_117478898911365619:vn.12">vertices</span>-angle-after-rotati<wbr>on I am calculating new coordinates according to <span id="m_-5454514902491010951m_117478898911365619:vn.13">formulas</span> in Projector::<span id="m_-5454514902491010951m_117478898911365619:vn.14">checkVisibility</span>( <span id="m_-5454514902491010951m_117478898911365619:vn.15">SkyPoint</span> *p ) but it doesn't work. Any ideas how should I calculate new points?<br><br></div><div>You can check "Automatic mode" by building <span id="m_-5454514902491010951m_117478898911365619:vn.16">KStars</span> Lite using the following script https://<span id="m_-5454514902491010951m_117478898911365619:vn.17">github</span>.com/<span id="m_-5454514902491010951m_117478898911365619:vn.18">knro</span>/build_<span id="m_-5454514902491010951m_117478898911365619:vn.19"><wbr>kstarslite</span>/.<br><br></div><div>My another small question is - should we set slewing to false in "Automatic mode"? With slewing set to "on" it will be just like controlling Sky Map with touch screen and won't be that spectacular as a lot of objects are hidden. But on the other hand it will make automatic mode much smoother on low-end devices.<br></div><div><br></div><div>Regards, <span id="m_-5454514902491010951m_117478898911365619:vn.20">Artem</span><br></div></div>
</div><br></div>
</blockquote></div><br></div></div>