{"id":2858,"date":"2023-01-27T14:30:59","date_gmt":"2023-01-27T06:30:59","guid":{"rendered":"https:\/\/www.caiqinyi.cn\/?p=2858"},"modified":"2025-02-26T11:34:40","modified_gmt":"2025-02-26T03:34:40","slug":"barycentric_coordinates_perspective_correct","status":"publish","type":"post","link":"https:\/\/www.caiqinyi.cn\/index.php\/2023\/01\/27\/barycentric_coordinates_perspective_correct\/","title":{"rendered":"\u91cd\u5fc3\u5750\u6807\u7684\u900f\u89c6\u6821\u6b63"},"content":{"rendered":"<p><script type=\"text\/javascript\" async src=\"https:\/\/www.caiqinyi.cn\/wp-content\/MathJax\/MathJax.js?config=TeX-AMS_CHTML\">\n<\/script><br \/>\n<script type=\"text\/x-mathjax-config\">\n    MathJax.Hub.Config({\n        tex2jax: {inlineMath: [['$','$']]},\n        TeX: {equationNumbers: {autoNumber: [\"AMS\"], useLabelIds: true}},\n        \"HTML-CSS\": {linebreaks: {automatic: true}},\n        SVG: {linebreaks: {automatic: true}}\n    });\n<\/script><\/p>\n<p>\u8fc7\u5e74\u671f\u95f4, \u6ca1\u5565\u5fc3\u601d\u73a9\u6e32\u67d3, \u53c8\u64cd\u8d77\u8001\u672c\u884c\u7814\u7a76\u8d77\u4e86\u4ee3\u6570\u62d3\u6251( \u2022\u0300 \u03c9 \u2022\u0301 )y~ \u4f46\u8fd9\u4e24\u5929\u8f6c\u5ff5\u4e00\u60f3, \u81ea\u5df1\u7684\u8f6f\u5149\u6805\u6e32\u67d3\u5668\u8fd8\u6709\u6700\u540e\u4e00\u70b9\u5173\u4e8e\u91cd\u5fc3\u5750\u6807\u7684\u900f\u89c6\u6821\u6b63\u7684\u95ee\u9898\u9700\u8981\u601d\u8003, \u90a3\u5c31\u4e89\u53d6\u5728\u6625\u8282\u5047\u671f\u7ed3\u675f\u524d\u7ec8\u7ed3\u4e86\u8f6f\u5149\u6805\u6e32\u67d3\u5668\u8fd9\u4e00\u5757\u53ed~<\/p>\n<p><!--more--><\/p>\n<p><strong>\u53c2\u8003\u6750\u6599<\/strong><br \/>\n1. <a href=\"https:\/\/github.com\/ssloy\/tinyrenderer\/wiki\/Technical-difficulties:-linear-interpolation-with-perspective-deformations\">Technical difficulties: linear interpolation with perspective deformations<\/a><br \/>\n2. <a href=\"https:\/\/zhuanlan.zhihu.com\/p\/448575965\">[\u6570\u5b66] \u91cd\u5fc3\u5750\u6807\u63d2\u503c\u4e0e\u900f\u89c6\u6821\u6b63\u63d2\u503c<\/a><br \/>\n3. <a href=\"https:\/\/zhuanlan.zhihu.com\/p\/403259571\">\u56fe\u5f62\u5b66 &#8211; \u5173\u4e8e\u900f\u89c6\u77eb\u6b63\u63d2\u503c\u90a3\u4e9b\u4e8b<\/a><br \/>\n4. <a href=\"https:\/\/zhuanlan.zhihu.com\/p\/483759206\">\u6295\u5f71\u4e0b\u5149\u6805\u5316\u63d2\u503c\u65b9\u6cd5<\/a><br \/>\n5. Shirley P, Ashikhmin M, Marschner S. Fundamentals of computer graphics[M]. AK Peters\/CRC Press, 2009.<br \/>\n6. <a href=\"https:\/\/blog.csdn.net\/Motarookie\/article\/details\/124284471\">\u3010\u91cd\u5fc3\u5750\u6807\u63d2\u503c\u3001\u900f\u89c6\u77eb\u6b63\u63d2\u503c\u3011\u539f\u7406\u4ee5\u53ca\u7528\u6cd5\u89c1\u89e3(GAMES101\u6df1\u5ea6\u6d4b\u8bd5\u90e8\u5206\u8ba8\u8bba)<\/a><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.caiqinyi.cn\/wp-content\/uploads\/2023\/01\/\u900f\u89c6\u6821\u6b63\u63d2\u503c.jpg\" alt=\"\" width=\"1817\" height=\"1000\" class=\"aligncenter size-full wp-image-2861\" srcset=\"https:\/\/www.caiqinyi.cn\/wp-content\/uploads\/2023\/01\/\u900f\u89c6\u6821\u6b63\u63d2\u503c.jpg 1817w, https:\/\/www.caiqinyi.cn\/wp-content\/uploads\/2023\/01\/\u900f\u89c6\u6821\u6b63\u63d2\u503c-300x165.jpg 300w, https:\/\/www.caiqinyi.cn\/wp-content\/uploads\/2023\/01\/\u900f\u89c6\u6821\u6b63\u63d2\u503c-768x423.jpg 768w, https:\/\/www.caiqinyi.cn\/wp-content\/uploads\/2023\/01\/\u900f\u89c6\u6821\u6b63\u63d2\u503c-1536x845.jpg 1536w\" sizes=\"(max-width: 1817px) 100vw, 1817px\" \/><\/p>\n<p align=\"center\"><em>\u900f\u89c6\u6821\u6b63\u63d2\u503c-\u56fe\u7247\u6765\u81ea\u53c2\u8003\u6750\u65992<\/em><\/p>\n<p><strong>\u95ee\u9898:<\/strong> \u5df2\u77e5\u5c4f\u5e55\u7a7a\u95f4\u4e2d$\\triangle A&#8217; B&#8217; C&#8217;$\u7684\u6240\u6709\u9876\u70b9\u5750\u6807\u548c\u5c4f\u5e55\u7a7a\u95f4\u4e2d$P&#8217;$\u70b9\u5750\u6807, \u5176\u4e2d, \u70b9$P&#8217;$\u5728$\\triangle A&#8217; B&#8217; C&#8217;$\u4e2d\u7684\u91cd\u5fc3\u5750\u6807\u4e3a$(\\alpha&#8217;, \\beta&#8217;, \\gamma&#8217;)$, $\\triangle A&#8217; B&#8217; C&#8217;$\u5728\u88c1\u526a\u7a7a\u95f4\u4e2d\u5bf9\u5e94\u7684\u4e09\u89d2\u5f62\u4e3a$\\triangle ABC$, \u6c42\u70b9$P&#8217;$\u5728\u88c1\u526a\u7a7a\u95f4\u4e2d\u5bf9\u5e94\u7684\u70b9$P$\u5728$\\triangle ABC$\u4e2d\u7684\u91cd\u5fc3\u5750\u6807$(\\alpha $$ , \\beta, \\gamma)$.<br \/>\n<del datetime=\"2025-02-25T11:23:09+00:00\">$\\\\$ <strong>\u89e31:<\/strong> \u4e8c\u7ef4\u60c5\u5f62\u4e0b\u7684\u63a8\u5bfc\u8be6\u89c1\u53c2\u8003\u6750\u65993, \u6211\u4eec\u8fd9\u91cc\u76f4\u63a5\u4ece\u4e8c\u7ef4\u63a8\u5bfc\u51fa\u4e09\u7ef4\u7a7a\u95f4\u4e2d$w$\u5206\u91cf\u5e94\u8be5\u4e3a:$$w = \\frac{1}{\\frac{\\alpha&#8217;}{w_A} + \\frac{\\beta&#8217;}{w_B} + \\frac{\\gamma&#8217;}{w_C}},$$\u5176\u4e2d$\\alpha&#8217;, \\beta&#8217;$\u4e0e$\\gamma&#8217;$\u6ee1\u8db3$P&#8217; = \\alpha&#8217; A&#8217; + \\beta B&#8217; + \\gamma&#8217; C&#8217;$. \u5219\u6211\u4eec\u53ef\u4ee5\u77e5\u9053:$$z = w(\\frac{\\alpha&#8217;}{w_A} z_A + \\frac{\\beta&#8217;}{w_B} z_B + \\frac{\\gamma&#8217;}{w_C} z_C) \\\\ = \\frac{\\frac{\\alpha&#8217;}{w_A} z_A + \\frac{\\beta&#8217;}{w_B} z_B + \\frac{\\gamma&#8217;}{w_C} z_C}{\\frac{\\alpha&#8217;}{w_A} + \\frac{\\beta&#8217;}{w_B} + \\frac{\\gamma&#8217;}{w_C}}.$$$\\\\$ <strong>\u89e32:<\/strong> \u6211\u4eec\u77e5\u9053\u4e09\u7ef4\u5411\u91cf$v$\u5728\u4f5c\u6295\u5f71\u53d8\u6362\u65f6, \u4f1a\u7ed9$w$\u5206\u91cf\u8865\u4e0a1, \u5373\u53d8\u6210$(v^T, 1)^T$, \u518d\u7528$4 \\times 4$\u77e9\u9635\u53d8\u6362, \u4ee4\u77e9\u9635\u5de6\u4e0a$3 \\times 3$\u90e8\u5206\u4e3a$M$, \u53f3\u4e0a$3 $$ \\times 1$\u90e8\u5206\u4e3a\u5411\u91cf$t$, \u5373\u53ef\u4ee5\u5c06\u6295\u5f71\u53d8\u6362\u540e\u7ed3\u679c\u5199\u6210$((Mv + t)^T, w)^T$, \u5230\u5149\u6805\u5316\u9636\u6bb5\u8981\u5bf9\u5411\u91cf$Mv + t$\u4f5c\u9f50\u6b21\u9664\u6cd5(\u4ee5\u53ca\u50cf\u7d20\u8f6c\u6362\u7684\u4eff\u5c04\u53d8\u6362), \u8fd9\u6837\u5411\u91cf$Mv + t$\u5c31\u53d8\u6210\u4e86$(Mv + t) \/ w$, \u4e4b\u540e\u518d\u4f5c\u4eff\u5c04\u53d8\u6362, \u4f46\u5bf9\u63d2\u503c\u65e0\u5f71\u54cd.<br \/>\n$\\\\$ \u8fd9\u6837\u9f50\u6b21\u9664\u6cd5\u4e4b\u540e\u7684\u4e09\u4e2a\u70b9\u5c31\u6210\u4e86$(MA + t) \/ w_A$, $(MB + t) \/ $$ w_B$, $(MC + $$ t) \/ w_C$, \u6ee1\u8db3$$P&#8217; = \\alpha&#8217; ((MA + t) \/ w_A) \\\\ + \\beta&#8217; ((MB + t) \/ w_B) + \\gamma&#8217; ((MC + t) \/ w_C),$$\u800c$P&#8217;$\u4e5f\u662f$P = \\alpha A + \\beta B + \\gamma C$\u901a\u8fc7\u9f50\u6b21\u9664\u6cd5\u5f97\u5230\u7684, \u6240\u4ee5$$(M(\\alpha A + \\beta B + \\gamma C) + t) \/ w_P = \\\\ \\alpha&#8217; ((MA + t) \/ w_A) + \\beta&#8217; ((MB + t) \/ w_B) + \\gamma&#8217; ((MC + t) \/ w_C).$$\u56e0\u4e3a$A, B$\u4e0e$C$\u90fd\u662f\u4efb\u610f\u5411\u91cf, \u9700\u8981\u6ee1\u8db3$A, B$\u4e0e$C$\u524d\u7684\u7cfb\u6570\u5728\u65b9\u7a0b\u4e24\u8fb9\u76f8\u7b49, \u53ef\u4ee5\u5f97\u51fa\u6bd4\u4f8b$$\\alpha : \\beta : \\gamma = \\alpha&#8217; \/ w_A : \\beta&#8217; \/ w_B : \\gamma&#8217; \/ w_C,$$\u800c\u56e0\u4e3a$\\alpha + \\beta + \\gamma = 1$, \u6545\u5728\u4f7f\u7528$\\alpha&#8217; \/ w_A$\u4ee3\u66ff$\\alpha$, $\\beta&#8217; \/ w_B$\u4ee3\u66ff$\\beta$\u4e0e$\\gamma&#8217; $$ \/ w_C$\u4ee3\u66ff$\\gamma$\u65f6\u8fd8\u9700\u8981\u8fdb\u884c\u5f52\u4e00\u5316.<\/del><br \/>\n$\\\\$ <strong>\u89e3:<\/strong> \u8be6\u89c1\u53c2\u8003\u6750\u65996(\u4f5c\u8005\u7684\u89e3\u6cd5\u5341\u5206\u6e05\u6670\u7b80\u6d01, \u76f8\u6bd4\u4e4b\u4e0b, \u81ea\u5df1\u7684\u89e3\u6cd5\u663e\u5f97\u6742\u4e71\u65e0\u7ae0, \u4ee4\u4eba\u4e00\u5934\u96fe\u6c34, \u5b9e\u5728\u60ed\u6127\u56e7).<br \/>\n$\\\\$ PS: \u4e0a\u8ff0\u6bd4\u4f8b\u5173\u7cfb\u7684\u6210\u7acb\u9690\u5f0f\u5229\u7528\u4e86$A, B$\u4e0e$C$\u5411\u91cf\u7684\u6b63\u4ea4\u6027, \u82e5\u4ec5\u6709\u7ebf\u6027\u65e0\u5173\u6027\u8fd8\u9700\u7ed3\u5408\u8303\u5fb7\u8499\u5fb7\u884c\u5217\u5f0f, \u6545\u76ee\u524d\u770b\u6765, \u4e0a\u8ff0\u6bd4\u4f8b\u5173\u7cfb\u662f\u4e0d\u4e25\u683c\u6210\u7acb\u7684.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u8fc7\u5e74\u671f\u95f4, \u6ca1\u5565\u5fc3\u601d\u73a9\u6e32\u67d3, \u53c8\u64cd\u8d77\u8001\u672c\u884c\u7814\u7a76\u8d77\u4e86\u4ee3\u6570\u62d3\u6251( \u2022\u0300 \u03c9 \u2022\u0301 )y~ \u4f46\u8fd9\u4e24\u5929\u8f6c\u5ff5\u4e00\u60f3, \u81ea\u5df1 &hellip; <a href=\"https:\/\/www.caiqinyi.cn\/index.php\/2023\/01\/27\/barycentric_coordinates_perspective_correct\/\" class=\"more-link\">\u7ee7\u7eed\u9605\u8bfb<span class=\"screen-reader-text\">\u91cd\u5fc3\u5750\u6807\u7684\u900f\u89c6\u6821\u6b63<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[],"_links":{"self":[{"href":"https:\/\/www.caiqinyi.cn\/index.php\/wp-json\/wp\/v2\/posts\/2858"}],"collection":[{"href":"https:\/\/www.caiqinyi.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.caiqinyi.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.caiqinyi.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.caiqinyi.cn\/index.php\/wp-json\/wp\/v2\/comments?post=2858"}],"version-history":[{"count":35,"href":"https:\/\/www.caiqinyi.cn\/index.php\/wp-json\/wp\/v2\/posts\/2858\/revisions"}],"predecessor-version":[{"id":3645,"href":"https:\/\/www.caiqinyi.cn\/index.php\/wp-json\/wp\/v2\/posts\/2858\/revisions\/3645"}],"wp:attachment":[{"href":"https:\/\/www.caiqinyi.cn\/index.php\/wp-json\/wp\/v2\/media?parent=2858"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.caiqinyi.cn\/index.php\/wp-json\/wp\/v2\/categories?post=2858"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.caiqinyi.cn\/index.php\/wp-json\/wp\/v2\/tags?post=2858"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}