{"action":"created","issue":{"url":"https://api.github.com/repos/CindyJS/CindyJS/issues/90","labels_url":"https://api.github.com/repos/CindyJS/CindyJS/issues/90/labels{/name}","comments_url":"https://api.github.com/repos/CindyJS/CindyJS/issues/90/comments","events_url":"https://api.github.com/repos/CindyJS/CindyJS/issues/90/events","html_url":"https://github.com/CindyJS/CindyJS/pull/90","id":118222916,"number":90,"title":"Add freely movable HorizontalLine & VerticalLine","user":{"login":"elkins0","id":15895776,"avatar_url":"https://avatars.githubusercontent.com/u/15895776?v=3","gravatar_id":"","url":"https://api.github.com/users/elkins0","html_url":"https://github.com/elkins0","followers_url":"https://api.github.com/users/elkins0/followers","following_url":"https://api.github.com/users/elkins0/following{/other_user}","gists_url":"https://api.github.com/users/elkins0/gists{/gist_id}","starred_url":"https://api.github.com/users/elkins0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elkins0/subscriptions","organizations_url":"https://api.github.com/users/elkins0/orgs","repos_url":"https://api.github.com/users/elkins0/repos","events_url":"https://api.github.com/users/elkins0/events{/privacy}","received_events_url":"https://api.github.com/users/elkins0/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"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},"milestone":null,"comments":4,"created_at":"2015-11-21T21:46:35Z","updated_at":"2015-11-25T17:39:13Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/CindyJS/CindyJS/pulls/90","html_url":"https://github.com/CindyJS/CindyJS/pull/90","diff_url":"https://github.com/CindyJS/CindyJS/pull/90.diff","patch_url":"https://github.com/CindyJS/CindyJS/pull/90.patch"},"body":"Adds geoOps.HorizontalLine and geoOps.VerticalLine to support Cinderella's freely movable HorizontalLine and VerticalLine types. (Cinderella semantics)"},"comment":{"url":"https://api.github.com/repos/CindyJS/CindyJS/issues/comments/159683870","html_url":"https://github.com/CindyJS/CindyJS/pull/90#issuecomment-159683870","issue_url":"https://api.github.com/repos/CindyJS/CindyJS/issues/90","id":159683870,"user":{"login":"elkins0","id":15895776,"avatar_url":"https://avatars.githubusercontent.com/u/15895776?v=3","gravatar_id":"","url":"https://api.github.com/users/elkins0","html_url":"https://github.com/elkins0","followers_url":"https://api.github.com/users/elkins0/followers","following_url":"https://api.github.com/users/elkins0/following{/other_user}","gists_url":"https://api.github.com/users/elkins0/gists{/gist_id}","starred_url":"https://api.github.com/users/elkins0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elkins0/subscriptions","organizations_url":"https://api.github.com/users/elkins0/orgs","repos_url":"https://api.github.com/users/elkins0/repos","events_url":"https://api.github.com/users/elkins0/events{/privacy}","received_events_url":"https://api.github.com/users/elkins0/received_events","type":"User","site_admin":false},"created_at":"2015-11-25T17:39:13Z","updated_at":"2015-11-25T17:39:13Z","body":"OK, fine by me. Do note however how all this works. The line, whatever constraints it may have, is just the sum of two things, namely a point and a direction. If we are given its homogeneous coordinates el.homog then we can extract a direction using dir = List.cross(el.homog, List.linfty) and a normal point using pn = List.cross(el.homog, dir). If we are given any point on the line, call it p, and a direction, call it dir, we can determine its homogeneous coordinates el.homog = List.cross(p, dir). So there are several ways to supply the point on the line, as dependency using el.args, the pointer position or as the normal point extracted from the pos value homogeneous coordinates. The direction of the line too can be supplied in several ways, as an absolute angle parameter, as a relative angle with respect to the direction/angle of a line dependency using el.args, as the difference of two points and as the direction/angle extracted from the pos value homogeneous coordinates.\r\n\r\nI say that if you supply an angle value you should supply pos as the homogeneous coordinates of a point on the line rather than the homogeneous coordinates of the line.\r\n\r\nIf a line is fully determined by its dependencies why supply any pos or angle at all? For example a parallel line is but a line thru a point with a relative fixed angle of 0&deg; to a line. And by same token, a perpendicular line is but a line thru a point with a relative fixed angle of 90&deg; to a line. One could make intriguing changes by using 180&deg; and 270&deg;, respectively, instead.\r\n\r\nThe difference here is that in the case of a movable line the dependency is on the pointer rather than another element. This is complicates the code a bit more because we now must support getParamForInput, getParamFromState and putParamToState as well as making putStateComplexVector and putStateComplexVector in a few places. So it is best that movable line (and point) code not be used to implement fully dependent elements. The only rationale for using pinning is if you want be fully general and allow the user to pin and unpin everything. Say be able to unpin a parallel line make it's angle 90&deg; re-pin it and have yourself a perpendicular line? An intriguing thought for  CindyScript perhaps..."}}