{"id":207,"date":"2012-03-07T13:10:05","date_gmt":"2012-03-07T21:10:05","guid":{"rendered":"http:\/\/research.engineering.ucdavis.edu\/biosport\/?p=207"},"modified":"2014-06-19T12:36:54","modified_gmt":"2014-06-19T20:36:54","slug":"pin-pin-collision-detection-and-response","status":"publish","type":"post","link":"https:\/\/research.engineering.ucdavis.edu\/biosport\/pin-pin-collision-detection-and-response\/","title":{"rendered":"Pin-pin collision detection and response"},"content":{"rendered":"<p>by Andrew Kickertz<\/p>\n<p>Collision detection via meshes, and rough calculation of post-impact velocities.<\/p>\n<div>\n<div id=\"parent-fieldname-text\">\n<p>Over the past couple weeks I&#8217;ve been developing a method to detect collisions between pins, modeling them as meshes. \u00a0I&#8217;m also thinking about describing the pins as parametric surfaces, but that&#8217;s another can of worms. \u00a0The radius of the pin is defined at 15 heights as specified by the USBC:<\/p>\n<dl>\n<dt><a href=\"http:\/\/research.engineering.ucdavis.edu\/biosport\/wp-content\/uploads\/sites\/24\/2014\/06\/USBC-2010-Pin-dimension-diagram.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-209\" alt=\"USBC - 2010 - Pin dimension diagram\" src=\"http:\/\/research.engineering.ucdavis.edu\/biosport\/wp-content\/uploads\/sites\/24\/2014\/06\/USBC-2010-Pin-dimension-diagram-231x300.png\" width=\"231\" height=\"300\" srcset=\"https:\/\/research.engineering.ucdavis.edu\/biosport\/wp-content\/uploads\/sites\/24\/2014\/06\/USBC-2010-Pin-dimension-diagram-231x300.png 231w, https:\/\/research.engineering.ucdavis.edu\/biosport\/wp-content\/uploads\/sites\/24\/2014\/06\/USBC-2010-Pin-dimension-diagram-791x1024.png 791w, https:\/\/research.engineering.ucdavis.edu\/biosport\/wp-content\/uploads\/sites\/24\/2014\/06\/USBC-2010-Pin-dimension-diagram-115x150.png 115w\" sizes=\"auto, (max-width: 231px) 100vw, 231px\" \/><\/a><\/dt>\n<dd>As specified in the USBC 2010 Equipment specifications and certification manual<\/dd>\n<\/dl>\n<p>These radii, heights, and the number of desired lines of longitude are fed into a custom cylinder-mesh-generation function:<\/p>\n<pre>function [x y z] = mycylinder(r,zIn,nLong)\r\nfor i=1:length(r)\r\n    for j=0:nLong\r\n        x(i,j+1) = r(i)*cos(2*pi*j\/nLong);\r\n        y(i,j+1) = r(i)*sin(2*pi*j\/nLong);\r\n        z(i,j+1) = zIn(i);\r\n    end\u00a0\r\nend\u00a0<\/pre>\n<p>For example, here is a pin mesh composed of the 15 prescribed radii and heights and 25 lines of longitude:<\/p>\n<dl>\n<dt><a href=\"http:\/\/research.engineering.ucdavis.edu\/biosport\/wp-content\/uploads\/sites\/24\/2014\/06\/PinMesh-eps-converted-to.pdf\">PinMesh-eps-converted-to<\/a><\/dt>\n<dt><\/dt>\n<dd>Rainbow colored pin mesh with 15 radii and heights, and 25 lines of longitude.<\/dd>\n<\/dl>\n<p>Collision is deemed to have occurred if the distance between any node on 1 pin is sufficiently close to any node on another pin:<\/p>\n<pre>distance(i,j) = dx^2 + dy^2 + dz^2;<\/pre>\n<p>Here is an example of collision detection for 2 roughly-meshed pins:<\/p>\n<p><iframe loading=\"lazy\" width=\"800\" height=\"450\" src=\"https:\/\/www.youtube.com\/embed\/XWxfm5voQ2M?feature=oembed\" frameborder=\"0\" allowfullscreen><\/iframe><\/p>\n<p>Computing the post-impact velocities is rather complicated for general bodies. \u00a0The dynamics in this example aren&#8217;t quite right yet, but it looks believable:<\/p>\n<p><iframe loading=\"lazy\" width=\"800\" height=\"600\" src=\"https:\/\/www.youtube.com\/embed\/spBk_LUncO0?feature=oembed\" frameborder=\"0\" allowfullscreen><\/iframe><\/p>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>by Andrew Kickertz Collision detection via meshes, and rough calculation of post-impact velocities. Over the past couple weeks I&#8217;ve been developing a method to detect collisions between pins, modeling them as meshes. \u00a0I&#8217;m also thinking about describing the pins as parametric surfaces, but that&#8217;s another can of worms. \u00a0The radius \u2026 <a class=\"continue-reading-link\" href=\"https:\/\/research.engineering.ucdavis.edu\/biosport\/pin-pin-collision-detection-and-response\/\"> Continue reading <span class=\"meta-nav\">&rarr; <\/span><\/a><\/p>\n","protected":false},"author":10,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-207","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/research.engineering.ucdavis.edu\/biosport\/wp-json\/wp\/v2\/posts\/207","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/research.engineering.ucdavis.edu\/biosport\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/research.engineering.ucdavis.edu\/biosport\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/research.engineering.ucdavis.edu\/biosport\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/research.engineering.ucdavis.edu\/biosport\/wp-json\/wp\/v2\/comments?post=207"}],"version-history":[{"count":0,"href":"https:\/\/research.engineering.ucdavis.edu\/biosport\/wp-json\/wp\/v2\/posts\/207\/revisions"}],"wp:attachment":[{"href":"https:\/\/research.engineering.ucdavis.edu\/biosport\/wp-json\/wp\/v2\/media?parent=207"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/research.engineering.ucdavis.edu\/biosport\/wp-json\/wp\/v2\/categories?post=207"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/research.engineering.ucdavis.edu\/biosport\/wp-json\/wp\/v2\/tags?post=207"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}