{"action":"created","issue":{"url":"https://api.github.com/repos/CindyJS/CindyJS/issues/126","labels_url":"https://api.github.com/repos/CindyJS/CindyJS/issues/126/labels{/name}","comments_url":"https://api.github.com/repos/CindyJS/CindyJS/issues/126/comments","events_url":"https://api.github.com/repos/CindyJS/CindyJS/issues/126/events","html_url":"https://github.com/CindyJS/CindyJS/pull/126","id":120070641,"number":126,"title":"Simplify ConicParabolaPL to avoid degenerate situations","user":{"login":"gagern","id":190759,"avatar_url":"https://avatars.githubusercontent.com/u/190759?v=3","gravatar_id":"","url":"https://api.github.com/users/gagern","html_url":"https://github.com/gagern","followers_url":"https://api.github.com/users/gagern/followers","following_url":"https://api.github.com/users/gagern/following{/other_user}","gists_url":"https://api.github.com/users/gagern/gists{/gist_id}","starred_url":"https://api.github.com/users/gagern/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gagern/subscriptions","organizations_url":"https://api.github.com/users/gagern/orgs","repos_url":"https://api.github.com/users/gagern/repos","events_url":"https://api.github.com/users/gagern/events{/privacy}","received_events_url":"https://api.github.com/users/gagern/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"strobelm","id":14185442,"avatar_url":"https://avatars.githubusercontent.com/u/14185442?v=3","gravatar_id":"","url":"https://api.github.com/users/strobelm","html_url":"https://github.com/strobelm","followers_url":"https://api.github.com/users/strobelm/followers","following_url":"https://api.github.com/users/strobelm/following{/other_user}","gists_url":"https://api.github.com/users/strobelm/gists{/gist_id}","starred_url":"https://api.github.com/users/strobelm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/strobelm/subscriptions","organizations_url":"https://api.github.com/users/strobelm/orgs","repos_url":"https://api.github.com/users/strobelm/repos","events_url":"https://api.github.com/users/strobelm/events{/privacy}","received_events_url":"https://api.github.com/users/strobelm/received_events","type":"User","site_admin":false},"milestone":null,"comments":1,"created_at":"2015-12-03T00:57:05Z","updated_at":"2015-12-03T05:40:38Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/CindyJS/CindyJS/pulls/126","html_url":"https://github.com/CindyJS/CindyJS/pull/126","diff_url":"https://github.com/CindyJS/CindyJS/pull/126.diff","patch_url":"https://github.com/CindyJS/CindyJS/pull/126.patch"},"body":"This makes the algorithm simpler insofar as it eliminates a huge common factor of the resulting matrix, thus removing unneccessary singularities. Reading geometric meaning back from the code is now tricky, though.\r\n\r\nThe following sage code snippet may serve as a documentation of how the previous algorithm by @elkins0 got turned into this new one.\r\n\r\n```py\r\nPR.<Fx,Fy,Fz,dx,dy,dz> = QQ[] # A Polynomial ring over the rationals with six indeterminates\r\nA = vector([Fx,Fy,Fz]) # Focus point\r\na = vector([dx,dy,dz]) # Directrix line\r\nlinfty = vector(PR, [0,0,1]) # The line at infinity\r\ndd = a.cross_product(linfty) # The direction of the directrix line\r\ndp = dd.cross_product(linfty) # The perpendicular direction of the directrix line\r\ne = A.cross_product(dd) # Parallel line through focus point in the direction of the directrix line forms both lines of one degenerate conic\r\nb = A.cross_product(dp) # Line through focus point in the perpendicular direction of directrix line\r\nB = a.cross_product(b) # Point B is the projection of the focus point onto the directrix line\r\nc = B.cross_product(dd - dp) # Create both both angle bisector lines through point B from the\r\nd = B.cross_product(dd + dp) # direction of the directrix and its perpendicular direction\r\nC = B[2]*A + A[2]*B # Midpoint of point A and point B\r\ndeg1 = c.column() * d.row() # One degenerate conic with factors c and d\r\ndeg2 = e.column() * e.row() # Another with e as a double line\r\nm = (C*deg1*C)*deg2 - (C*deg2*C)*deg1 # Pick from pencil to coincide with C\r\nm += m.transpose() # Symmetrize\r\nm/gcd(m.list())/2 # Print the simplified form, as seen in the source comment\r\n```\r\n\r\nFor details see https://github.com/CindyJS/CindyJS/pull/120#issuecomment-161315538 and https://gist.github.com/gagern/5a1d6d4663c3da6f52dd."},"comment":{"url":"https://api.github.com/repos/CindyJS/CindyJS/issues/comments/161522574","html_url":"https://github.com/CindyJS/CindyJS/pull/126#issuecomment-161522574","issue_url":"https://api.github.com/repos/CindyJS/CindyJS/issues/126","id":161522574,"user":{"login":"gagern","id":190759,"avatar_url":"https://avatars.githubusercontent.com/u/190759?v=3","gravatar_id":"","url":"https://api.github.com/users/gagern","html_url":"https://github.com/gagern","followers_url":"https://api.github.com/users/gagern/followers","following_url":"https://api.github.com/users/gagern/following{/other_user}","gists_url":"https://api.github.com/users/gagern/gists{/gist_id}","starred_url":"https://api.github.com/users/gagern/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gagern/subscriptions","organizations_url":"https://api.github.com/users/gagern/orgs","repos_url":"https://api.github.com/users/gagern/repos","events_url":"https://api.github.com/users/gagern/events{/privacy}","received_events_url":"https://api.github.com/users/gagern/received_events","type":"User","site_admin":false},"created_at":"2015-12-03T05:40:38Z","updated_at":"2015-12-03T05:40:38Z","body":"@kortenkamp: This discussion of how to compute a midpoint might be better located at #123 since it's the core of the request there but just a minor point here."}}