{"id":3260,"date":"2022-04-08T21:24:24","date_gmt":"2022-04-08T21:24:24","guid":{"rendered":"https:\/\/handandmachine.org\/classes\/computational_fabrication\/?p=3260"},"modified":"2022-04-08T21:24:25","modified_gmt":"2022-04-08T21:24:25","slug":"jorge-loredo-g-code","status":"publish","type":"post","link":"https:\/\/handandmachine.org\/classes\/computational_fabrication\/2022\/04\/08\/jorge-loredo-g-code\/","title":{"rendered":"Jorge Loredo &#8211; G-code"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">The first shape I rendered with G-code was this really cool circular pattern below. I achieved it by simply adding a CircleDeviation() function to my turtle where it would draw a circle on each side of the polygon every layer. Although the shape seemed very nice, I figured it wasn\u2019t viable to print it since the turtle would just smash into the shape while printing since the paths of the circles intersect.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><img loading=\"lazy\" decoding=\"async\" width=\"296\" height=\"302\" src=\"https:\/\/lh6.googleusercontent.com\/_Fp4MNzmDtJXXOm5hQE1Mi4ISa09hRqofueWRn_piUp2X2rheXElf92awcHv_rIAIT39L6wdi1kqEK1C36_iW83TQ9GjXX9-hb5bhAVJ5vQex4qKj1_8S4jRUQLhxvphhBicqf3-\"><img loading=\"lazy\" decoding=\"async\" width=\"624\" height=\"429\" src=\"https:\/\/lh6.googleusercontent.com\/nMZsciKOLR2aazZLySfvaio8Sz7l32OOMAyq3mqlAqL3xj5_Yspd-qpB-j24Zp32XdcA1gMdgSuceHYOZFIibAGYEl6LVfQRC5sxHPeAdf4X0Zd8ySMTiR86E1mG5tpTAvF2anGO\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Here is the function that I added to my python code.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh4.googleusercontent.com\/wUKjF7fJ8Kse5D5EJpX-F1xAn6cf1gbrekRE0VcaxbHnSVx1bdn9K-TPq9XsUenIJpQ27sp-U_yj8AejeyEMXbHQyIQiL2FW8E4a2rx_gTJUKaVx0gsxdRf8jE8U-v6o0H-zPXGg\" alt=\"\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">My second stage was messing with my code and simply changing the size of the circles so they wouldn\u2019t intersect and the turtle could print freely.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh3.googleusercontent.com\/9w3BopCUWmxPu9xupvoIkyzOadYxYb6TfMLjIa-V26dW4HXrL-CYoCaGpkA5cC26MABveYzgO17O4KH71lDCxKEP0cMgMNqAZoDTc9QOszOI19p9zVlxVuo0iko-lOsyeSev_8NB\" alt=\"\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh5.googleusercontent.com\/Ye1EeZ-pPQNcKEMdDrgtmXb3AYyeYvyLSswGmxJSpEHm3if6ZyCEWAMvdx518BjpwG6ePWK-RuNna435fP6cYxvJCd6Im_LxvfrMx2Kt-jGij5GDM9DA3uG-l7u7yxiy9MErmyIk\" alt=\"\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh6.googleusercontent.com\/9P3z5DfRXD5OMyOeEqnRP7r67V2YXZqDq1Mcy12oUYzIeJPNyC_ws5cwoBD8DuejwiR75gg2uJbBKH4hgeC3T37m0SETSuWdhrtv0b_wpuSu2axzAoXvliMgk7Wtg9NId2YvRmnc\" alt=\"\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Here is a picture with the code with the new size<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><img loading=\"lazy\" decoding=\"async\" width=\"366\" height=\"259\" src=\"https:\/\/lh3.googleusercontent.com\/EkFhqDcfrArQKCZWMTYBFmUWS6NU33xX41KwSEx001xX8S_LHJBu6fZHJ1-P02XT58rvWY3gp1PsSEfD8n95blnTilwYZQhBP-JVmwEDsYEa7gBDJXb0-QXi72SczMiSpnCJ6Po3\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">After that, I made the variables input sliders so I could easily mess with my shape:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><img loading=\"lazy\" decoding=\"async\" width=\"624\" height=\"449\" src=\"https:\/\/lh3.googleusercontent.com\/KEk6gS5CEJmwRc8jE7d4b3BXdPT41Golx24aGz0GyQ9cBZFh7ntpvzWwTYy_-jByScCt5TgueWPAidpOiBBiOFdX6Vp3WeetzcK7k4TNu6na-ipS3SxRmrn-PsRCITMQMc3g8TOE\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The next step was adding an offset in the layers that would actually print the CircleDeviation() in order to create a cool spider web effect. I did that by using mod for assigning a bool when calling my polygon function.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh6.googleusercontent.com\/FWoK5JFl6Y2RshG2a6gLm9wrMcoGeWXamH4gvcq86J21QuUG24iZWY0BPzJQedZuM6CVVONQz-tX-fQ_vkUYGQYx3F8aBiwzCNYatudqRNvPSRz6-7NuCqPHORxIAnTNFV_b-8Um\" alt=\"\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh5.googleusercontent.com\/lr9qxYvQ-E83tTXm1_rZPp65fjeJKaZ8KnoNXDxkhSGv5S5A-eBxPb-87gc78mt4fT8OMQNIxzQ9sO6f5Qj1MmIvnjSq5WhDh6vgmenrXZ6JdKag7o_BvEQYlwuwPzcaf_9zvlB2\" alt=\"\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh4.googleusercontent.com\/Husbi1-Sck2rdyZ5gGaJJlpniWuhbASG5u_MdGFGBWX3xm9cG5fihk2-OwJp5LseTRyFDIf8O9qnM_eIxh7v3bWaIbTyu8rClpM4fFrttKxvLAE6lGVI4MA0P-VNHBHMvTtNa9in\" alt=\"\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh5.googleusercontent.com\/74Bn4_wKHgjNts29fKxE6thxjDV08Z4a-A3udC5IQ7pqEIr6T_8EyLq_7Bz9Lsf7V2boq1lXwLjs6WEl8-CqJfsETGN9DmpOgzemgCXOU5R8d7tnucNiepeuIqE-hEDGdcl71r5I\" alt=\"\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">I also made the value of whatever we were using mod for the layer gap with, an input slider. Which made it easier to experiment with different gaps for every n layer.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><img loading=\"lazy\" decoding=\"async\" width=\"502\" height=\"118\" src=\"https:\/\/lh6.googleusercontent.com\/xdTiyhEZktj0pun0-9lYO7jGL-AVDSqNeYe4oFKDy-LaW7cEzkvXQroH1Np6UxIkZo4SGKT1nlvLRyEmto0EvjcROWpiyfbN9q4r1_UGPiJOYbqiFtNGYsr_bcWudRyDs9CaDo0w\"><img loading=\"lazy\" decoding=\"async\" width=\"624\" height=\"363\" src=\"https:\/\/lh5.googleusercontent.com\/gXvBu41PNuW8X7yZGbE7OgmsCtkiLwA6uOWaFxoFOxjeSY09HiUZextwFZq-GNwJpK6AFT-4cwLS5YdykTHhe28mYTPsfiWGfNIfACJEIEznBGjUjDg2xL_zG26SVwcFWIHPUCDC\"><img loading=\"lazy\" decoding=\"async\" width=\"624\" height=\"549\" src=\"https:\/\/lh4.googleusercontent.com\/SmioOhXZfXpr0XghUzRo_mYuZHeEXn3TtwA1mddXy3tloo0v7QW0RQAWjWXJMVE3g20t0oo421LmJpTZz_Xyf_BnsWHhxQz_buVxwpASdsapqu7zn02uuK4LHcvUhSvOQhwcMWPB\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The last change that I did was adding an input for decreasing the circle deviation size in order to create a tree\/pyramid effect for my shape:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh6.googleusercontent.com\/An-U2F-PM0miuRWdQVjIJD6BNasBCq5oYFUOaINVn6k6oNblZ5GLWqtLyEH9zH--_1msKnJHHp8Vk0XDQZc--XJu_W08Oak4-DhV-Arm12ctJHfdl-uLU8NJlyL3gJfMs9UFXXvg\" alt=\"\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">I made it an input slider as well in order to mess with it easily:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><img loading=\"lazy\" decoding=\"async\" width=\"624\" height=\"317\" src=\"https:\/\/lh5.googleusercontent.com\/B5LYzWwMIm3BeYUmxBdql2ed_vtljMBXREiF4tQa47Al9wYl32oh1GmKJ1Is96SDxBQw_5QKhyUCBIaw9P5rP-z3R-coUKl8aOz1zuIPYK_t5x8LWGb4uuuahEWJlMNGcuXYJ_ZJ\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Here are the images of the result, which is the third and final shape I chose to print:<img loading=\"lazy\" decoding=\"async\" width=\"300\" height=\"341\" src=\"https:\/\/lh3.googleusercontent.com\/xQOegWsckl_WF2U2ZSkB4NH5RJK1hJMTNE6_CP-OnNooerwL-iVgG2z1XZCtUQ10-TCh8gFDSxiIyB24DwbFLlxDWPSDGJqdnVM1VNRmxrO_sSt9l9LGvDd2CA2IYqskqaZ1Q6AY\"><img loading=\"lazy\" decoding=\"async\" width=\"300\" height=\"383\" src=\"https:\/\/lh6.googleusercontent.com\/E1PxA_nC5GsXOBRlucAOsZG88DRThiKUf73g_6C4z-veNdDEuawV2NIvATOaNhlMNaH3R9BsuhK9cyZD3A3HefO-1OqYiwQTU3TYC0NxfXzfJewUeNYFuWfRcyNDJVBVmW1F-Nxf\"><img loading=\"lazy\" decoding=\"async\" width=\"567\" height=\"422\" src=\"https:\/\/lh3.googleusercontent.com\/zxpr5EohFCNB--o9De9cIEWiKN1JcEzzjy3nBWFr3Kl9L_QylEJEMwWZ1lRlJQeJRk82ppwZFV57q2EaOYCcYNKNkdnRtB3g_msYriwubEvT2yVYGxW5RXHP_Sf_2GbN90QL1DVG\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For my first 3D print, my shape was smaller than I thought, which happened because I didn\u2019t think about the units properly when assigning the size variables to my code. The good thing is that it printed properly:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh4.googleusercontent.com\/VO1RWGyzlzDh7djvkAWvb58wOWXvmxelLAKcYQ2zxTpvuvGjGdXUj5gVkl9H0YYm7CBVk-5el45y8CLU1Im7RCEO1pLB5yAuIan-aBLMK3tziC0BWDATnCNFZj00hkX0saTl1rCD\" alt=\"\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh6.googleusercontent.com\/SRq_GkW8R1i3AOFfmNtVxd1QWE3rnhRMMMtIeDejljSzA1giB5IvxxLAF8Or8rsIjehomj78ak5n811Rf8vCXBw_Bjab2lbs8TCsT_lmTyEa966Il6A_n1T8lDrzQJlP9V6lQYoQ\" alt=\"\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh3.googleusercontent.com\/kwv0JsvLxoxzJ4k5f7TdQUv7CeNMA-7kUj0ogawVFXHbJLLrHWKOaxh9TDQQYF6tCQyAndP6IpIAOQsXWiWJ3O7s_EktW5lfM1QKyWxuckqcRkbU4JV3Ln0F65cVR9YGCQthr3Pg\" alt=\"\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh3.googleusercontent.com\/rlcYqnfNAfRY9vBwj_sCTvLjf1X40Ehov0Spl3iTgtGEqBSpL598403bQPkw653foP5iuoasNw6ZGkzirlhPdNh5iz0tmJvfmCS_X_U6JHOlVt1IDfhfdfk45hkJkg_uifG_4Xoa\" alt=\"\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The second shape was the proper size, and it had a different layer gap, which made the circle deviations print in a different way:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh5.googleusercontent.com\/UbilQxd36PZpGMQAwCDqKfrBY9nBUOeug5bick14XtVq697FRyJgRCrU7oYZ8kcNzriCiKsn_bNb7jr5z0wIzcaxJ_Q4RP0oL1ms_rWl9mCniohkd2yfw0F76qi8zR93nS2Jlii3\" alt=\"\" \/><figcaption>This is a failed attempt where the shape was too big<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh5.googleusercontent.com\/BWoAZmajbplGT_cN9YmH8sOSeN8uUm0aMe4YGgNU7QSDWriHnFG69AdIDUq58CFoRRZN6vb6YQufRGVx5jRa5piipSPHRISQm7lWWkAri-GbYPFQop_rjJ5nYAYpm_zibL7c2psa\" alt=\"\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh5.googleusercontent.com\/S2mW1glL5QQypW3AQFnqJuF_C8NXGBTe2JcRYuS62jyh9KxVnhxk2dOAEs5ZseFy8KeSISskRep7uC3V_FXNuDUe9ev2eIZ8mv4o5q1OreGkLOwXTCFT3AdI8d0D8WR_bQ81mhaK\" alt=\"\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The third print was the pyramidal one, it had a different layer gap and it decreased the size of the circles with each iteration:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh4.googleusercontent.com\/CjimBencPQkrw4kGUEqAlMiAnr78Vlx2yXnQnC0Ism8wBAcAw4tVD3hVdUYjhx7c0V0P8k5mVI3hZ7wfaTJfAi0sIPS-DzbPI3ayIdJjyNWtbQspLTu4KWuba4joe_VxfhyO8sjK\" alt=\"\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"320\" height=\"240\" src=\"https:\/\/handandmachine.org\/classes\/computational_fabrication\/wp-content\/uploads\/2022\/04\/IMG_6050.jpg\" alt=\"\" class=\"wp-image-3267\" srcset=\"https:\/\/handandmachine.org\/classes\/computational_fabrication\/wp-content\/uploads\/2022\/04\/IMG_6050.jpg 320w, https:\/\/handandmachine.org\/classes\/computational_fabrication\/wp-content\/uploads\/2022\/04\/IMG_6050-300x225.jpg 300w\" sizes=\"auto, (max-width: 320px) 100vw, 320px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<figure class=\"wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-1 is-layout-flex wp-block-gallery-is-layout-flex\">\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"320\" height=\"240\" data-id=\"3263\" src=\"https:\/\/handandmachine.org\/classes\/computational_fabrication\/wp-content\/uploads\/2022\/04\/IMG_6051.jpg\" alt=\"\" class=\"wp-image-3263\" srcset=\"https:\/\/handandmachine.org\/classes\/computational_fabrication\/wp-content\/uploads\/2022\/04\/IMG_6051.jpg 320w, https:\/\/handandmachine.org\/classes\/computational_fabrication\/wp-content\/uploads\/2022\/04\/IMG_6051-300x225.jpg 300w\" sizes=\"auto, (max-width: 320px) 100vw, 320px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"320\" height=\"240\" data-id=\"3262\" src=\"https:\/\/handandmachine.org\/classes\/computational_fabrication\/wp-content\/uploads\/2022\/04\/IMG_6054.jpg\" alt=\"\" class=\"wp-image-3262\" srcset=\"https:\/\/handandmachine.org\/classes\/computational_fabrication\/wp-content\/uploads\/2022\/04\/IMG_6054.jpg 320w, https:\/\/handandmachine.org\/classes\/computational_fabrication\/wp-content\/uploads\/2022\/04\/IMG_6054-300x225.jpg 300w\" sizes=\"auto, (max-width: 320px) 100vw, 320px\" \/><\/figure>\n<\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"320\" height=\"240\" src=\"https:\/\/handandmachine.org\/classes\/computational_fabrication\/wp-content\/uploads\/2022\/04\/IMG_6055-2.jpg\" alt=\"\" class=\"wp-image-3266\" srcset=\"https:\/\/handandmachine.org\/classes\/computational_fabrication\/wp-content\/uploads\/2022\/04\/IMG_6055-2.jpg 320w, https:\/\/handandmachine.org\/classes\/computational_fabrication\/wp-content\/uploads\/2022\/04\/IMG_6055-2-300x225.jpg 300w\" sizes=\"auto, (max-width: 320px) 100vw, 320px\" \/><figcaption>The final collection<\/figcaption><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>The first shape I rendered with G-code was this really cool circular pattern below. I achieved it by simply adding a CircleDeviation() function to my turtle where it would draw a circle on each side of the polygon every layer. Although the shape seemed very nice, I figured it wasn\u2019t viable to print it since the turtle would just smash [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[18],"tags":[],"class_list":["post-3260","post","type-post","status-publish","format-standard","hentry","category-large-assignment-4-g-code"],"_links":{"self":[{"href":"https:\/\/handandmachine.org\/classes\/computational_fabrication\/wp-json\/wp\/v2\/posts\/3260","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/handandmachine.org\/classes\/computational_fabrication\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/handandmachine.org\/classes\/computational_fabrication\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/handandmachine.org\/classes\/computational_fabrication\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/handandmachine.org\/classes\/computational_fabrication\/wp-json\/wp\/v2\/comments?post=3260"}],"version-history":[{"count":1,"href":"https:\/\/handandmachine.org\/classes\/computational_fabrication\/wp-json\/wp\/v2\/posts\/3260\/revisions"}],"predecessor-version":[{"id":3268,"href":"https:\/\/handandmachine.org\/classes\/computational_fabrication\/wp-json\/wp\/v2\/posts\/3260\/revisions\/3268"}],"wp:attachment":[{"href":"https:\/\/handandmachine.org\/classes\/computational_fabrication\/wp-json\/wp\/v2\/media?parent=3260"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/handandmachine.org\/classes\/computational_fabrication\/wp-json\/wp\/v2\/categories?post=3260"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/handandmachine.org\/classes\/computational_fabrication\/wp-json\/wp\/v2\/tags?post=3260"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}