{"id":5692,"date":"2013-12-24T05:06:35","date_gmt":"2013-12-23T18:06:35","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=5692"},"modified":"2013-12-24T05:06:35","modified_gmt":"2013-12-23T18:06:35","slug":"htmljavascript-canvas-venn-diagram-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/htmljavascript-canvas-venn-diagram-tutorial\/","title":{"rendered":"HTML\/Javascript Canvas Venn Diagram Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/Canvas\/VennDiagram\/VennDiagram.m4v\"><img decoding=\"async\" style=\"float:left;border: 15px solid pink;\" alt=\"HTML\/Javascript Canvas Venn Diagram Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/Canvas\/VennDiagram\/VennDiagram.jpg\" title=\"HTML\/Javascript Canvas Venn Diagram Tutorial\"  \/><\/a><p class=\"wp-caption-text\">HTML\/Javascript Canvas Venn Diagram Tutorial<\/p><\/div>\n<p>Here is a <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/Canvas\/VennDiagram\/\" title=\"HTML\/Javascript Canvas Venn Diagram Tutorial\">live run<\/a> showing some client-side basics in HTML and Javascript that can be used to create your own Venn Diagrams.   Were Venn Diagrams something you learnt at school, to do with &#8220;set theory&#8221;?   It can be an interesting area of mathematics, and statistics, perhaps.    In today&#8217;s tutorial we do an example involving Geckoes &#8230; yes, <a target=_blank title='Gecko information from Wikipedia' href='http:\/\/en.wikipedia.org\/wiki\/Gecko'>Geckoes<\/a> &#8230; not echoes &#8230; but, Geckoes &#8230; the inspiration for which came from this great <a target=_blank title='Venn diagram Geckoes problem' href='http:\/\/www.purplemath.com\/modules\/venndiag4.htm'>link<\/a> (thanks).   You can read about it from Wikipedia <a target=_blank title='Venn diagram information from Wikipedia' href='http:\/\/en.wikipedia.org\/wiki\/Venn_diagram'>here<\/a>.<\/p>\n<p>This HTML\/Javascript solution uses an HTML canvas element, which you can first read about, at this blog, <a target=_blank href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=5539' title='HTML\/Javascript Canvas Primer Tutorial'>here<\/a>.<\/p>\n<p>You may want to read more at <a target=_blank title='HTML Canvas Reference' href='http:\/\/www.w3schools.com\/tags\/ref_canvas.asp'>HTML Canvas Reference<\/a> as a generic reference, or here, at the tutorial <a target=_blank title='javascript - How do I add a simple onClick event handler to a canvas element? - Stack Overflow' href='http:\/\/stackoverflow.com\/questions\/9880279\/how-do-i-add-a-simple-onclick-event-handler-to-a-canvas-element'>javascript &#8211; How do I add a simple onClick event handler to a canvas element? &#8211; Stack Overflow<\/a>.<\/p>\n<p>Here is a very useful <a target=_blank title='Circle intersection algorithm ... thanks' href='http:\/\/stackoverflow.com\/questions\/8367512\/algorithm-to-detect-if-a-circles-intersect-with-any-other-circle-in-the-same-pla'>link<\/a> that helped with an algorithm to determine if two circles intercept &#8230; thanks.<\/p>\n<p>Link to some downloadable HTML programming code &#8230; rename to <a target=_blank href='http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/Canvas\/VennDiagram\/venn_diagram.html_GETME' title='venn_diagram.html'>venn_diagram.html<\/a>\n<\/p>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d5692' onclick='var dv=document.getElementById(\"d5692\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"http:\/\/www.rjmprogramming.com.au\/wordpress\/?cat=59\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d5692' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Here is a live run showing some client-side basics in HTML and Javascript that can be used to create your own Venn Diagrams. Were Venn Diagrams something you learnt at school, to do with &#8220;set theory&#8221;? It can be an &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/htmljavascript-canvas-venn-diagram-tutorial\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/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":[12,37],"tags":[184,576,652,752,997,1317,1367],"class_list":["post-5692","post","type-post","status-publish","format-standard","hentry","category-elearning","category-tutorials","tag-canvas","tag-html","tag-javascript","tag-mathematics","tag-programming","tag-tutorail","tag-venn-diagram"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/5692"}],"collection":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/comments?post=5692"}],"version-history":[{"count":0,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/5692\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=5692"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=5692"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=5692"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}