{"id":5407,"date":"2012-10-28T15:41:16","date_gmt":"2012-10-28T07:41:16","guid":{"rendered":"http:\/\/www.intmath.com\/blog\/?p=5407"},"modified":"2014-11-16T20:26:11","modified_gmt":"2014-11-16T12:26:11","slug":"math-inspired-halloween-pumpkin","status":"publish","type":"post","link":"https:\/\/www.intmath.com\/blog\/mathematics\/math-inspired-halloween-pumpkin-5407","title":{"rendered":"Math-inspired Halloween Pumpkin"},"content":{"rendered":"<p>In the spirit of Halloween, Yu-Sung Chang of Wolfram used Mathematica to <a href=\"http:\/\/blog.wolfram.com\/2011\/10\/28\/industrial-pumpkin-carving-with-mathematica\/\">&quot;carve&quot; a mathematically generated pumpkin<\/a>. <\/p>\n<p>Chang explains the process of creating the 3-D pumpkin shape using Mathematica. He shows how the overall chape (vertical cross-section) and indentations (seen in the horizontal cross-section) were developed via the use of B-splines. (A <strong>spline<\/strong> is a smooth curve passing through several points, and a <a href=\"https:\/\/en.wikipedia.org\/wiki\/B-spline\">B-spline<\/a> is a generalization of the better-known Bezier Curve.) <\/p>\n<p>The article includes a CDF (computable document format) download, so you can tweak certain parameters. <\/p>\n<p>Here is the base of Chang's resulting pumpkin. <\/p>\n<p><img loading=\"lazy\" src=\"\/blog\/wp-content\/images\/2012\/10\/original-pumpkin.gif\" alt=\"Math-based Halloween pumpkin \" width=\"234\" height=\"200\" \/><\/p>\n<p>I felt it was too flat, and in the above screen shot, it looks a bit like a space capsule re-entering the Earth's atmosphere! <\/p>\n<p>So I tweaked the cross-sectional spline giving a pumpkin with a bit more natural shape. Here's the result. <\/p>\n<p><img loading=\"lazy\" src=\"\/blog\/wp-content\/images\/2012\/10\/improved-pumpkin-3.gif\" alt=\"Math-based Halloween pumpkin \" width=\"432\" height=\"554\" \/><\/p>\n<p>In the above screen shot from the CDF, you can see the cross-section with sliders that allow you to change the number and depth of the ribs of the pumpkin. At the lower right you can see the spline shape which is rotated about the contral axis to produce the pumpkin. <\/p>\n<p>Chang then explains  how to carve out a shape in our mathematically-generated pumpkin, using a texture-mapping technique. <\/p>\n<p>Here's the result.<\/p>\n<p><img loading=\"lazy\" src=\"\/blog\/wp-content\/images\/2012\/10\/pumpkin-halloween-math-cutout3.gif\" alt=\"Math-based Halloween pumpkin \" width=\"338\" height=\"261\" \/><\/p>\n<p>Go check out the <a href=\"http:\/\/blog.wolfram.com\/2011\/10\/28\/industrial-pumpkin-carving-with-mathematica\/\">original Wolfram blog article<\/a> and be sure to download the  <a href=\"http:\/\/blog.wolfram.com\/data\/uploads\/2011\/10\/IndustrialPumpkinCarving.cdf\">Computable Document Format (CDF) file<\/a> so you can make your own adjustments to the pumpkin. (You'll need the CDF player plug-in which is certainly worth having because you can then play with many other <a href=\"http:\/\/demonstrations.wolfram.com\/\">math interactives on the Wolfram site<\/a>.) <\/p>\n<p>Happy Halloween!  <\/p>\n<p class=\"alt\">See the <a href=\"https:\/\/www.intmath.com\/blog\/mathematics\/math-inspired-halloween-pumpkin-5407#comments\" id=\"comms\">2 Comments<\/a> below.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>  <a href=\"https:\/\/www.intmath.com\/blog\/mathematics\/math-inspired-halloween-pumpkin-5407\"><img loading=\"lazy\" src=\"\/blog\/wp-content\/images\/2012\/10\/pumpkin-halloween-math-cutout2.gif\" alt=\"Math-based Halloween pumpkin\" title=\"Math-based Halloween pumpkin\" width=\"128\" height=\"100\" class=\"imgRt\" \/><\/a><br \/>\nHere's a neat mathematically-generated Halloween pumpkin, developed using Mathematica. You can manipulate it using the supplied CDF document.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mo_disable_npp":""},"categories":[4],"tags":[125,127],"_links":{"self":[{"href":"https:\/\/www.intmath.com\/blog\/wp-json\/wp\/v2\/posts\/5407"}],"collection":[{"href":"https:\/\/www.intmath.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.intmath.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.intmath.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.intmath.com\/blog\/wp-json\/wp\/v2\/comments?post=5407"}],"version-history":[{"count":0,"href":"https:\/\/www.intmath.com\/blog\/wp-json\/wp\/v2\/posts\/5407\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.intmath.com\/blog\/wp-json\/wp\/v2\/media?parent=5407"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.intmath.com\/blog\/wp-json\/wp\/v2\/categories?post=5407"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.intmath.com\/blog\/wp-json\/wp\/v2\/tags?post=5407"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}