<html><head></head><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, Sans-Serif;font-size:16px"><div id="yui_3_16_0_ym18_1_1459646027840_5649"><span></span></div><div id="yui_3_16_0_ym18_1_1459646027840_5670" class="qtdSeparateBR">??<br><br></div><div style="display: block;" id="yui_3_16_0_ym18_1_1459646027840_5674" class="yahoo_quoted">  <div id="yui_3_16_0_ym18_1_1459646027840_5673" style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, Sans-Serif; font-size: 16px;"> <div id="yui_3_16_0_ym18_1_1459646027840_5672" style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, Sans-Serif; font-size: 16px;"> <div id="yui_3_16_0_ym18_1_1459646027840_5671" dir="ltr"> <font id="yui_3_16_0_ym18_1_1459646027840_5677" face="Arial" size="2"> <hr id="yui_3_16_0_ym18_1_1459646027840_5676" size="1"> <b id="yui_3_16_0_ym18_1_1459646027840_5750"><span id="yui_3_16_0_ym18_1_1459646027840_5749" style="font-weight:bold;">From:</span></b> Maurizio Paolini <paolini@dmf.unicatt.it><br> <b id="yui_3_16_0_ym18_1_1459646027840_5747"><span id="yui_3_16_0_ym18_1_1459646027840_5746" style="font-weight: bold;">To:</span></b> David Narváez <david.narvaez@computer.org>; Rex Dieter <rdieter@gmail.com> <br><b id="yui_3_16_0_ym18_1_1459646027840_5744"><span id="yui_3_16_0_ym18_1_1459646027840_5743" style="font-weight: bold;">Cc:</span></b> KDE Edu <kde-edu@kde.org>; Maurizio Paolini <paolini@dmf.unicatt.it><br> <b id="yui_3_16_0_ym18_1_1459646027840_5742"><span id="yui_3_16_0_ym18_1_1459646027840_5741" style="font-weight: bold;">Sent:</span></b> Sunday, 3 April 2016 5:24 PM<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: Review Request 127364: improving CircleCircleIntersection (towards what geogebra does)<br> </font> </div> <div id="yui_3_16_0_ym18_1_1459646027840_5699" class="y_msg_container"><br><div id="yiv3024000041"><div id="yui_3_16_0_ym18_1_1459646027840_5698">
  <div id="yui_3_16_0_ym18_1_1459646027840_5697" style="font-family:Verdana, Arial, Helvetica, Sans-Serif;">
   <table id="yui_3_16_0_ym18_1_1459646027840_5696" class="yahoo-compose-table-card" style="border:1px #c9c399 solid;border-radius:6px;" width="100%" bgcolor="#f9f3c9" cellpadding="12"><tbody id="yui_3_16_0_ym18_1_1459646027840_5737"><tr id="yui_3_16_0_ym18_1_1459646027840_5736"><td id="yui_3_16_0_ym18_1_1459646027840_5735" colspan="1" rowspan="1">
      This is an automatically generated e-mail. To reply, visit:
      <a rel="nofollow" shape="rect" target="_blank" href="https://git.reviewboard.kde.org/r/127364/">https://git.reviewboard.kde.org/r/127364/</a>
     </td></tr></tbody></table>
   <br clear="none">




<table id="yui_3_16_0_ym18_1_1459646027840_5728" class="yahoo-compose-table-card" style="border:1px #888a85 solid;border-radius:6px;" width="100%" bgcolor="#fefadf" cellpadding="12" cellspacing="0"><tbody id="yui_3_16_0_ym18_1_1459646027840_5727"><tr id="yui_3_16_0_ym18_1_1459646027840_5726"><td id="yui_3_16_0_ym18_1_1459646027840_5725" colspan="1" rowspan="1">

<div>Review request for KDE Edu, David Narváez and Rex Dieter.</div>
<div id="yui_3_16_0_ym18_1_1459646027840_5724">By Maurizio Paolini.</div>


<div style="color:grey;"><i>Updated April 3, 2016, 11:54 a.m.</i></div>



<h1 style="color:#575012;font-size:10pt;margin-top:1.5em;">Changes</h1>
<table class="yahoo-compose-table-card" style="border:1px solid #b8b5a0;" width="100%" bgcolor="#ffffff" cellpadding="10" cellspacing="0"><tbody><tr><td colspan="1" rowspan="1">
   <pre style="margin:0;padding:0;white-space:pre-wrap;word-wrap:break-word;">Do not add the new types CircleBTPoType and ArcBTPoType.  Instead replace CircleBTPType/ArcBTPType with the new version.
Also, compute correctly ArcLine intersection using the orientation and treat the case where the Arc degenerates into a Segment</pre>
  </td></tr></tbody></table>







<div style="margin-top:1.5em;">
 <b style="color:#575012;font-size:10pt;">Repository: </b>
kig
</div>


<h1 style="color:#575012;font-size:10pt;margin-top:1.5em;">Description </h1>
 <table class="yahoo-compose-table-card" style="border:1px solid #b8b5a0;" width="100%" bgcolor="#ffffff" cellpadding="10" cellspacing="0"><tbody><tr><td colspan="1" rowspan="1">
   <pre style="margin:0;padding:0;white-space:pre-wrap;word-wrap:break-word;"></pre><div style="padding:0;margin:0;line-height:inherit;white-space:inherit;">I am addressing two related issues: intersection points that jump, circles degenerating to lines.
