{"id":3301,"date":"2018-01-02T14:52:19","date_gmt":"2018-01-02T13:52:19","guid":{"rendered":"http:\/\/roboblog.fatal-fury.de\/?p=3301"},"modified":"2018-01-02T14:52:19","modified_gmt":"2018-01-02T13:52:19","slug":"cadcam-heightmap-part-2","status":"publish","type":"post","link":"http:\/\/roboblog.fatal-fury.de\/?p=3301","title":{"rendered":"CAD\/CAM heightmap Part 2"},"content":{"rendered":"<p><a href=\"http:\/\/roboblog.fatal-fury.de\/wp-content\/uploads\/2017\/12\/dolphin.png\" rel=\"attachment wp-att-3289\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/roboblog.fatal-fury.de\/wp-content\/uploads\/2017\/12\/dolphin.png\" alt=\"dolphin\" width=\"487\" height=\"275\" class=\"alignnone size-full wp-image-3289\" srcset=\"http:\/\/roboblog.fatal-fury.de\/wp-content\/uploads\/2017\/12\/dolphin.png 487w, http:\/\/roboblog.fatal-fury.de\/wp-content\/uploads\/2017\/12\/dolphin-300x169.png 300w\" sizes=\"auto, (max-width: 487px) 100vw, 487px\" \/><\/a><\/p>\n<p>Dieses mal versuche ich eine rotierte Heightmap zu erzeugen. Dabei wird das Modell um die Y Achse rotiert und zwar um den Mittelpunkt von Modell.<\/p>\n<pre class=\"brush: cpp; title: ; notranslate\" title=\"\">\r\n    \/\/ origin y is z\r\n    Point3D rotateAroundY(const double angle, const Point2D&amp; origin) const {\r\n        const auto c = std::cos(deg2rad(angle));\r\n        const auto s = std::sin(deg2rad(angle));\r\n        const auto xnew = c*(x()-origin.x()) - s*(z()-origin.y()) + origin.x();\r\n        const auto znew = s*(x()-origin.x()) + c*(z()-origin.y()) + origin.y();\r\n        return Point3D{xnew, y(), znew};\r\n\r\n    }\r\n<\/pre>\n<p>Das Endergebnis sieht auf den ersten Blick etwas komisch aus, aber ich denke, es ist richtig. Einmal hat man die Ansicht von Unten. Dann seitlich und von Oben, mit der R\u00fcckenflosse.<\/p>\n<p><a href=\"http:\/\/roboblog.fatal-fury.de\/wp-content\/uploads\/2018\/01\/heightmapRot.png\" rel=\"attachment wp-att-3305\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/roboblog.fatal-fury.de\/wp-content\/uploads\/2018\/01\/heightmapRot.png\" alt=\"heightmapRot\" width=\"651\" height=\"360\" class=\"alignnone size-full wp-image-3305\" srcset=\"http:\/\/roboblog.fatal-fury.de\/wp-content\/uploads\/2018\/01\/heightmapRot.png 651w, http:\/\/roboblog.fatal-fury.de\/wp-content\/uploads\/2018\/01\/heightmapRot-300x166.png 300w\" sizes=\"auto, (max-width: 651px) 100vw, 651px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Dieses mal versuche ich eine rotierte Heightmap zu erzeugen. Dabei wird das Modell um die Y Achse rotiert und zwar um den Mittelpunkt von Modell. \/\/ origin y is z Point3D rotateAroundY(const double angle, const Point2D&amp; origin) const { const auto c = std::cos(deg2rad(angle)); const auto s = std::sin(deg2rad(angle)); const auto xnew = c*(x()-origin.x()) - [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[17],"class_list":["post-3301","post","type-post","status-publish","format-standard","hentry","category-allgemein","tag-cpp"],"_links":{"self":[{"href":"http:\/\/roboblog.fatal-fury.de\/index.php?rest_route=\/wp\/v2\/posts\/3301","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/roboblog.fatal-fury.de\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/roboblog.fatal-fury.de\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/roboblog.fatal-fury.de\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/roboblog.fatal-fury.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3301"}],"version-history":[{"count":6,"href":"http:\/\/roboblog.fatal-fury.de\/index.php?rest_route=\/wp\/v2\/posts\/3301\/revisions"}],"predecessor-version":[{"id":3308,"href":"http:\/\/roboblog.fatal-fury.de\/index.php?rest_route=\/wp\/v2\/posts\/3301\/revisions\/3308"}],"wp:attachment":[{"href":"http:\/\/roboblog.fatal-fury.de\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3301"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/roboblog.fatal-fury.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3301"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/roboblog.fatal-fury.de\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3301"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}