{"action":"opened","issue":{"url":"https://api.github.com/repos/CindyJS/CindyJS/issues/516","repository_url":"https://api.github.com/repos/CindyJS/CindyJS","labels_url":"https://api.github.com/repos/CindyJS/CindyJS/issues/516/labels{/name}","comments_url":"https://api.github.com/repos/CindyJS/CindyJS/issues/516/comments","events_url":"https://api.github.com/repos/CindyJS/CindyJS/issues/516/events","html_url":"https://github.com/CindyJS/CindyJS/issues/516","id":183423836,"number":516,"title":"applyMat semantics look broken","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":[{"url":"https://api.github.com/repos/CindyJS/CindyJS/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/CindyJS/CindyJS/labels/discussion","name":"discussion","color":"bfe5bf"},{"url":"https://api.github.com/repos/CindyJS/CindyJS/labels/incompatible","name":"incompatible","color":"cc3300"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/CindyJS/CindyJS/milestones/1","html_url":"https://github.com/CindyJS/CindyJS/milestones/v1.0.0","labels_url":"https://api.github.com/repos/CindyJS/CindyJS/milestones/1/labels","id":1383222,"number":1,"title":"v1.0.0","description":"While the v0.x.y versions of early development may introduce breaking changes on each minor version bump (bump to x), according to [semantic versioning](http://semver.org/) we should be ready to maintain our public interfaces for the whole lifetime of version 1 (i.e. all the 1.x.y). All issues which will have to break compatibility should be scheduled before that, until we are ready to make the release. No widget created for v1.0.0 should break for any v1.x.y unless it relied on a fairly obvious bug.","creator":{"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},"open_issues":2,"closed_issues":0,"state":"open","created_at":"2015-10-29T11:06:50Z","updated_at":"2016-10-17T13:58:57Z","due_on":null,"closed_at":null},"comments":0,"created_at":"2016-10-17T13:58:57Z","updated_at":"2016-10-17T13:58:57Z","closed_at":null,"body":"Quoting form [a source comment](https://github.com/CindyJS/CindyJS/blob/v0.8.1/src/js/libgeo/GeoState.js#L142-L144):\r\n\r\n> This function [`applyMat`] looks broken. It seems as if the linear portion of the matrix is multiplied from the left, but the translation is multiplied from the right. Very confusing!\r\n\r\nWe should try to get our intended semantics straight here. Since doing so may break compatibility in some places, we should definitely do so before the 1.0 release.\r\n\r\nHere is an experiment to see what Cinderella is doing.\r\n\r\n```\r\ndraw((1,1)); // at 1,1\r\ngsave();\r\ntranslate((2,2));\r\nscale(2);\r\ndraw((0,0), color->[0,0,1]); // at 2,2\r\ndraw((1,1)); // at 4,4\r\ngrestore();\r\n```\r\n\r\nSo apparently each successive transformation gets executed in the context of the previous one. Which means the matrix should get applied to the “homog” side of things, not to the “pixel” side. The matrix in CindyJS is essentially a matrix from “homog” to “pixel” (as indicated by the `csport.from` function). So we want to always multiply a new transformation from the right. Right?\r\n\r\nIn Cinderella, calls to `scale` or `translate` eventually end up at `GenericRenderer.applyTransformation` where the additional transformation is multiplied *from the left* to the current basis transformation. Could it be that Cinderella is using the primal transformation to map pixel coordinates to homog coordinates instead of the other way round?"}}
{"actor":{"display_login":"gagern"}}