{"id":360,"date":"2019-07-24T06:08:39","date_gmt":"2019-07-24T13:08:39","guid":{"rendered":"http:\/\/fx-td.com\/houdiniandchill\/?p=360"},"modified":"2019-07-24T06:08:40","modified_gmt":"2019-07-24T13:08:40","slug":"archived-post-by-rich-lord-5","status":"publish","type":"post","link":"http:\/\/fx-td.com\/houdiniandchill\/2019\/07\/24\/archived-post-by-rich-lord-5\/","title":{"rendered":"Archived post by rich lord"},"content":{"rendered":"<p class=\"\">`\/\/ formula to change from one space to another \/\/ P = inverse(m1) * m2<br \/>\n\/\/ get the position and orient data vector  start_p      = point(0, &#8220;P&#8221;, 1); vector  end_p        = point(0, &#8220;P&#8221;, 2); vector4 start_orient = point(0, &#8220;orient&#8221;, 1); vector4 end_orient   = point(0, &#8220;orient&#8221;, 2);<br \/>\n\/\/ calculate the blended values float blend         = fit(@Frame, 1, 48, 0, 1); end_p               = lerp(start_p, end_p, blend); end_orient          = slerp(start_orient, end_orient, blend);<br \/>\n\/\/ matrix at start matrix3 start_m  = qconvert(start_orient); vector start_n   = set(start_m.zx, start_m.zy, start_m.zz); vector start_up  = set(start_m.yx, start_m.yy, start_m.yz); matrix a         = maketransform(start_n, start_up, start_p);<br \/>\n\/\/ matrix at end matrix3 end_m    = qconvert(end_orient); vector end_n     = set(end_m.zx, end_m.zy, end_m.zz); vector end_up    = set(end_m.yx, end_m.yy, end_m.yz); matrix b         = maketransform(end_n, end_up, end_p);<br \/>\nmatrix final = invert(a) * b; pos = pos * final;`<\/p>\n<p class=\"\">There we go! Thanks so much! @TOADSTORM + @jake rice \ud83d\ude2e  . Infinite fishies for me!<\/p>\n<p class=\"\">Need to handle scale, but I already have code for that.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>`\/\/ formula to change from one space to another \/\/ P = inverse(m1) * m2 \/\/ get the position and orient data vector start_p = point(0, &#8220;P&#8221;, 1); vector end_p = point(0, &#8220;P&#8221;, 2); vector4 start_orient = point(0, &#8220;orient&#8221;, 1); vector4 end_orient = point(0, &#8220;orient&#8221;, 2); \/\/ calculate the blended values float blend = fit(@Frame, &hellip; <a href=\"http:\/\/fx-td.com\/houdiniandchill\/2019\/07\/24\/archived-post-by-rich-lord-5\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Archived post by rich lord<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[2],"tags":[],"_links":{"self":[{"href":"http:\/\/fx-td.com\/houdiniandchill\/wp-json\/wp\/v2\/posts\/360"}],"collection":[{"href":"http:\/\/fx-td.com\/houdiniandchill\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/fx-td.com\/houdiniandchill\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/fx-td.com\/houdiniandchill\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/fx-td.com\/houdiniandchill\/wp-json\/wp\/v2\/comments?post=360"}],"version-history":[{"count":0,"href":"http:\/\/fx-td.com\/houdiniandchill\/wp-json\/wp\/v2\/posts\/360\/revisions"}],"wp:attachment":[{"href":"http:\/\/fx-td.com\/houdiniandchill\/wp-json\/wp\/v2\/media?parent=360"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/fx-td.com\/houdiniandchill\/wp-json\/wp\/v2\/categories?post=360"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/fx-td.com\/houdiniandchill\/wp-json\/wp\/v2\/tags?post=360"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}