When intersecting circles obtained as "circle by 3 points" it is possible that one or both degenerate into a straight line.  At present when dinamically moving one of the three defining points of a circle across the line through the other two, the two intersection points exchange position, possibly causing the subsequent constructions to change abruptly.
The other related issue is that at the moment the intersection point is not defined when one
of the two circles degenerate into a line.</div>
<div style="padding:0;margin:0;line-height:inherit;white-space:inherit;">Motivation: this situations naturally arise, for example, when trying to construct the Disk Poincare' model of the hyperbolic plane, in which case it is essential to allow for circles to become lines.</div>
<div style="padding:0;margin:0;line-height:inherit;white-space:inherit;">A sample kig file that exposes these issues is available as http://dmf.unicatt.it/~paolini/kig/bugs/test_circle_intersection_old.kig</div>
<div style="padding:0;margin:0;line-height:inherit;white-space:inherit;">The big black points can be moved across the other two defining one of the two circles, observe that the two intersection points exchange position.  Moreover, if a black point
is precisely aligned with the other two (press the shift key to force the point
onto the grid), then the two intersection points disappear.</div>
  </td></tr></tbody></table>


<h1 style="color:#575012;font-size:10pt;margin-top:1.5em;">Testing </h1>
<table class="yahoo-compose-table-card" style="border:1px solid #b8b5a0;" width="100%" bgcolor="#ffffff" cellpadding="10" cellspacing="0"><tbody><tr><td colspan="1" rowspan="1">
   <pre style="margin:0;padding:0;white-space:pre-wrap;word-wrap:break-word;"></pre><div style="padding:0;margin:0;line-height:inherit;white-space:inherit;">Unfortunately, to address the "abrupt intersection points exchange" it seems necessary to add a (hidden) circle orientation for CircleImp(s).  In the proposed patch this is achieved by allowing the "mradius" member to be negative (it is "private", so that we to not risk to expose this possibility; radius() method will now return the absolute value of mradius, and the new "orientation()" method returns the circle orientation).</div>
<div style="padding:0;margin:0;line-height:inherit;white-space:inherit;">The additional 'orientation' information can then be used inside the CircleCircleIntersection::calc to avoid the abrupt jump of the intersection points.</div>
<div style="padding:0;margin:0;line-height:inherit;white-space:inherit;">The new CircleBTPoType class constructs an "oriented" circle (note that the user will not
be able to directly access the orientation information), whereas the old CircleBTPType is left unchanges.  CircleBTPoType substitutes CircleBTPType in builtin_stuff.cc.
In this way we ensure backward compatibility for old saved kig files, whereas new constructions will take advantage of the orientation.</div>
<div style="padding:0;margin:0;line-height:inherit;white-space:inherit;">Alternatively we can simply substitute the present CircleBTP with the new version.</div>
  </td></tr></tbody></table>


<h1 style="color:#575012;font-size:10pt;margin-top:1.5em;">Diffs (updated)</h1>
<div class="yiv3024000041yqt1098784981" id="yiv3024000041yqtfd45759"><ul style="margin-left:3em;padding-left:0;"><li>misc/common.cpp <span style="color:grey;">(2e1fac9)</span></li><li>objects/arc_type.h <span style="color:grey;">(a9a7296)</span></li><li>objects/arc_type.cc <span style="color:grey;">(26c05cc)</span></li><li>objects/circle_imp.h <span style="color:grey;">(dc63e06)</span></li><li>objects/circle_imp.cc <span style="color:grey;">(7450ef6)</span></li><li>objects/circle_type.h <span style="color:grey;">(37cf400)</span></li><li>objects/circle_type.cc <span style="color:grey;">(25ec233)</span></li><li>objects/intersection_types.cc <span style="color:grey;">(2fd07be)</span></li><li>objects/other_imp.h <span style="color:grey;">(31feda6)</span></li><li>objects/other_imp.cc <span style="color:grey;">(d773196)</span></li></ul>

<div><a rel="nofollow" shape="rect" target="_blank" href="https://git.reviewboard.kde.org/r/127364/diff/" style="margin-left:3em;">View Diff</a></div>



<h1 style="color:#575012;font-size:10pt;margin-top:1.5em;">File Attachments </h1>


 <ul><li><a rel="nofollow" shape="rect" target="_blank" href="https://git.reviewboard.kde.org/media/uploaded/files/2016/03/13/31028aa6-140d-40c2-9a79-743ed2e10f40__test_circle_intersection_old.kig">old behaviour</a></li><li><a rel="nofollow" shape="rect" target="_blank" href="https://git.reviewboard.kde.org/media/uploaded/files/2016/03/13/526e0448-2b20-454b-ae2a-a5537bb94e99__test_circle_intersection_new.kig">new behaviour</a></li><li><a rel="nofollow" shape="rect" target="_blank" href="https://git.reviewboard.kde.org/media/uploaded/files/2016/03/19/76aca8dd-9f1f-41ff-a2f0-2b1877bd3305__locus_old.png">constructing a locus: before</a></li><li><a rel="nofollow" shape="rect" target="_blank" href="https://git.reviewboard.kde.org/media/uploaded/files/2016/03/19/cef22d67-a58f-49e4-9659-10bf3964fedc__locus_new.png">constructing a locus: after</a></li></ul>




  </div></td></tr></tbody></table><div class="yiv3024000041yqt1098784981" id="yiv3024000041yqtfd95978">



  </div></div><div class="yiv3024000041yqt1098784981" id="yiv3024000041yqtfd43942">
 </div></div></div><br><div class="yqt1098784981" id="yqtfd83170">_______________________________________________<br clear="none">kde-edu mailing list<br clear="none"><a shape="rect" ymailto="mailto:kde-edu@mail.kde.org" href="mailto:kde-edu@mail.kde.org">kde-edu@mail.kde.org</a><br clear="none"><a shape="rect" href="https://mail.kde.org/mailman/listinfo/kde-edu" target="_blank">https://mail.kde.org/mailman/listinfo/kde-edu</a><br clear="none"></div><br><br></div> </div> </div>  </div></div></body></html>