From 1b89e75b31ba59b850104d72a09f8ed581859e36 Mon Sep 17 00:00:00 2001 From: Fidel Coria <1coriaf@gmail.com> Date: Mon, 4 Nov 2024 16:48:19 +0000 Subject: [PATCH] Deploy website - based on 50383c2a790967283d1efd5d344b128869568201 --- 404.html | 4 ++-- assets/js/9554848d.28afb186.js | 1 + assets/js/9554848d.8e531736.js | 1 - assets/js/9f0366e5.1bedb13d.js | 1 + assets/js/9f0366e5.afd9650f.js | 1 - assets/js/b2f554cd.1cb17071.js | 1 - assets/js/b2f554cd.3c77ed41.js | 1 + ...ntime~main.52776834.js => runtime~main.555d2acb.js} | 2 +- blog.html | 6 +++--- blog/2021/12/05/DigiLog.html | 4 ++-- blog/2021/12/06/GitHub_Pages.html | 4 ++-- blog/2021/12/16/Lego_Useless_Machine.html | 4 ++-- blog/2022/01/05/Python_Quine.html | 4 ++-- blog/2022/11/01/Melting_Ice.html | 4 ++-- blog/2024/08/10/Four_Elbows.html | 10 +++++----- blog/archive.html | 4 ++-- blog/atom.xml | 6 +++--- blog/rss.xml | 6 +++--- index.html | 4 ++-- phrases.html | 4 ++-- toolbox.html | 4 ++-- 21 files changed, 38 insertions(+), 38 deletions(-) create mode 100644 assets/js/9554848d.28afb186.js delete mode 100644 assets/js/9554848d.8e531736.js create mode 100644 assets/js/9f0366e5.1bedb13d.js delete mode 100644 assets/js/9f0366e5.afd9650f.js delete mode 100644 assets/js/b2f554cd.1cb17071.js create mode 100644 assets/js/b2f554cd.3c77ed41.js rename assets/js/{runtime~main.52776834.js => runtime~main.555d2acb.js} (62%) diff --git a/404.html b/404.html index f4d835f..fa1f793 100644 --- a/404.html +++ b/404.html @@ -5,13 +5,13 @@ Page Not Found | Tech Notes - +
Skip to main content

Page Not Found

We could not find what you were looking for.

Please contact the owner of the site that linked you to the original URL and let them know their link is broken.

- + \ No newline at end of file diff --git a/assets/js/9554848d.28afb186.js b/assets/js/9554848d.28afb186.js new file mode 100644 index 0000000..602bc59 --- /dev/null +++ b/assets/js/9554848d.28afb186.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfidelcoria=self.webpackChunkfidelcoria||[]).push([[579],{3905:(e,t,r)=>{r.d(t,{Zo:()=>s,kt:()=>m});var n=r(7294);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var c=n.createContext({}),p=function(e){var t=n.useContext(c),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},s=function(e){var t=p(e.components);return n.createElement(c.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},f=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,a=e.originalType,c=e.parentName,s=l(e,["components","mdxType","originalType","parentName"]),f=p(r),m=o,d=f["".concat(c,".").concat(m)]||f[m]||u[m]||a;return r?n.createElement(d,i(i({ref:t},s),{},{components:r})):n.createElement(d,i({ref:t},s))}));function m(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=r.length,i=new Array(a);i[0]=f;var l={};for(var c in t)hasOwnProperty.call(t,c)&&(l[c]=t[c]);l.originalType=e,l.mdxType="string"==typeof e?e:o,i[1]=l;for(var p=2;p{r.r(t),r.d(t,{assets:()=>c,contentTitle:()=>i,default:()=>u,frontMatter:()=>a,metadata:()=>l,toc:()=>p});var n=r(3117),o=(r(7294),r(3905));const a={authors:"alzafacon"},i="Plumbing: Connect 2 pipes with 4 elbows",l={permalink:"/blog/2024/08/10/Four_Elbows",editUrl:"https://github.com/alzafacon/alzafacon.github.io/edit/main/website/blog/blog/2024-08-10-Four_Elbows/index.md",source:"@site/blog/2024-08-10-Four_Elbows/index.md",title:"Plumbing: Connect 2 pipes with 4 elbows",description:"The underground PVC water pipes outside my home are frequently cracking or leaking at the joints. After making several repairs I turned to reddit for advice on making repairs.",date:"2024-08-10T00:00:00.000Z",formattedDate:"August 10, 2024",tags:[],readingTime:3.305,hasTruncateMarker:!0,authors:[{name:"Fidel Coria",title:"Software Engineer",url:"https://fidelcoria.com",imageURL:"https://github.com/alzafacon.png",key:"alzafacon"}],frontMatter:{authors:"alzafacon"},nextItem:{title:"Does melting ice really cause sea levels to rise?",permalink:"/blog/2022/11/01/Melting_Ice"}},c={authorsImageUrls:[void 0]},p=[],s={toc:p};function u(e){let{components:t,...r}=e;return(0,o.kt)("wrapper",(0,n.Z)({},s,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"The underground PVC water pipes outside my home are frequently cracking or leaking at the joints. After making several repairs I turned to reddit for advice on making repairs."),(0,o.kt)("p",null,"Someone recommended using 4 elbows! The joint is assembled by sliding the top part into the bottom 2 elbows. Instead of having to dig out the pipes enough to bend the pipes to fit couplers on each end."),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"}," _____ _____\n | __====__ |\n | |2 3| |\n || ||\n || ||\n\n____ _| |1 4| |_ _____\n____|____| |____|_____\n\nfig. 1\n")),(0,o.kt)("p",null,"I heard from a professional plumber that the extra elbows can cause a drop in pressure, but more importantly there are more joints that could fail. So the extra digging is worth the trouble."),(0,o.kt)("p",null,"But can this technique be applied even if the pipes are skewed?"))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/9554848d.8e531736.js b/assets/js/9554848d.8e531736.js deleted file mode 100644 index 18ddef1..0000000 --- a/assets/js/9554848d.8e531736.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfidelcoria=self.webpackChunkfidelcoria||[]).push([[579],{3905:(e,t,r)=>{r.d(t,{Zo:()=>p,kt:()=>d});var n=r(7294);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var c=n.createContext({}),s=function(e){var t=n.useContext(c),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},p=function(e){var t=s(e.components);return n.createElement(c.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},f=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,a=e.originalType,c=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),f=s(r),d=o,m=f["".concat(c,".").concat(d)]||f[d]||u[d]||a;return r?n.createElement(m,i(i({ref:t},p),{},{components:r})):n.createElement(m,i({ref:t},p))}));function d(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=r.length,i=new Array(a);i[0]=f;var l={};for(var c in t)hasOwnProperty.call(t,c)&&(l[c]=t[c]);l.originalType=e,l.mdxType="string"==typeof e?e:o,i[1]=l;for(var s=2;s{r.r(t),r.d(t,{assets:()=>c,contentTitle:()=>i,default:()=>u,frontMatter:()=>a,metadata:()=>l,toc:()=>s});var n=r(3117),o=(r(7294),r(3905));const a={authors:"alzafacon"},i="Plumbing: Connect 2 pipes with 4 elbows",l={permalink:"/blog/2024/08/10/Four_Elbows",editUrl:"https://github.com/alzafacon/alzafacon.github.io/edit/main/website/blog/blog/2024-08-10-Four_Elbows/index.md",source:"@site/blog/2024-08-10-Four_Elbows/index.md",title:"Plumbing: Connect 2 pipes with 4 elbows",description:"The underground PVC water pipes outside my home are frequently cracking or leaking at the joints. After making several repairs I turned to reddit for an easier way.",date:"2024-08-10T00:00:00.000Z",formattedDate:"August 10, 2024",tags:[],readingTime:3.215,hasTruncateMarker:!0,authors:[{name:"Fidel Coria",title:"Software Engineer",url:"https://fidelcoria.com",imageURL:"https://github.com/alzafacon.png",key:"alzafacon"}],frontMatter:{authors:"alzafacon"},nextItem:{title:"Does melting ice really cause sea levels to rise?",permalink:"/blog/2022/11/01/Melting_Ice"}},c={authorsImageUrls:[void 0]},s=[],p={toc:s};function u(e){let{components:t,...r}=e;return(0,o.kt)("wrapper",(0,n.Z)({},p,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"The underground PVC water pipes outside my home are frequently cracking or leaking at the joints. After making several repairs I turned to reddit for an easier way."),(0,o.kt)("p",null,"A professional recommended using 4 elbows! Genius! The joint is assembled by sliding the top part into the bottom 2 elbows. Instead of having to dig out the pipes enough to bend the pipes to fit couplers on each end."),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"}," _____ _____\n | __====__ |\n | |2 3| |\n || ||\n || ||\n\n____ _| |1 4| |_ _____\n____|____| |____|_____\n\nfig. 1\n")),(0,o.kt)("p",null,"But can this technique be applied even if the pipes are skewed?"))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/9f0366e5.1bedb13d.js b/assets/js/9f0366e5.1bedb13d.js new file mode 100644 index 0000000..85c8d54 --- /dev/null +++ b/assets/js/9f0366e5.1bedb13d.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfidelcoria=self.webpackChunkfidelcoria||[]).push([[383],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>d});var i=n(7294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function o(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var p=i.createContext({}),s=function(e){var t=i.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},c=function(e){var t=s(e.components);return i.createElement(p.Provider,{value:t},e.children)},h={inlineCode:"code",wrapper:function(e){var t=e.children;return i.createElement(i.Fragment,{},t)}},u=i.forwardRef((function(e,t){var n=e.components,a=e.mdxType,r=e.originalType,p=e.parentName,c=l(e,["components","mdxType","originalType","parentName"]),u=s(n),d=a,m=u["".concat(p,".").concat(d)]||u[d]||h[d]||r;return n?i.createElement(m,o(o({ref:t},c),{},{components:n})):i.createElement(m,o({ref:t},c))}));function d(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var r=n.length,o=new Array(r);o[0]=u;var l={};for(var p in t)hasOwnProperty.call(t,p)&&(l[p]=t[p]);l.originalType=e,l.mdxType="string"==typeof e?e:a,o[1]=l;for(var s=2;s{n.r(t),n.d(t,{assets:()=>p,contentTitle:()=>o,default:()=>h,frontMatter:()=>r,metadata:()=>l,toc:()=>s});var i=n(3117),a=(n(7294),n(3905));const r={authors:"alzafacon"},o="Plumbing: Connect 2 pipes with 4 elbows",l={permalink:"/blog/2024/08/10/Four_Elbows",editUrl:"https://github.com/alzafacon/alzafacon.github.io/edit/main/website/blog/blog/2024-08-10-Four_Elbows/index.md",source:"@site/blog/2024-08-10-Four_Elbows/index.md",title:"Plumbing: Connect 2 pipes with 4 elbows",description:"The underground PVC water pipes outside my home are frequently cracking or leaking at the joints. After making several repairs I turned to reddit for advice on making repairs.",date:"2024-08-10T00:00:00.000Z",formattedDate:"August 10, 2024",tags:[],readingTime:3.305,hasTruncateMarker:!0,authors:[{name:"Fidel Coria",title:"Software Engineer",url:"https://fidelcoria.com",imageURL:"https://github.com/alzafacon.png",key:"alzafacon"}],frontMatter:{authors:"alzafacon"},nextItem:{title:"Does melting ice really cause sea levels to rise?",permalink:"/blog/2022/11/01/Melting_Ice"}},p={authorsImageUrls:[void 0]},s=[],c={toc:s};function h(e){let{components:t,...n}=e;return(0,a.kt)("wrapper",(0,i.Z)({},c,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"The underground PVC water pipes outside my home are frequently cracking or leaking at the joints. After making several repairs I turned to reddit for advice on making repairs."),(0,a.kt)("p",null,"Someone recommended using 4 elbows! The joint is assembled by sliding the top part into the bottom 2 elbows. Instead of having to dig out the pipes enough to bend the pipes to fit couplers on each end."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre"}," _____ _____\n | __====__ |\n | |2 3| |\n || ||\n || ||\n\n____ _| |1 4| |_ _____\n____|____| |____|_____\n\nfig. 1\n")),(0,a.kt)("p",null,"I heard from a professional plumber that the extra elbows can cause a drop in pressure, but more importantly there are more joints that could fail. So the extra digging is worth the trouble."),(0,a.kt)("p",null,"But can this technique be applied even if the pipes are skewed?"),(0,a.kt)("p",null,"So let's generalize. Here is a proof by construction."),(0,a.kt)("p",null,"The critical feature of the 4 elbow joint is that 2 vertical pipes shown below must be parallel (so they can be slid into place)."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre"}," _____ _____\n | __====__ |\n | |2 3| |\n || ||\n || ||\n\nfig. 2\n")),(0,a.kt)("p",null,"Here is a simplified drawing with conventional notation. Pretend it is in three dimensions."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre"}," C D\n *_________*\n | |\n | |\n<-*-----* *-----*->\n A' A B B' \n\nfig. 3 \n")),(0,a.kt)("p",null,"Let there be a plane at point A perpendicular to ",(0,a.kt)("inlineCode",{parentName:"p"},"->AA'")," called ",(0,a.kt)("inlineCode",{parentName:"p"},"P"),"."),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},'This plane includes all points in the rays that a 90 degree "elbow" at point ',(0,a.kt)("inlineCode",{parentName:"li"},"A")," could draw when rotated.")),(0,a.kt)("p",null,"Now, let there also be a plane at point ",(0,a.kt)("inlineCode",{parentName:"p"},"B")," perpendicular to ",(0,a.kt)("inlineCode",{parentName:"p"},"->BB'")," called ",(0,a.kt)("inlineCode",{parentName:"p"},"Q"),"."),(0,a.kt)("p",null,'These planes are useful because they get us closer to identifying the orientation of the "vertical" pipes in fig. 2. The reason for this is that each plane contains all of the possible orientations of the pipes independently.'),(0,a.kt)("p",null,"So all we need to find is a line in plane ",(0,a.kt)("inlineCode",{parentName:"p"},"P")," through point ",(0,a.kt)("inlineCode",{parentName:"p"},"A")," that is parallel to a line in plane ",(0,a.kt)("inlineCode",{parentName:"p"},"Q")," through point ",(0,a.kt)("inlineCode",{parentName:"p"},"B"),". Then it is trivial to select a point ",(0,a.kt)("inlineCode",{parentName:"p"},"C")," and draw a perpendicular line to a point ",(0,a.kt)("inlineCode",{parentName:"p"},"D")," as illustrated in fig. 3."),(0,a.kt)("p",null,"Notice that the planes may either intersect or not. "),(0,a.kt)("ol",null,(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("p",{parentName:"li"},"In the case that the planes do not intersect"),(0,a.kt)("p",{parentName:"li"},"This means the planes are parallel. Which means any line we chose through point ",(0,a.kt)("inlineCode",{parentName:"p"},"A")," will have a parallel line through point ",(0,a.kt)("inlineCode",{parentName:"p"},"B"),". So there are infinitely many lines to select and an infinite choice of points ",(0,a.kt)("inlineCode",{parentName:"p"},"C")," and ",(0,a.kt)("inlineCode",{parentName:"p"},"D"),'. In other words there are infinitely many ways to orient the fitting in fig. 2 by rotating it around the pipes. The length of the "vertical" pipes is the other infinite choice.')),(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("p",{parentName:"li"},"In the case that the planes intersect"),(0,a.kt)("p",{parentName:"li"},"We can take the line of intersection -call it ",(0,a.kt)("inlineCode",{parentName:"p"},"X"),"- and draw a line parallel to ",(0,a.kt)("inlineCode",{parentName:"p"},"X")," in plane ",(0,a.kt)("inlineCode",{parentName:"p"},"P")," through point ",(0,a.kt)("inlineCode",{parentName:"p"},"A"),". Likewise we can draw a line parallel to ",(0,a.kt)("inlineCode",{parentName:"p"},"X")," in plane ",(0,a.kt)("inlineCode",{parentName:"p"},"Q")," through point ",(0,a.kt)("inlineCode",{parentName:"p"},"B"),".\nBy transitivity the line in plane ",(0,a.kt)("inlineCode",{parentName:"p"},"P")," through point ",(0,a.kt)("inlineCode",{parentName:"p"},"A")," is parallel to the line in plane ",(0,a.kt)("inlineCode",{parentName:"p"},"Q")," through point ",(0,a.kt)("inlineCode",{parentName:"p"},"B"),'.\nThis time we only have one pair of parallel lines instead of an infinite choice. But there are 2 orientations for the "vertical" pipes as shown in fig. 4 and fig. 5.\nThe length of the "vertical" pipes is still an infinite choice.'))),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre"}," * \n / \\\n / \\\n<---* \\\n * \n /\n /\n *------\x3e\n\nfig. 4\n")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre"},"<---* \n / \n / \n * \n \\ \n \\ *------\x3e\n \\ /\n \\ /\n *\n \nfig. 5\n")),(0,a.kt)("p",null,"Yes! The 4 elbow technique always works... in theory."))}h.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/9f0366e5.afd9650f.js b/assets/js/9f0366e5.afd9650f.js deleted file mode 100644 index 8f378bc..0000000 --- a/assets/js/9f0366e5.afd9650f.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfidelcoria=self.webpackChunkfidelcoria||[]).push([[383],{3905:(e,n,t)=>{t.d(n,{Zo:()=>c,kt:()=>d});var a=t(7294);function i(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function r(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,a)}return t}function o(e){for(var n=1;n=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}var p=a.createContext({}),s=function(e){var n=a.useContext(p),t=n;return e&&(t="function"==typeof e?e(n):o(o({},n),e)),t},c=function(e){var n=s(e.components);return a.createElement(p.Provider,{value:n},e.children)},u={inlineCode:"code",wrapper:function(e){var n=e.children;return a.createElement(a.Fragment,{},n)}},h=a.forwardRef((function(e,n){var t=e.components,i=e.mdxType,r=e.originalType,p=e.parentName,c=l(e,["components","mdxType","originalType","parentName"]),h=s(t),d=i,m=h["".concat(p,".").concat(d)]||h[d]||u[d]||r;return t?a.createElement(m,o(o({ref:n},c),{},{components:t})):a.createElement(m,o({ref:n},c))}));function d(e,n){var t=arguments,i=n&&n.mdxType;if("string"==typeof e||i){var r=t.length,o=new Array(r);o[0]=h;var l={};for(var p in n)hasOwnProperty.call(n,p)&&(l[p]=n[p]);l.originalType=e,l.mdxType="string"==typeof e?e:i,o[1]=l;for(var s=2;s{t.r(n),t.d(n,{assets:()=>p,contentTitle:()=>o,default:()=>u,frontMatter:()=>r,metadata:()=>l,toc:()=>s});var a=t(3117),i=(t(7294),t(3905));const r={authors:"alzafacon"},o="Plumbing: Connect 2 pipes with 4 elbows",l={permalink:"/blog/2024/08/10/Four_Elbows",editUrl:"https://github.com/alzafacon/alzafacon.github.io/edit/main/website/blog/blog/2024-08-10-Four_Elbows/index.md",source:"@site/blog/2024-08-10-Four_Elbows/index.md",title:"Plumbing: Connect 2 pipes with 4 elbows",description:"The underground PVC water pipes outside my home are frequently cracking or leaking at the joints. After making several repairs I turned to reddit for an easier way.",date:"2024-08-10T00:00:00.000Z",formattedDate:"August 10, 2024",tags:[],readingTime:3.215,hasTruncateMarker:!0,authors:[{name:"Fidel Coria",title:"Software Engineer",url:"https://fidelcoria.com",imageURL:"https://github.com/alzafacon.png",key:"alzafacon"}],frontMatter:{authors:"alzafacon"},nextItem:{title:"Does melting ice really cause sea levels to rise?",permalink:"/blog/2022/11/01/Melting_Ice"}},p={authorsImageUrls:[void 0]},s=[],c={toc:s};function u(e){let{components:n,...t}=e;return(0,i.kt)("wrapper",(0,a.Z)({},c,t,{components:n,mdxType:"MDXLayout"}),(0,i.kt)("p",null,"The underground PVC water pipes outside my home are frequently cracking or leaking at the joints. After making several repairs I turned to reddit for an easier way."),(0,i.kt)("p",null,"A professional recommended using 4 elbows! Genius! The joint is assembled by sliding the top part into the bottom 2 elbows. Instead of having to dig out the pipes enough to bend the pipes to fit couplers on each end."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre"}," _____ _____\n | __====__ |\n | |2 3| |\n || ||\n || ||\n\n____ _| |1 4| |_ _____\n____|____| |____|_____\n\nfig. 1\n")),(0,i.kt)("p",null,"But can this technique be applied even if the pipes are skewed?"),(0,i.kt)("p",null,"Of course I want to generalize. I'm just the typical math aficionado. I will attempt a proof by construction."),(0,i.kt)("p",null,"The critical feature of the 4 elbow joint is that 2 vertical pipes shown below must be parallel (so they can be slid into place)."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre"}," _____ _____\n | __====__ |\n | |2 3| |\n || ||\n || ||\n\nfig. 2\n")),(0,i.kt)("p",null,"Here is a simplified drawing with conventional mathematical notation. Pretend it is in three dimensions."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre"}," C D\n *_________*\n | |\n | |\n<-*-----* *-----*->\n A' A B B' \n\nfig. 3 \n")),(0,i.kt)("p",null,"Let there be a plane at point A perpendicular to ",(0,i.kt)("inlineCode",{parentName:"p"},"->AA'")," called ",(0,i.kt)("inlineCode",{parentName:"p"},"P"),"."),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},'This plane includes all points in the rays that a 90 degree "elbow" at point ',(0,i.kt)("inlineCode",{parentName:"li"},"A")," could draw when rotated.")),(0,i.kt)("p",null,"Now, let there also be a plane at point ",(0,i.kt)("inlineCode",{parentName:"p"},"B")," perpendicular to ",(0,i.kt)("inlineCode",{parentName:"p"},"->BB'")," called ",(0,i.kt)("inlineCode",{parentName:"p"},"Q"),"."),(0,i.kt)("p",null,'These planes are useful because they get us closer to identifying the orientation of the "vertical" pipes in fig. 2. The reason for this is that each plane contains all of the possible orientations of the pipes independently.'),(0,i.kt)("p",null,"So all we need to find is a line in plane ",(0,i.kt)("inlineCode",{parentName:"p"},"P")," through point ",(0,i.kt)("inlineCode",{parentName:"p"},"A")," that is parallel to a line in plane ",(0,i.kt)("inlineCode",{parentName:"p"},"Q")," through point ",(0,i.kt)("inlineCode",{parentName:"p"},"B"),". Then it is trivial to select a point ",(0,i.kt)("inlineCode",{parentName:"p"},"C")," and draw a perpendicular line to a point ",(0,i.kt)("inlineCode",{parentName:"p"},"D")," as illustrated in fig. 3."),(0,i.kt)("p",null,"Notice that the planes may either intersect or not. "),(0,i.kt)("ol",null,(0,i.kt)("li",{parentName:"ol"},(0,i.kt)("p",{parentName:"li"},"In the case that the planes do not intersect"),(0,i.kt)("p",{parentName:"li"},"This means the planes are parallel. Which means any line we chose through point ",(0,i.kt)("inlineCode",{parentName:"p"},"A")," will have a parallel line through point ",(0,i.kt)("inlineCode",{parentName:"p"},"B"),". So there are infinitely many lines to select and an infinite choice of points ",(0,i.kt)("inlineCode",{parentName:"p"},"C")," and ",(0,i.kt)("inlineCode",{parentName:"p"},"D"),'. In other words there are infinitely many ways to orient the fitting in fig. 2 by rotating it around the pipes. The length of the "vertical" pipes is the other infinite choice.')),(0,i.kt)("li",{parentName:"ol"},(0,i.kt)("p",{parentName:"li"},"In the case that the planes intersect"),(0,i.kt)("p",{parentName:"li"},"We can take the line of intersection -call it ",(0,i.kt)("inlineCode",{parentName:"p"},"X"),"- and draw a line parallel to ",(0,i.kt)("inlineCode",{parentName:"p"},"X")," in plane ",(0,i.kt)("inlineCode",{parentName:"p"},"P")," through point ",(0,i.kt)("inlineCode",{parentName:"p"},"A"),". Likewise we can draw a line parallel to ",(0,i.kt)("inlineCode",{parentName:"p"},"X")," in plane ",(0,i.kt)("inlineCode",{parentName:"p"},"Q")," through point ",(0,i.kt)("inlineCode",{parentName:"p"},"B"),".\nBy transitivity the line in plane ",(0,i.kt)("inlineCode",{parentName:"p"},"P")," through point ",(0,i.kt)("inlineCode",{parentName:"p"},"A")," is parallel to the line in plane ",(0,i.kt)("inlineCode",{parentName:"p"},"Q")," through point ",(0,i.kt)("inlineCode",{parentName:"p"},"B"),'.\nThis time we only have one pair of parallel lines instead of an infinite choice. But there are 2 orientations for the "vertical" pipes as shown in fig. 4 and fig. 5.\nThe length of the "vertical" pipes is still an infinite choice.'))),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre"}," * \n / \\\n / \\\n<---* \\\n * \n /\n /\n *------\x3e\n\nfig. 4\n")),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre"},"<---* \n / \n / \n * \n \\ \n \\ *------\x3e\n \\ /\n \\ /\n *\n \nfig. 5\n")),(0,i.kt)("p",null,"Yes! The 4 elbow technique can always work... in you have enough space."))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/b2f554cd.1cb17071.js b/assets/js/b2f554cd.1cb17071.js deleted file mode 100644 index e1004f0..0000000 --- a/assets/js/b2f554cd.1cb17071.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfidelcoria=self.webpackChunkfidelcoria||[]).push([[477],{10:e=>{e.exports=JSON.parse('{"blogPosts":[{"id":"/2024/08/10/Four_Elbows","metadata":{"permalink":"/blog/2024/08/10/Four_Elbows","editUrl":"https://github.com/alzafacon/alzafacon.github.io/edit/main/website/blog/blog/2024-08-10-Four_Elbows/index.md","source":"@site/blog/2024-08-10-Four_Elbows/index.md","title":"Plumbing: Connect 2 pipes with 4 elbows","description":"The underground PVC water pipes outside my home are frequently cracking or leaking at the joints. After making several repairs I turned to reddit for an easier way.","date":"2024-08-10T00:00:00.000Z","formattedDate":"August 10, 2024","tags":[],"readingTime":3.215,"hasTruncateMarker":true,"authors":[{"name":"Fidel Coria","title":"Software Engineer","url":"https://fidelcoria.com","imageURL":"https://github.com/alzafacon.png","key":"alzafacon"}],"frontMatter":{"authors":"alzafacon"},"nextItem":{"title":"Does melting ice really cause sea levels to rise?","permalink":"/blog/2022/11/01/Melting_Ice"}},"content":"The underground PVC water pipes outside my home are frequently cracking or leaking at the joints. After making several repairs I turned to reddit for an easier way.\\n\\nA professional recommended using 4 elbows! Genius! The joint is assembled by sliding the top part into the bottom 2 elbows. Instead of having to dig out the pipes enough to bend the pipes to fit couplers on each end.\\n\\n```\\n _____ _____\\n | __====__ |\\n | |2 3| |\\n || ||\\n || ||\\n\\n____ _| |1 4| |_ _____\\n____|____| |____|_____\\n\\nfig. 1\\n```\\n\\nBut can this technique be applied even if the pipes are skewed?\\n\\n\x3c!--truncate--\x3e\\n\\nOf course I want to generalize. I\'m just the typical math aficionado. I will attempt a proof by construction.\\n\\nThe critical feature of the 4 elbow joint is that 2 vertical pipes shown below must be parallel (so they can be slid into place).\\n\\n```\\n _____ _____\\n | __====__ |\\n | |2 3| |\\n || ||\\n || ||\\n\\nfig. 2\\n```\\n\\n\\nHere is a simplified drawing with conventional mathematical notation. Pretend it is in three dimensions.\\n\\n```\\n C D\\n *_________*\\n | |\\n | |\\n<-*-----* *-----*->\\n A\' A B B\' \\n\\nfig. 3 \\n```\\n\\nLet there be a plane at point A perpendicular to `->AA\'` called `P`.\\n\\n- This plane includes all points in the rays that a 90 degree \\"elbow\\" at point `A` could draw when rotated.\\n\\nNow, let there also be a plane at point `B` perpendicular to `->BB\'` called `Q`.\\n\\nThese planes are useful because they get us closer to identifying the orientation of the \\"vertical\\" pipes in fig. 2. The reason for this is that each plane contains all of the possible orientations of the pipes independently.\\n\\nSo all we need to find is a line in plane `P` through point `A` that is parallel to a line in plane `Q` through point `B`. Then it is trivial to select a point `C` and draw a perpendicular line to a point `D` as illustrated in fig. 3.\\n\\nNotice that the planes may either intersect or not. \\n\\n1. In the case that the planes do not intersect\\n\\n This means the planes are parallel. Which means any line we chose through point `A` will have a parallel line through point `B`. So there are infinitely many lines to select and an infinite choice of points `C` and `D`. In other words there are infinitely many ways to orient the fitting in fig. 2 by rotating it around the pipes. The length of the \\"vertical\\" pipes is the other infinite choice.\\n\\n2. In the case that the planes intersect\\n\\n We can take the line of intersection -call it `X`- and draw a line parallel to `X` in plane `P` through point `A`. Likewise we can draw a line parallel to `X` in plane `Q` through point `B`.\\n By transitivity the line in plane `P` through point `A` is parallel to the line in plane `Q` through point `B`.\\n This time we only have one pair of parallel lines instead of an infinite choice. But there are 2 orientations for the \\"vertical\\" pipes as shown in fig. 4 and fig. 5.\\n The length of the \\"vertical\\" pipes is still an infinite choice.\\n\\n\\n\\n```\\n * \\n / \\\\\\n / \\\\\\n<---* \\\\\\n * \\n /\\n /\\n *------\x3e\\n\\nfig. 4\\n```\\n\\n\\n``` \\n<---* \\n / \\n / \\n * \\n \\\\ \\n \\\\ *------\x3e\\n \\\\ /\\n \\\\ /\\n *\\n \\nfig. 5\\n```\\n\\nYes! The 4 elbow technique can always work... in you have enough space.\\n\\n\\n\x3c!-- Another advantage is that the joints will be straight and without any flexing to weaken the joints.\\n\\n\\nWhen pipes are skewed:\\n\\nLong pipes can get curved when they are laid and buried. So when a cracked section is cut out the remaining ends are slightly skewed.\\n\\nJoining pipes on a grade change will also cause the pipes to be skewed. --\x3e"},{"id":"/2022/11/01/Melting_Ice","metadata":{"permalink":"/blog/2022/11/01/Melting_Ice","editUrl":"https://github.com/alzafacon/alzafacon.github.io/edit/main/website/blog/blog/2022-11-01-Melting_Ice/index.md","source":"@site/blog/2022-11-01-Melting_Ice/index.md","title":"Does melting ice really cause sea levels to rise?","description":"I saw a documentary that claimed melting polar ice caps are causing sea levels","date":"2022-11-01T00:00:00.000Z","formattedDate":"November 1, 2022","tags":[],"readingTime":2.04,"hasTruncateMarker":true,"authors":[{"name":"Fidel Coria","title":"Software Engineer","url":"https://fidelcoria.com","imageURL":"https://github.com/alzafacon.png","key":"alzafacon"}],"frontMatter":{"authors":"alzafacon"},"prevItem":{"title":"Plumbing: Connect 2 pipes with 4 elbows","permalink":"/blog/2024/08/10/Four_Elbows"},"nextItem":{"title":"Python Quine","permalink":"/blog/2022/01/05/Python_Quine"}},"content":"I saw a documentary that claimed melting polar ice caps are causing sea levels\\nto rise. Something was fishy about that claim so I made some simplifying\\nassumptions, drew a free body diagram and started doing algebra. I won\'t\\nreproduce the algebra here because it turns out there is a common sense way to\\nreach the same conclusion.\\n\\n\x3c!--truncate--\x3e\\n\\n## Simplifying assumptions\\n- No saltwater\\n- Ice is pure water\\n- Ice is free-floating\\n- No condensation\\n- No evaporation\\n\\n## Free body diagram\\n![free body diagram](./free_body_diagram_floating_ice.png)\\n> not drawn to scale\\n\\n## Common sense\\nSince the system is in equilibrium the buoyancy force (red) is equal in\\nmagnitude to the gravitational force (blue). \\n\\nUnder the force of gravity the ice will displace some volume of water. `The mass\\nof the displaced volume of water must be equal to the mass of the ice causing\\nthat water to be displaced.` Therefore, the water from the melted ice has the\\nsame volume as the water originally displaced! The water level will not change!\\n\\nWait a minute! How do we know that `The mass of the displaced volume of water\\nmust be equal to the mass of the ice causing that water to be displaced.`?\\nWell, picture this: gravity is applying to a body of water. Pushing against the\\nwater causes an equal-magnitude and opposite-direction reaction. The more water\\nis displaced the greater reaction force. You are pushing against gravity!\\n\\nThis is the buoyancy force!\\n\\nThe force an object can exert due to gravity on a body of water is determined by\\nits mass. That object will sink if the force exerted by the object is greater\\nthan the buoyant force. In other words: if the mass of the object is greater\\nthan the mass of the object\'s volume in water then the object sinks. \\n\\nIf the mass of an object is less than the mass of the object\'s volume in \\nwater... then the object floats.\\n\\nIn other words, objects denser than water sink, objects less dense than water\\nfloat.\\n\\n## Back to saltwater\\n\\nIn the previous discussion the medium of floatation was the same as the object\\nof displacement. In other words: ice (frozen H2O) is floating in water (liquid \\nH2O). Obviously, once the ice melts it\'s all water with the same properties, including density.\\n\\nSo what happens to the fluid level when ice (frozen H2O) floating in saltwater\\nmelts?\\n\\nI leave this as an exercise for the reader."},{"id":"/2022/01/05/Python_Quine","metadata":{"permalink":"/blog/2022/01/05/Python_Quine","editUrl":"https://github.com/alzafacon/alzafacon.github.io/edit/main/website/blog/blog/2022-01-05-Python_Quine.mdx","source":"@site/blog/2022-01-05-Python_Quine.mdx","title":"Python Quine","description":"A quine is a computer program which takes no input and produces a copy of its own source code as its only output.","date":"2022-01-05T00:00:00.000Z","formattedDate":"January 5, 2022","tags":[],"readingTime":0.305,"hasTruncateMarker":false,"authors":[{"name":"Fidel Coria","title":"Software Engineer","url":"https://fidelcoria.com","imageURL":"https://github.com/alzafacon.png","key":"alzafacon"}],"frontMatter":{"authors":"alzafacon"},"prevItem":{"title":"Does melting ice really cause sea levels to rise?","permalink":"/blog/2022/11/01/Melting_Ice"},"nextItem":{"title":"Useless Machine with LEGO Technic","permalink":"/blog/2021/12/16/Lego_Useless_Machine"}},"content":"A quine is a computer program which takes no input and produces a copy of its own source code as its only output.\\n\\nI first read about this kind of program in the ACM article [Reflections on Trusting Trust (August 1984 Volume 27 Number 8 Page 761)](https://www.cs.cmu.edu/~rdriley/487/papers/Thompson_1984_ReflectionsonTrustingTrust.pdf).\\n\\nHere is my solution\\n\\nimport { ClickToReveal } from \'../src/components/ClickToReveal/ClickToReveal.js\';\\n\\n"},{"id":"/2021/12/16/Lego_Useless_Machine","metadata":{"permalink":"/blog/2021/12/16/Lego_Useless_Machine","editUrl":"https://github.com/alzafacon/alzafacon.github.io/edit/main/website/blog/blog/2021-12-16-Lego_Useless_Machine/index.md","source":"@site/blog/2021-12-16-Lego_Useless_Machine/index.md","title":"Useless Machine with LEGO Technic","description":"The purpose of a Useless Machine is to turn itself off when activated. Kits and built examples are available for purchase. While researching I found LEGO models but without kits or instructions.","date":"2021-12-16T00:00:00.000Z","formattedDate":"December 16, 2021","tags":[],"readingTime":0.715,"hasTruncateMarker":true,"authors":[{"name":"Fidel Coria","title":"Software Engineer","url":"https://fidelcoria.com","imageURL":"https://github.com/alzafacon.png","key":"alzafacon"}],"frontMatter":{"authors":"alzafacon"},"prevItem":{"title":"Python Quine","permalink":"/blog/2022/01/05/Python_Quine"},"nextItem":{"title":"Custom Apex Domain for GitHub Pages","permalink":"/blog/2021/12/06/GitHub_Pages"}},"content":"The purpose of a Useless Machine is to turn itself off when activated. Kits and built examples are available for purchase. While researching I found LEGO models but without kits or instructions.\\n\\nChallenge accepted!\\n\\n\x3c!--truncate--\x3e\\n\\nI completed the model in March of 2017 and revised it today.\\n\\nWithout a parts list or instructions I decided to reverse engineer the device from the following video:\\n[[011] Lego Technic - Useless Machine](https://www.youtube.com/watch?v=HAk-rhvZe2w)\\n\\nI created a model using LEGO Digital Designer (LDD) before buying the parts. [Download the LXF model](./UselessMachine.lxf)\\n\\nUsing LDD I generated a PDF with building instructions and a parts list at the end.\\n[Download the PDF instructions](./UselessMachineInstructions.pdf)\\n\\n> NOTE: The model and instructions do not include the LEGO Wind Up MOTOR 6x5x3! It was not available in the LDD.\\n\\nHere is the model at the final step of assembly\\n\\n![Final Step from instructions](./Step84.png)"},{"id":"/2021/12/06/GitHub_Pages","metadata":{"permalink":"/blog/2021/12/06/GitHub_Pages","editUrl":"https://github.com/alzafacon/alzafacon.github.io/edit/main/website/blog/blog/2021-12-06-GitHub_Pages.md","source":"@site/blog/2021-12-06-GitHub_Pages.md","title":"Custom Apex Domain for GitHub Pages","description":"I\'ll explain how I setup the DNS records for an apex domain (fidelcoria.com) with a redirect from www.fidelcoria.com to fidelcoria.com.","date":"2021-12-06T00:00:00.000Z","formattedDate":"December 6, 2021","tags":[],"readingTime":1.815,"hasTruncateMarker":true,"authors":[{"name":"Fidel Coria","title":"Software Engineer","url":"https://fidelcoria.com","imageURL":"https://github.com/alzafacon.png","key":"alzafacon"}],"frontMatter":{"authors":"alzafacon"},"prevItem":{"title":"Useless Machine with LEGO Technic","permalink":"/blog/2021/12/16/Lego_Useless_Machine"},"nextItem":{"title":"DigiLog: Digital Zoom for a Single Hand Analog Timepiece","permalink":"/blog/2021/12/05/DigiLog"}},"content":"I\'ll explain how I setup the DNS records for an apex domain (fidelcoria.com) with a redirect from www.fidelcoria.com to fidelcoria.com.\\n\\nIf you\'re new to GitHub Pages visit [pages.github.com](https://pages.github.com/) to learn the basics.\\n\\n\x3c!--truncate--\x3e\\n\\n## TL;DR\\n\\nHere are the DNS records. The host values for the DNS records were the tricky part to figure out. \\n\\n```\\nALIAS\\nHost: @\\nTarget: alzafacon.github.io.\\n```\\n```\\nCNAME\\nHost: www\\nTarget: alzafacon.github.io.\\n```\\n\\n## The devil is in the details\\n\\nI find the official documentation to be unclear or confusing in some parts, but I don\'t blame them. The internet is complicated and the GitHub writers are trying to make the docs helpful even for beginners.\\n\\nThe long and short of it is that the steps (for apex domain with https and www) are in the docs [here](https://docs.github.com/en/pages/configuring-a-custom-domain-for-your-github-pages-site/managing-a-custom-domain-for-your-github-pages-site#configuring-an-apex-domain). Unfortunately the DNS instructions are confusing.\\n\\nHere are the steps I had to follow:\\n\\n- Enter your desired custom domain in the repo settings page (**before** creating any DNS entries)\\n\\n I used fidelcoria.com (without the leading `www.`)\\n\\n Doing this will configure a CNAME file on your GitHub Pages branch\\n\\n- Create an ALIAS record via your DNS provider\\n\\n The docs say \\"`To create an ALIAS or ANAME record, point your apex domain to the default domain for your site`\\".\\n\\n The `apex domain` did not work. Instead I had to use `@`, which is used to represent the \\"bare domain\\" in DNS records.\\n \\n ```\\n ALIAS\\n Host: @\\n Target: alzafacon.github.io.\\n ``` \\n\\n- Create a CNAME record via your DNS provider\\n \\n The docs say \\"`Navigate to your DNS provider and create a CNAME record that points www.example.com to the default domain for your site`\\"\\n\\n `www.fidelcoria.com` did not work. Instead I had to use `www`.\\n ```\\n CNAME\\n Host: www\\n Target: alzafacon.github.io.\\n ```\\n\\nDNS changes can take up to 24 hours to propagate. This makes it hard to tell if something is wrong or just needs more time.\\n\\nI learned the best approach for me was to get informed, decide what I want, make a plan, try it out, observe patiently, then iterate.\\n\\n## Extra DNS setup\\n\\nI also setup alzafacon.com to redirect to fidelcoria.com\\n\\n```\\nURL Redirect\\nHost: @\\nDestination URL: https://fidelcoria.com\\nUnmasked\\n```"},{"id":"/2021/12/05/DigiLog","metadata":{"permalink":"/blog/2021/12/05/DigiLog","editUrl":"https://github.com/alzafacon/alzafacon.github.io/edit/main/website/blog/blog/2021-12-05-DigiLog/index.mdx","source":"@site/blog/2021-12-05-DigiLog/index.mdx","title":"DigiLog: Digital Zoom for a Single Hand Analog Timepiece","description":"Clocks and watches originally had a single hand. Obviously, this made it hard to tell time accurately. Until the minute hand was invented.","date":"2021-12-05T00:00:00.000Z","formattedDate":"December 5, 2021","tags":[],"readingTime":3.335,"hasTruncateMarker":true,"authors":[{"name":"Fidel Coria","title":"Software Engineer","url":"https://fidelcoria.com","imageURL":"https://github.com/alzafacon.png","key":"alzafacon"}],"frontMatter":{"authors":"alzafacon"},"prevItem":{"title":"Custom Apex Domain for GitHub Pages","permalink":"/blog/2021/12/06/GitHub_Pages"}},"content":"Clocks and watches originally had a single hand. Obviously, this made it hard to tell time accurately. Until the minute hand was invented.\\n\\nI came up with another way to read the minutes without a minute hand. Since the position of the hour hand past the hour marking implies the minutes... zooming into the hour hand shows minutes at a better resolution. For example, at 6:30 the tick marks will show the hour hand to be half way between 6 and 7. While at 7:05 you can zoom in to see the tick marks showing 5 minutes past 7.\\n\\nimport { FreestyleClock } from \'../../src/components/clock/FreestyleClock.js\';\\n\\n
\\n \\n
\\n\\n\x3c!--truncate--\x3e\\n\\n## The Math\\n\\n| | Definitions |\\n| - | - |\\n| Viewport | circular window of fixed size |\\n| `D` | viewport diameter\\n| `R` | viewport radius |\\n| Clock face | the numbers, tick markings, and the hour hand together |\\n| `r` | distance between viewport center and midpoint of chord to be zoomed (chord offset) |\\n| `tau` | time \\"angle\\" in radians of hour hand from polar axis (3 o\'clock) |\\n| `a` | length of the chord |\\n| `S` | scale factor |\\n\\n\\"chord\\n\\n> SOURCE: Weisstein, Eric W. \\"Chord.\\" From MathWorld--A Wolfram Web Resource. https://mathworld.wolfram.com/Chord.html\\n\\nZooming the clock face is simply done by enlarging a circular segment centered where the hour hand is pointing. In the image above the time would be 1:30.\\n\\nI take the chord and enlarge it to be congruent with the view port diameter. So to scale the chord from `a` to `D` the whole clock face must be scaled by `D/a` (i.e. `a(D/a) = D`). \\n\\nThe chord is determined when the user chooses `r`. We need an expression for the value of `a` given `r`.\\n\\nEasy! Pythagorean theorem: \\n\\n R^2 = r^2 + (a/2)^2\\n a/2 = sqrt(R^2 - r^2)\\n a = 2sqrt(R^2 - r^2)\\n\\nSo now we have the scale factor:\\n\\n S = D/a \\n = 2R / (2sqrt(R^2 - r^2))\\n = R / sqrt(R^2 - r^2)\\n\\nNext we need to slide the midpoint of the chord onto the center of the viewport.\\n\\nIt might help to think of the midpoint in polar coordinates as (`Sr`, `tau`). Yes, I scaled by S. With a simple change of coordinates we have:\\n\\n dx = Sr cos(tau)\\n dy = Sr sin(tau)\\n\\n## Course and Fine adjustment of r\\n\\nUsing a slider to change `r` linearly is a bad user experience. At low zoom the clock face moves very little and at high zoom the clock face moves too much. If you graph the scale function It is easy to see why this happens. `S(r)` grows quickly and is also concave up.\\n\\nIt would be better for the value of r to change more quickly at low zoom (course adjustment) and more slowly at high zoom (fine adjustment).\\n\\nThis can be done by letting the user input a zoom value rather than let them input `r` directly. Now we can map the zoom value any way we want with a function `f(z) = r`.\\n\\nI would like to take `z` to be in `[0,1]` and `f(1) = p`, where `0 < p < 1` and `pR` is the max chord-offset allowed. `f` should be monotonically increasing, concave down, with an inflection point somewhere around 0.1, and preferably asymptotic to `1`. Notice `f` will be multiplied by `R` to give the final chord offset.\\n\\nA good candidate function is `1 - 1/(z + 1)`.\\n\\nSo I\'ll start applying transformations to get the desired properties.\\n\\n f(1) = p = 1 - 1/(kz + 1)\\n ... algebra ...\\n k = p / (1-p)\\n \\n f(z) = 1 - 1/(pz/(1-p) + 1)\\n ... algebra ...\\n = 1 - (1-p)/(pz + 1 - p)\\n ... algebra ...\\n = pz / (pz + 1 - p)\\n\\nFinally to get the actual chord offset we take `Rf(z)`. \\n\\nThat\'s all folks!"}]}')}}]); \ No newline at end of file diff --git a/assets/js/b2f554cd.3c77ed41.js b/assets/js/b2f554cd.3c77ed41.js new file mode 100644 index 0000000..80c1a30 --- /dev/null +++ b/assets/js/b2f554cd.3c77ed41.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfidelcoria=self.webpackChunkfidelcoria||[]).push([[477],{10:e=>{e.exports=JSON.parse('{"blogPosts":[{"id":"/2024/08/10/Four_Elbows","metadata":{"permalink":"/blog/2024/08/10/Four_Elbows","editUrl":"https://github.com/alzafacon/alzafacon.github.io/edit/main/website/blog/blog/2024-08-10-Four_Elbows/index.md","source":"@site/blog/2024-08-10-Four_Elbows/index.md","title":"Plumbing: Connect 2 pipes with 4 elbows","description":"The underground PVC water pipes outside my home are frequently cracking or leaking at the joints. After making several repairs I turned to reddit for advice on making repairs.","date":"2024-08-10T00:00:00.000Z","formattedDate":"August 10, 2024","tags":[],"readingTime":3.305,"hasTruncateMarker":true,"authors":[{"name":"Fidel Coria","title":"Software Engineer","url":"https://fidelcoria.com","imageURL":"https://github.com/alzafacon.png","key":"alzafacon"}],"frontMatter":{"authors":"alzafacon"},"nextItem":{"title":"Does melting ice really cause sea levels to rise?","permalink":"/blog/2022/11/01/Melting_Ice"}},"content":"The underground PVC water pipes outside my home are frequently cracking or leaking at the joints. After making several repairs I turned to reddit for advice on making repairs.\\n\\nSomeone recommended using 4 elbows! The joint is assembled by sliding the top part into the bottom 2 elbows. Instead of having to dig out the pipes enough to bend the pipes to fit couplers on each end.\\n\\n```\\n _____ _____\\n | __====__ |\\n | |2 3| |\\n || ||\\n || ||\\n\\n____ _| |1 4| |_ _____\\n____|____| |____|_____\\n\\nfig. 1\\n```\\n\\nI heard from a professional plumber that the extra elbows can cause a drop in pressure, but more importantly there are more joints that could fail. So the extra digging is worth the trouble.\\n\\nBut can this technique be applied even if the pipes are skewed?\\n\\n\x3c!--truncate--\x3e\\n\\nSo let\'s generalize. Here is a proof by construction.\\n\\nThe critical feature of the 4 elbow joint is that 2 vertical pipes shown below must be parallel (so they can be slid into place).\\n\\n```\\n _____ _____\\n | __====__ |\\n | |2 3| |\\n || ||\\n || ||\\n\\nfig. 2\\n```\\n\\n\\nHere is a simplified drawing with conventional notation. Pretend it is in three dimensions.\\n\\n```\\n C D\\n *_________*\\n | |\\n | |\\n<-*-----* *-----*->\\n A\' A B B\' \\n\\nfig. 3 \\n```\\n\\nLet there be a plane at point A perpendicular to `->AA\'` called `P`.\\n\\n- This plane includes all points in the rays that a 90 degree \\"elbow\\" at point `A` could draw when rotated.\\n\\nNow, let there also be a plane at point `B` perpendicular to `->BB\'` called `Q`.\\n\\nThese planes are useful because they get us closer to identifying the orientation of the \\"vertical\\" pipes in fig. 2. The reason for this is that each plane contains all of the possible orientations of the pipes independently.\\n\\nSo all we need to find is a line in plane `P` through point `A` that is parallel to a line in plane `Q` through point `B`. Then it is trivial to select a point `C` and draw a perpendicular line to a point `D` as illustrated in fig. 3.\\n\\nNotice that the planes may either intersect or not. \\n\\n1. In the case that the planes do not intersect\\n\\n This means the planes are parallel. Which means any line we chose through point `A` will have a parallel line through point `B`. So there are infinitely many lines to select and an infinite choice of points `C` and `D`. In other words there are infinitely many ways to orient the fitting in fig. 2 by rotating it around the pipes. The length of the \\"vertical\\" pipes is the other infinite choice.\\n\\n2. In the case that the planes intersect\\n\\n We can take the line of intersection -call it `X`- and draw a line parallel to `X` in plane `P` through point `A`. Likewise we can draw a line parallel to `X` in plane `Q` through point `B`.\\n By transitivity the line in plane `P` through point `A` is parallel to the line in plane `Q` through point `B`.\\n This time we only have one pair of parallel lines instead of an infinite choice. But there are 2 orientations for the \\"vertical\\" pipes as shown in fig. 4 and fig. 5.\\n The length of the \\"vertical\\" pipes is still an infinite choice.\\n\\n\\n\\n```\\n * \\n / \\\\\\n / \\\\\\n<---* \\\\\\n * \\n /\\n /\\n *------\x3e\\n\\nfig. 4\\n```\\n\\n\\n``` \\n<---* \\n / \\n / \\n * \\n \\\\ \\n \\\\ *------\x3e\\n \\\\ /\\n \\\\ /\\n *\\n \\nfig. 5\\n```\\n\\nYes! The 4 elbow technique always works... in theory.\\n\\n\\n\x3c!-- Another advantage is that the joints will be straight and without any flexing to weaken the joints.\\n\\n\\nWhen pipes are skewed:\\n\\nLong pipes can get curved when they are laid and buried. So when a cracked section is cut out the remaining ends are slightly skewed.\\n\\nJoining pipes on a grade change will also cause the pipes to be skewed. --\x3e"},{"id":"/2022/11/01/Melting_Ice","metadata":{"permalink":"/blog/2022/11/01/Melting_Ice","editUrl":"https://github.com/alzafacon/alzafacon.github.io/edit/main/website/blog/blog/2022-11-01-Melting_Ice/index.md","source":"@site/blog/2022-11-01-Melting_Ice/index.md","title":"Does melting ice really cause sea levels to rise?","description":"I saw a documentary that claimed melting polar ice caps are causing sea levels","date":"2022-11-01T00:00:00.000Z","formattedDate":"November 1, 2022","tags":[],"readingTime":2.04,"hasTruncateMarker":true,"authors":[{"name":"Fidel Coria","title":"Software Engineer","url":"https://fidelcoria.com","imageURL":"https://github.com/alzafacon.png","key":"alzafacon"}],"frontMatter":{"authors":"alzafacon"},"prevItem":{"title":"Plumbing: Connect 2 pipes with 4 elbows","permalink":"/blog/2024/08/10/Four_Elbows"},"nextItem":{"title":"Python Quine","permalink":"/blog/2022/01/05/Python_Quine"}},"content":"I saw a documentary that claimed melting polar ice caps are causing sea levels\\nto rise. Something was fishy about that claim so I made some simplifying\\nassumptions, drew a free body diagram and started doing algebra. I won\'t\\nreproduce the algebra here because it turns out there is a common sense way to\\nreach the same conclusion.\\n\\n\x3c!--truncate--\x3e\\n\\n## Simplifying assumptions\\n- No saltwater\\n- Ice is pure water\\n- Ice is free-floating\\n- No condensation\\n- No evaporation\\n\\n## Free body diagram\\n![free body diagram](./free_body_diagram_floating_ice.png)\\n> not drawn to scale\\n\\n## Common sense\\nSince the system is in equilibrium the buoyancy force (red) is equal in\\nmagnitude to the gravitational force (blue). \\n\\nUnder the force of gravity the ice will displace some volume of water. `The mass\\nof the displaced volume of water must be equal to the mass of the ice causing\\nthat water to be displaced.` Therefore, the water from the melted ice has the\\nsame volume as the water originally displaced! The water level will not change!\\n\\nWait a minute! How do we know that `The mass of the displaced volume of water\\nmust be equal to the mass of the ice causing that water to be displaced.`?\\nWell, picture this: gravity is applying to a body of water. Pushing against the\\nwater causes an equal-magnitude and opposite-direction reaction. The more water\\nis displaced the greater reaction force. You are pushing against gravity!\\n\\nThis is the buoyancy force!\\n\\nThe force an object can exert due to gravity on a body of water is determined by\\nits mass. That object will sink if the force exerted by the object is greater\\nthan the buoyant force. In other words: if the mass of the object is greater\\nthan the mass of the object\'s volume in water then the object sinks. \\n\\nIf the mass of an object is less than the mass of the object\'s volume in \\nwater... then the object floats.\\n\\nIn other words, objects denser than water sink, objects less dense than water\\nfloat.\\n\\n## Back to saltwater\\n\\nIn the previous discussion the medium of floatation was the same as the object\\nof displacement. In other words: ice (frozen H2O) is floating in water (liquid \\nH2O). Obviously, once the ice melts it\'s all water with the same properties, including density.\\n\\nSo what happens to the fluid level when ice (frozen H2O) floating in saltwater\\nmelts?\\n\\nI leave this as an exercise for the reader."},{"id":"/2022/01/05/Python_Quine","metadata":{"permalink":"/blog/2022/01/05/Python_Quine","editUrl":"https://github.com/alzafacon/alzafacon.github.io/edit/main/website/blog/blog/2022-01-05-Python_Quine.mdx","source":"@site/blog/2022-01-05-Python_Quine.mdx","title":"Python Quine","description":"A quine is a computer program which takes no input and produces a copy of its own source code as its only output.","date":"2022-01-05T00:00:00.000Z","formattedDate":"January 5, 2022","tags":[],"readingTime":0.305,"hasTruncateMarker":false,"authors":[{"name":"Fidel Coria","title":"Software Engineer","url":"https://fidelcoria.com","imageURL":"https://github.com/alzafacon.png","key":"alzafacon"}],"frontMatter":{"authors":"alzafacon"},"prevItem":{"title":"Does melting ice really cause sea levels to rise?","permalink":"/blog/2022/11/01/Melting_Ice"},"nextItem":{"title":"Useless Machine with LEGO Technic","permalink":"/blog/2021/12/16/Lego_Useless_Machine"}},"content":"A quine is a computer program which takes no input and produces a copy of its own source code as its only output.\\n\\nI first read about this kind of program in the ACM article [Reflections on Trusting Trust (August 1984 Volume 27 Number 8 Page 761)](https://www.cs.cmu.edu/~rdriley/487/papers/Thompson_1984_ReflectionsonTrustingTrust.pdf).\\n\\nHere is my solution\\n\\nimport { ClickToReveal } from \'../src/components/ClickToReveal/ClickToReveal.js\';\\n\\n"},{"id":"/2021/12/16/Lego_Useless_Machine","metadata":{"permalink":"/blog/2021/12/16/Lego_Useless_Machine","editUrl":"https://github.com/alzafacon/alzafacon.github.io/edit/main/website/blog/blog/2021-12-16-Lego_Useless_Machine/index.md","source":"@site/blog/2021-12-16-Lego_Useless_Machine/index.md","title":"Useless Machine with LEGO Technic","description":"The purpose of a Useless Machine is to turn itself off when activated. Kits and built examples are available for purchase. While researching I found LEGO models but without kits or instructions.","date":"2021-12-16T00:00:00.000Z","formattedDate":"December 16, 2021","tags":[],"readingTime":0.715,"hasTruncateMarker":true,"authors":[{"name":"Fidel Coria","title":"Software Engineer","url":"https://fidelcoria.com","imageURL":"https://github.com/alzafacon.png","key":"alzafacon"}],"frontMatter":{"authors":"alzafacon"},"prevItem":{"title":"Python Quine","permalink":"/blog/2022/01/05/Python_Quine"},"nextItem":{"title":"Custom Apex Domain for GitHub Pages","permalink":"/blog/2021/12/06/GitHub_Pages"}},"content":"The purpose of a Useless Machine is to turn itself off when activated. Kits and built examples are available for purchase. While researching I found LEGO models but without kits or instructions.\\n\\nChallenge accepted!\\n\\n\x3c!--truncate--\x3e\\n\\nI completed the model in March of 2017 and revised it today.\\n\\nWithout a parts list or instructions I decided to reverse engineer the device from the following video:\\n[[011] Lego Technic - Useless Machine](https://www.youtube.com/watch?v=HAk-rhvZe2w)\\n\\nI created a model using LEGO Digital Designer (LDD) before buying the parts. [Download the LXF model](./UselessMachine.lxf)\\n\\nUsing LDD I generated a PDF with building instructions and a parts list at the end.\\n[Download the PDF instructions](./UselessMachineInstructions.pdf)\\n\\n> NOTE: The model and instructions do not include the LEGO Wind Up MOTOR 6x5x3! It was not available in the LDD.\\n\\nHere is the model at the final step of assembly\\n\\n![Final Step from instructions](./Step84.png)"},{"id":"/2021/12/06/GitHub_Pages","metadata":{"permalink":"/blog/2021/12/06/GitHub_Pages","editUrl":"https://github.com/alzafacon/alzafacon.github.io/edit/main/website/blog/blog/2021-12-06-GitHub_Pages.md","source":"@site/blog/2021-12-06-GitHub_Pages.md","title":"Custom Apex Domain for GitHub Pages","description":"I\'ll explain how I setup the DNS records for an apex domain (fidelcoria.com) with a redirect from www.fidelcoria.com to fidelcoria.com.","date":"2021-12-06T00:00:00.000Z","formattedDate":"December 6, 2021","tags":[],"readingTime":1.815,"hasTruncateMarker":true,"authors":[{"name":"Fidel Coria","title":"Software Engineer","url":"https://fidelcoria.com","imageURL":"https://github.com/alzafacon.png","key":"alzafacon"}],"frontMatter":{"authors":"alzafacon"},"prevItem":{"title":"Useless Machine with LEGO Technic","permalink":"/blog/2021/12/16/Lego_Useless_Machine"},"nextItem":{"title":"DigiLog: Digital Zoom for a Single Hand Analog Timepiece","permalink":"/blog/2021/12/05/DigiLog"}},"content":"I\'ll explain how I setup the DNS records for an apex domain (fidelcoria.com) with a redirect from www.fidelcoria.com to fidelcoria.com.\\n\\nIf you\'re new to GitHub Pages visit [pages.github.com](https://pages.github.com/) to learn the basics.\\n\\n\x3c!--truncate--\x3e\\n\\n## TL;DR\\n\\nHere are the DNS records. The host values for the DNS records were the tricky part to figure out. \\n\\n```\\nALIAS\\nHost: @\\nTarget: alzafacon.github.io.\\n```\\n```\\nCNAME\\nHost: www\\nTarget: alzafacon.github.io.\\n```\\n\\n## The devil is in the details\\n\\nI find the official documentation to be unclear or confusing in some parts, but I don\'t blame them. The internet is complicated and the GitHub writers are trying to make the docs helpful even for beginners.\\n\\nThe long and short of it is that the steps (for apex domain with https and www) are in the docs [here](https://docs.github.com/en/pages/configuring-a-custom-domain-for-your-github-pages-site/managing-a-custom-domain-for-your-github-pages-site#configuring-an-apex-domain). Unfortunately the DNS instructions are confusing.\\n\\nHere are the steps I had to follow:\\n\\n- Enter your desired custom domain in the repo settings page (**before** creating any DNS entries)\\n\\n I used fidelcoria.com (without the leading `www.`)\\n\\n Doing this will configure a CNAME file on your GitHub Pages branch\\n\\n- Create an ALIAS record via your DNS provider\\n\\n The docs say \\"`To create an ALIAS or ANAME record, point your apex domain to the default domain for your site`\\".\\n\\n The `apex domain` did not work. Instead I had to use `@`, which is used to represent the \\"bare domain\\" in DNS records.\\n \\n ```\\n ALIAS\\n Host: @\\n Target: alzafacon.github.io.\\n ``` \\n\\n- Create a CNAME record via your DNS provider\\n \\n The docs say \\"`Navigate to your DNS provider and create a CNAME record that points www.example.com to the default domain for your site`\\"\\n\\n `www.fidelcoria.com` did not work. Instead I had to use `www`.\\n ```\\n CNAME\\n Host: www\\n Target: alzafacon.github.io.\\n ```\\n\\nDNS changes can take up to 24 hours to propagate. This makes it hard to tell if something is wrong or just needs more time.\\n\\nI learned the best approach for me was to get informed, decide what I want, make a plan, try it out, observe patiently, then iterate.\\n\\n## Extra DNS setup\\n\\nI also setup alzafacon.com to redirect to fidelcoria.com\\n\\n```\\nURL Redirect\\nHost: @\\nDestination URL: https://fidelcoria.com\\nUnmasked\\n```"},{"id":"/2021/12/05/DigiLog","metadata":{"permalink":"/blog/2021/12/05/DigiLog","editUrl":"https://github.com/alzafacon/alzafacon.github.io/edit/main/website/blog/blog/2021-12-05-DigiLog/index.mdx","source":"@site/blog/2021-12-05-DigiLog/index.mdx","title":"DigiLog: Digital Zoom for a Single Hand Analog Timepiece","description":"Clocks and watches originally had a single hand. Obviously, this made it hard to tell time accurately. Until the minute hand was invented.","date":"2021-12-05T00:00:00.000Z","formattedDate":"December 5, 2021","tags":[],"readingTime":3.335,"hasTruncateMarker":true,"authors":[{"name":"Fidel Coria","title":"Software Engineer","url":"https://fidelcoria.com","imageURL":"https://github.com/alzafacon.png","key":"alzafacon"}],"frontMatter":{"authors":"alzafacon"},"prevItem":{"title":"Custom Apex Domain for GitHub Pages","permalink":"/blog/2021/12/06/GitHub_Pages"}},"content":"Clocks and watches originally had a single hand. Obviously, this made it hard to tell time accurately. Until the minute hand was invented.\\n\\nI came up with another way to read the minutes without a minute hand. Since the position of the hour hand past the hour marking implies the minutes... zooming into the hour hand shows minutes at a better resolution. For example, at 6:30 the tick marks will show the hour hand to be half way between 6 and 7. While at 7:05 you can zoom in to see the tick marks showing 5 minutes past 7.\\n\\nimport { FreestyleClock } from \'../../src/components/clock/FreestyleClock.js\';\\n\\n
\\n \\n
\\n\\n\x3c!--truncate--\x3e\\n\\n## The Math\\n\\n| | Definitions |\\n| - | - |\\n| Viewport | circular window of fixed size |\\n| `D` | viewport diameter\\n| `R` | viewport radius |\\n| Clock face | the numbers, tick markings, and the hour hand together |\\n| `r` | distance between viewport center and midpoint of chord to be zoomed (chord offset) |\\n| `tau` | time \\"angle\\" in radians of hour hand from polar axis (3 o\'clock) |\\n| `a` | length of the chord |\\n| `S` | scale factor |\\n\\n\\"chord\\n\\n> SOURCE: Weisstein, Eric W. \\"Chord.\\" From MathWorld--A Wolfram Web Resource. https://mathworld.wolfram.com/Chord.html\\n\\nZooming the clock face is simply done by enlarging a circular segment centered where the hour hand is pointing. In the image above the time would be 1:30.\\n\\nI take the chord and enlarge it to be congruent with the view port diameter. So to scale the chord from `a` to `D` the whole clock face must be scaled by `D/a` (i.e. `a(D/a) = D`). \\n\\nThe chord is determined when the user chooses `r`. We need an expression for the value of `a` given `r`.\\n\\nEasy! Pythagorean theorem: \\n\\n R^2 = r^2 + (a/2)^2\\n a/2 = sqrt(R^2 - r^2)\\n a = 2sqrt(R^2 - r^2)\\n\\nSo now we have the scale factor:\\n\\n S = D/a \\n = 2R / (2sqrt(R^2 - r^2))\\n = R / sqrt(R^2 - r^2)\\n\\nNext we need to slide the midpoint of the chord onto the center of the viewport.\\n\\nIt might help to think of the midpoint in polar coordinates as (`Sr`, `tau`). Yes, I scaled by S. With a simple change of coordinates we have:\\n\\n dx = Sr cos(tau)\\n dy = Sr sin(tau)\\n\\n## Course and Fine adjustment of r\\n\\nUsing a slider to change `r` linearly is a bad user experience. At low zoom the clock face moves very little and at high zoom the clock face moves too much. If you graph the scale function It is easy to see why this happens. `S(r)` grows quickly and is also concave up.\\n\\nIt would be better for the value of r to change more quickly at low zoom (course adjustment) and more slowly at high zoom (fine adjustment).\\n\\nThis can be done by letting the user input a zoom value rather than let them input `r` directly. Now we can map the zoom value any way we want with a function `f(z) = r`.\\n\\nI would like to take `z` to be in `[0,1]` and `f(1) = p`, where `0 < p < 1` and `pR` is the max chord-offset allowed. `f` should be monotonically increasing, concave down, with an inflection point somewhere around 0.1, and preferably asymptotic to `1`. Notice `f` will be multiplied by `R` to give the final chord offset.\\n\\nA good candidate function is `1 - 1/(z + 1)`.\\n\\nSo I\'ll start applying transformations to get the desired properties.\\n\\n f(1) = p = 1 - 1/(kz + 1)\\n ... algebra ...\\n k = p / (1-p)\\n \\n f(z) = 1 - 1/(pz/(1-p) + 1)\\n ... algebra ...\\n = 1 - (1-p)/(pz + 1 - p)\\n ... algebra ...\\n = pz / (pz + 1 - p)\\n\\nFinally to get the actual chord offset we take `Rf(z)`. \\n\\nThat\'s all folks!"}]}')}}]); \ No newline at end of file diff --git a/assets/js/runtime~main.52776834.js b/assets/js/runtime~main.555d2acb.js similarity index 62% rename from assets/js/runtime~main.52776834.js rename to assets/js/runtime~main.555d2acb.js index 0b1c3e8..e10a5d0 100644 --- a/assets/js/runtime~main.52776834.js +++ b/assets/js/runtime~main.555d2acb.js @@ -1 +1 @@ -(()=>{"use strict";var e,t,r,a,d,o={},f={};function c(e){var t=f[e];if(void 0!==t)return t.exports;var r=f[e]={id:e,loaded:!1,exports:{}};return o[e].call(r.exports,r,r.exports,c),r.loaded=!0,r.exports}c.m=o,c.c=f,e=[],c.O=(t,r,a,d)=>{if(!r){var o=1/0;for(b=0;b=d)&&Object.keys(c.O).every((e=>c.O[e](r[n])))?r.splice(n--,1):(f=!1,d0&&e[b-1][2]>d;b--)e[b]=e[b-1];e[b]=[r,a,d]},c.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return c.d(t,{a:t}),t},r=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,c.t=function(e,a){if(1&a&&(e=this(e)),8&a)return e;if("object"==typeof e&&e){if(4&a&&e.__esModule)return e;if(16&a&&"function"==typeof e.then)return e}var d=Object.create(null);c.r(d);var o={};t=t||[null,r({}),r([]),r(r)];for(var f=2&a&&e;"object"==typeof f&&!~t.indexOf(f);f=r(f))Object.getOwnPropertyNames(f).forEach((t=>o[t]=()=>e[t]));return o.default=()=>e,c.d(d,o),d},c.d=(e,t)=>{for(var r in t)c.o(t,r)&&!c.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},c.f={},c.e=e=>Promise.all(Object.keys(c.f).reduce(((t,r)=>(c.f[r](e,t),t)),[])),c.u=e=>"assets/js/"+({32:"2d25e629",39:"d2a537ed",85:"1f391b9e",89:"a6aa9e1f",103:"ccc49370",195:"c4f5d8e4",357:"4ff2cc1c",383:"9f0366e5",393:"a8cfb0e0",435:"eb8547fe",454:"bd6dae92",477:"b2f554cd",513:"04d962f6",533:"b2b675dd",535:"814f3328",561:"4c38a669",579:"9554848d",608:"9e4087bc",625:"8d3e48fa",661:"63792a14",775:"6b9716ed",789:"ab1657fd",796:"25e050aa",902:"d9daf2c9"}[e]||e)+"."+{32:"ff35c3e1",39:"9913bd2e",85:"b929a2cc",89:"2606a3e0",103:"c96b2f55",189:"a87bfe96",195:"99141371",357:"665ef315",383:"afd9650f",393:"e41bfddd",435:"f4e04c4b",454:"22c7c939",477:"1cb17071",513:"3a319360",533:"ed47c171",535:"fe878519",561:"c9225c7e",579:"8e531736",608:"cbf07cef",625:"28775004",661:"f8116eca",690:"f19d23f9",735:"09d385ad",775:"7f5a3bd7",789:"bb5aa49e",796:"d98a4021",902:"c0c0d775",972:"4a5ab035"}[e]+".js",c.miniCssF=e=>{},c.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),c.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a={},d="fidelcoria:",c.l=(e,t,r,o)=>{if(a[e])a[e].push(t);else{var f,n;if(void 0!==r)for(var i=document.getElementsByTagName("script"),b=0;b{f.onerror=f.onload=null,clearTimeout(s);var d=a[e];if(delete a[e],f.parentNode&&f.parentNode.removeChild(f),d&&d.forEach((e=>e(r))),t)return t(r)},s=setTimeout(u.bind(null,void 0,{type:"timeout",target:f}),12e4);f.onerror=u.bind(null,f.onerror),f.onload=u.bind(null,f.onload),n&&document.head.appendChild(f)}},c.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},c.p="/",c.gca=function(e){return e={"2d25e629":"32",d2a537ed:"39","1f391b9e":"85",a6aa9e1f:"89",ccc49370:"103",c4f5d8e4:"195","4ff2cc1c":"357","9f0366e5":"383",a8cfb0e0:"393",eb8547fe:"435",bd6dae92:"454",b2f554cd:"477","04d962f6":"513",b2b675dd:"533","814f3328":"535","4c38a669":"561","9554848d":"579","9e4087bc":"608","8d3e48fa":"625","63792a14":"661","6b9716ed":"775",ab1657fd:"789","25e050aa":"796",d9daf2c9:"902"}[e]||e,c.p+c.u(e)},(()=>{var e={303:0,532:0};c.f.j=(t,r)=>{var a=c.o(e,t)?e[t]:void 0;if(0!==a)if(a)r.push(a[2]);else if(/^(303|532)$/.test(t))e[t]=0;else{var d=new Promise(((r,d)=>a=e[t]=[r,d]));r.push(a[2]=d);var o=c.p+c.u(t),f=new Error;c.l(o,(r=>{if(c.o(e,t)&&(0!==(a=e[t])&&(e[t]=void 0),a)){var d=r&&("load"===r.type?"missing":r.type),o=r&&r.target&&r.target.src;f.message="Loading chunk "+t+" failed.\n("+d+": "+o+")",f.name="ChunkLoadError",f.type=d,f.request=o,a[1](f)}}),"chunk-"+t,t)}},c.O.j=t=>0===e[t];var t=(t,r)=>{var a,d,o=r[0],f=r[1],n=r[2],i=0;if(o.some((t=>0!==e[t]))){for(a in f)c.o(f,a)&&(c.m[a]=f[a]);if(n)var b=n(c)}for(t&&t(r);i{"use strict";var e,t,r,a,o,d={},f={};function c(e){var t=f[e];if(void 0!==t)return t.exports;var r=f[e]={id:e,loaded:!1,exports:{}};return d[e].call(r.exports,r,r.exports,c),r.loaded=!0,r.exports}c.m=d,c.c=f,e=[],c.O=(t,r,a,o)=>{if(!r){var d=1/0;for(b=0;b=o)&&Object.keys(c.O).every((e=>c.O[e](r[n])))?r.splice(n--,1):(f=!1,o0&&e[b-1][2]>o;b--)e[b]=e[b-1];e[b]=[r,a,o]},c.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return c.d(t,{a:t}),t},r=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,c.t=function(e,a){if(1&a&&(e=this(e)),8&a)return e;if("object"==typeof e&&e){if(4&a&&e.__esModule)return e;if(16&a&&"function"==typeof e.then)return e}var o=Object.create(null);c.r(o);var d={};t=t||[null,r({}),r([]),r(r)];for(var f=2&a&&e;"object"==typeof f&&!~t.indexOf(f);f=r(f))Object.getOwnPropertyNames(f).forEach((t=>d[t]=()=>e[t]));return d.default=()=>e,c.d(o,d),o},c.d=(e,t)=>{for(var r in t)c.o(t,r)&&!c.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},c.f={},c.e=e=>Promise.all(Object.keys(c.f).reduce(((t,r)=>(c.f[r](e,t),t)),[])),c.u=e=>"assets/js/"+({32:"2d25e629",39:"d2a537ed",85:"1f391b9e",89:"a6aa9e1f",103:"ccc49370",195:"c4f5d8e4",357:"4ff2cc1c",383:"9f0366e5",393:"a8cfb0e0",435:"eb8547fe",454:"bd6dae92",477:"b2f554cd",513:"04d962f6",533:"b2b675dd",535:"814f3328",561:"4c38a669",579:"9554848d",608:"9e4087bc",625:"8d3e48fa",661:"63792a14",775:"6b9716ed",789:"ab1657fd",796:"25e050aa",902:"d9daf2c9"}[e]||e)+"."+{32:"ff35c3e1",39:"9913bd2e",85:"b929a2cc",89:"2606a3e0",103:"c96b2f55",189:"a87bfe96",195:"99141371",357:"665ef315",383:"1bedb13d",393:"e41bfddd",435:"f4e04c4b",454:"22c7c939",477:"3c77ed41",513:"3a319360",533:"ed47c171",535:"fe878519",561:"c9225c7e",579:"28afb186",608:"cbf07cef",625:"28775004",661:"f8116eca",690:"f19d23f9",735:"09d385ad",775:"7f5a3bd7",789:"bb5aa49e",796:"d98a4021",902:"c0c0d775",972:"4a5ab035"}[e]+".js",c.miniCssF=e=>{},c.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),c.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a={},o="fidelcoria:",c.l=(e,t,r,d)=>{if(a[e])a[e].push(t);else{var f,n;if(void 0!==r)for(var i=document.getElementsByTagName("script"),b=0;b{f.onerror=f.onload=null,clearTimeout(s);var o=a[e];if(delete a[e],f.parentNode&&f.parentNode.removeChild(f),o&&o.forEach((e=>e(r))),t)return t(r)},s=setTimeout(u.bind(null,void 0,{type:"timeout",target:f}),12e4);f.onerror=u.bind(null,f.onerror),f.onload=u.bind(null,f.onload),n&&document.head.appendChild(f)}},c.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},c.p="/",c.gca=function(e){return e={"2d25e629":"32",d2a537ed:"39","1f391b9e":"85",a6aa9e1f:"89",ccc49370:"103",c4f5d8e4:"195","4ff2cc1c":"357","9f0366e5":"383",a8cfb0e0:"393",eb8547fe:"435",bd6dae92:"454",b2f554cd:"477","04d962f6":"513",b2b675dd:"533","814f3328":"535","4c38a669":"561","9554848d":"579","9e4087bc":"608","8d3e48fa":"625","63792a14":"661","6b9716ed":"775",ab1657fd:"789","25e050aa":"796",d9daf2c9:"902"}[e]||e,c.p+c.u(e)},(()=>{var e={303:0,532:0};c.f.j=(t,r)=>{var a=c.o(e,t)?e[t]:void 0;if(0!==a)if(a)r.push(a[2]);else if(/^(303|532)$/.test(t))e[t]=0;else{var o=new Promise(((r,o)=>a=e[t]=[r,o]));r.push(a[2]=o);var d=c.p+c.u(t),f=new Error;c.l(d,(r=>{if(c.o(e,t)&&(0!==(a=e[t])&&(e[t]=void 0),a)){var o=r&&("load"===r.type?"missing":r.type),d=r&&r.target&&r.target.src;f.message="Loading chunk "+t+" failed.\n("+o+": "+d+")",f.name="ChunkLoadError",f.type=o,f.request=d,a[1](f)}}),"chunk-"+t,t)}},c.O.j=t=>0===e[t];var t=(t,r)=>{var a,o,d=r[0],f=r[1],n=r[2],i=0;if(d.some((t=>0!==e[t]))){for(a in f)c.o(f,a)&&(c.m[a]=f[a]);if(n)var b=n(c)}for(t&&t(r);i Blog | Tech Notes - +
-

· 4 min read
Fidel Coria

The underground PVC water pipes outside my home are frequently cracking or leaking at the joints. After making several repairs I turned to reddit for an easier way.

A professional recommended using 4 elbows! Genius! The joint is assembled by sliding the top part into the bottom 2 elbows. Instead of having to dig out the pipes enough to bend the pipes to fit couplers on each end.

       _____    _____
| __====__ |
| |2 3| |
|| ||
|| ||

____ _| |1 4| |_ _____
____|____| |____|_____

fig. 1

But can this technique be applied even if the pipes are skewed?

· 3 min read
Fidel Coria

I saw a documentary that claimed melting polar ice caps are causing sea levels +

· 4 min read
Fidel Coria

The underground PVC water pipes outside my home are frequently cracking or leaking at the joints. After making several repairs I turned to reddit for advice on making repairs.

Someone recommended using 4 elbows! The joint is assembled by sliding the top part into the bottom 2 elbows. Instead of having to dig out the pipes enough to bend the pipes to fit couplers on each end.

       _____    _____
| __====__ |
| |2 3| |
|| ||
|| ||

____ _| |1 4| |_ _____
____|____| |____|_____

fig. 1

I heard from a professional plumber that the extra elbows can cause a drop in pressure, but more importantly there are more joints that could fail. So the extra digging is worth the trouble.

But can this technique be applied even if the pipes are skewed?

· 3 min read
Fidel Coria

I saw a documentary that claimed melting polar ice caps are causing sea levels to rise. Something was fishy about that claim so I made some simplifying assumptions, drew a free body diagram and started doing algebra. I won't reproduce the algebra here because it turns out there is a common sense way to reach the same conclusion.

· One min read
Fidel Coria

The purpose of a Useless Machine is to turn itself off when activated. Kits and built examples are available for purchase. While researching I found LEGO models but without kits or instructions.

Challenge accepted!

· 4 min read
Fidel Coria

Clocks and watches originally had a single hand. Obviously, this made it hard to tell time accurately. Until the minute hand was invented.

I came up with another way to read the minutes without a minute hand. Since the position of the hour hand past the hour marking implies the minutes... zooming into the hour hand shows minutes at a better resolution. For example, at 6:30 the tick marks will show the hour hand to be half way between 6 and 7. While at 7:05 you can zoom in to see the tick marks showing 5 minutes past 7.

- + \ No newline at end of file diff --git a/blog/2021/12/05/DigiLog.html b/blog/2021/12/05/DigiLog.html index faeb111..b7bd051 100644 --- a/blog/2021/12/05/DigiLog.html +++ b/blog/2021/12/05/DigiLog.html @@ -5,13 +5,13 @@ DigiLog: Digital Zoom for a Single Hand Analog Timepiece | Tech Notes - +

DigiLog: Digital Zoom for a Single Hand Analog Timepiece

· 4 min read
Fidel Coria

Clocks and watches originally had a single hand. Obviously, this made it hard to tell time accurately. Until the minute hand was invented.

I came up with another way to read the minutes without a minute hand. Since the position of the hour hand past the hour marking implies the minutes... zooming into the hour hand shows minutes at a better resolution. For example, at 6:30 the tick marks will show the hour hand to be half way between 6 and 7. While at 7:05 you can zoom in to see the tick marks showing 5 minutes past 7.

The Math​

Definitions
Viewportcircular window of fixed size
Dviewport diameter
Rviewport radius
Clock facethe numbers, tick markings, and the hour hand together
rdistance between viewport center and midpoint of chord to be zoomed (chord offset)
tautime "angle" in radians of hour hand from polar axis (3 o'clock)
alength of the chord
Sscale factor
chord diagram

SOURCE: Weisstein, Eric W. "Chord." From MathWorld--A Wolfram Web Resource. https://mathworld.wolfram.com/Chord.html

Zooming the clock face is simply done by enlarging a circular segment centered where the hour hand is pointing. In the image above the time would be 1:30.

I take the chord and enlarge it to be congruent with the view port diameter. So to scale the chord from a to D the whole clock face must be scaled by D/a (i.e. a(D/a) = D).

The chord is determined when the user chooses r. We need an expression for the value of a given r.

Easy! Pythagorean theorem:

R^2 = r^2 + (a/2)^2
a/2 = sqrt(R^2 - r^2)
a = 2sqrt(R^2 - r^2)

So now we have the scale factor:

S = D/a 
= 2R / (2sqrt(R^2 - r^2))
= R / sqrt(R^2 - r^2)

Next we need to slide the midpoint of the chord onto the center of the viewport.

It might help to think of the midpoint in polar coordinates as (Sr, tau). Yes, I scaled by S. With a simple change of coordinates we have:

dx = Sr cos(tau)
dy = Sr sin(tau)

Course and Fine adjustment of r​

Using a slider to change r linearly is a bad user experience. At low zoom the clock face moves very little and at high zoom the clock face moves too much. If you graph the scale function It is easy to see why this happens. S(r) grows quickly and is also concave up.

It would be better for the value of r to change more quickly at low zoom (course adjustment) and more slowly at high zoom (fine adjustment).

This can be done by letting the user input a zoom value rather than let them input r directly. Now we can map the zoom value any way we want with a function f(z) = r.

I would like to take z to be in [0,1] and f(1) = p, where 0 < p < 1 and pR is the max chord-offset allowed. f should be monotonically increasing, concave down, with an inflection point somewhere around 0.1, and preferably asymptotic to 1. Notice f will be multiplied by R to give the final chord offset.

A good candidate function is 1 - 1/(z + 1).

So I'll start applying transformations to get the desired properties.

f(1) = p = 1 - 1/(kz + 1)
... algebra ...
k = p / (1-p)

f(z) = 1 - 1/(pz/(1-p) + 1)
... algebra ...
= 1 - (1-p)/(pz + 1 - p)
... algebra ...
= pz / (pz + 1 - p)

Finally to get the actual chord offset we take Rf(z).

That's all folks!

- + \ No newline at end of file diff --git a/blog/2021/12/06/GitHub_Pages.html b/blog/2021/12/06/GitHub_Pages.html index 61c3d31..3921337 100644 --- a/blog/2021/12/06/GitHub_Pages.html +++ b/blog/2021/12/06/GitHub_Pages.html @@ -5,13 +5,13 @@ Custom Apex Domain for GitHub Pages | Tech Notes - +

Custom Apex Domain for GitHub Pages

· 2 min read
Fidel Coria

I'll explain how I setup the DNS records for an apex domain (fidelcoria.com) with a redirect from www.fidelcoria.com to fidelcoria.com.

If you're new to GitHub Pages visit pages.github.com to learn the basics.

TL;DR​

Here are the DNS records. The host values for the DNS records were the tricky part to figure out.

ALIAS
Host: @
Target: alzafacon.github.io.
CNAME
Host: www
Target: alzafacon.github.io.

The devil is in the details​

I find the official documentation to be unclear or confusing in some parts, but I don't blame them. The internet is complicated and the GitHub writers are trying to make the docs helpful even for beginners.

The long and short of it is that the steps (for apex domain with https and www) are in the docs here. Unfortunately the DNS instructions are confusing.

Here are the steps I had to follow:

  • Enter your desired custom domain in the repo settings page (before creating any DNS entries)

    I used fidelcoria.com (without the leading www.)

    Doing this will configure a CNAME file on your GitHub Pages branch

  • Create an ALIAS record via your DNS provider

    The docs say "To create an ALIAS or ANAME record, point your apex domain to the default domain for your site".

    The apex domain did not work. Instead I had to use @, which is used to represent the "bare domain" in DNS records.

    ALIAS
    Host: @
    Target: alzafacon.github.io.
  • Create a CNAME record via your DNS provider

    The docs say "Navigate to your DNS provider and create a CNAME record that points www.example.com to the default domain for your site"

    www.fidelcoria.com did not work. Instead I had to use www.

    CNAME
    Host: www
    Target: alzafacon.github.io.

DNS changes can take up to 24 hours to propagate. This makes it hard to tell if something is wrong or just needs more time.

I learned the best approach for me was to get informed, decide what I want, make a plan, try it out, observe patiently, then iterate.

Extra DNS setup​

I also setup alzafacon.com to redirect to fidelcoria.com

URL Redirect
Host: @
Destination URL: https://fidelcoria.com
Unmasked
- + \ No newline at end of file diff --git a/blog/2021/12/16/Lego_Useless_Machine.html b/blog/2021/12/16/Lego_Useless_Machine.html index edad354..45f53f8 100644 --- a/blog/2021/12/16/Lego_Useless_Machine.html +++ b/blog/2021/12/16/Lego_Useless_Machine.html @@ -5,7 +5,7 @@ Useless Machine with LEGO Technic | Tech Notes - + @@ -13,7 +13,7 @@

Useless Machine with LEGO Technic

· One min read
Fidel Coria

The purpose of a Useless Machine is to turn itself off when activated. Kits and built examples are available for purchase. While researching I found LEGO models but without kits or instructions.

Challenge accepted!

I completed the model in March of 2017 and revised it today.

Without a parts list or instructions I decided to reverse engineer the device from the following video: [011] Lego Technic - Useless Machine

I created a model using LEGO Digital Designer (LDD) before buying the parts. Download the LXF model

Using LDD I generated a PDF with building instructions and a parts list at the end. Download the PDF instructions

NOTE: The model and instructions do not include the LEGO Wind Up MOTOR 6x5x3! It was not available in the LDD.

Here is the model at the final step of assembly

Final Step from instructions

- + \ No newline at end of file diff --git a/blog/2022/01/05/Python_Quine.html b/blog/2022/01/05/Python_Quine.html index d3bba62..15809ce 100644 --- a/blog/2022/01/05/Python_Quine.html +++ b/blog/2022/01/05/Python_Quine.html @@ -5,13 +5,13 @@ Python Quine | Tech Notes - +
- + \ No newline at end of file diff --git a/blog/2022/11/01/Melting_Ice.html b/blog/2022/11/01/Melting_Ice.html index 4831fae..5d81c66 100644 --- a/blog/2022/11/01/Melting_Ice.html +++ b/blog/2022/11/01/Melting_Ice.html @@ -5,7 +5,7 @@ Does melting ice really cause sea levels to rise? | Tech Notes - + @@ -31,7 +31,7 @@ of displacement. In other words: ice (frozen H2O) is floating in water (liquid H2O). Obviously, once the ice melts it's all water with the same properties, including density.

So what happens to the fluid level when ice (frozen H2O) floating in saltwater melts?

I leave this as an exercise for the reader.

- + \ No newline at end of file diff --git a/blog/2024/08/10/Four_Elbows.html b/blog/2024/08/10/Four_Elbows.html index 22dc8f0..8549223 100644 --- a/blog/2024/08/10/Four_Elbows.html +++ b/blog/2024/08/10/Four_Elbows.html @@ -3,18 +3,18 @@ -Plumbing: Connect 2 pipes with 4 elbows | Tech Notes +Plumbing: Connect 2 pipes with 4 elbows | Tech Notes - +
-

Plumbing: Connect 2 pipes with 4 elbows

· 4 min read
Fidel Coria

The underground PVC water pipes outside my home are frequently cracking or leaking at the joints. After making several repairs I turned to reddit for an easier way.

A professional recommended using 4 elbows! Genius! The joint is assembled by sliding the top part into the bottom 2 elbows. Instead of having to dig out the pipes enough to bend the pipes to fit couplers on each end.

       _____    _____
| __====__ |
| |2 3| |
|| ||
|| ||

____ _| |1 4| |_ _____
____|____| |____|_____

fig. 1

But can this technique be applied even if the pipes are skewed?

Of course I want to generalize. I'm just the typical math aficionado. I will attempt a proof by construction.

The critical feature of the 4 elbow joint is that 2 vertical pipes shown below must be parallel (so they can be slid into place).

         _____    _____
| __====__ |
| |2 3| |
|| ||
|| ||

fig. 2

Here is a simplified drawing with conventional mathematical notation. Pretend it is in three dimensions.

        C         D
*_________*
| |
| |
<-*-----* *-----*->
A' A B B'

fig. 3

Let there be a plane at point A perpendicular to ->AA' called P.

  • This plane includes all points in the rays that a 90 degree "elbow" at point A could draw when rotated.

Now, let there also be a plane at point B perpendicular to ->BB' called Q.

These planes are useful because they get us closer to identifying the orientation of the "vertical" pipes in fig. 2. The reason for this is that each plane contains all of the possible orientations of the pipes independently.

So all we need to find is a line in plane P through point A that is parallel to a line in plane Q through point B. Then it is trivial to select a point C and draw a perpendicular line to a point D as illustrated in fig. 3.

Notice that the planes may either intersect or not.

  1. In the case that the planes do not intersect

    This means the planes are parallel. Which means any line we chose through point A will have a parallel line through point B. So there are infinitely many lines to select and an infinite choice of points C and D. In other words there are infinitely many ways to orient the fitting in fig. 2 by rotating it around the pipes. The length of the "vertical" pipes is the other infinite choice.

  2. In the case that the planes intersect

    We can take the line of intersection -call it X- and draw a line parallel to X in plane P through point A. Likewise we can draw a line parallel to X in plane Q through point B. +

    Plumbing: Connect 2 pipes with 4 elbows

    · 4 min read
    Fidel Coria

    The underground PVC water pipes outside my home are frequently cracking or leaking at the joints. After making several repairs I turned to reddit for advice on making repairs.

    Someone recommended using 4 elbows! The joint is assembled by sliding the top part into the bottom 2 elbows. Instead of having to dig out the pipes enough to bend the pipes to fit couplers on each end.

           _____    _____
    | __====__ |
    | |2 3| |
    || ||
    || ||

    ____ _| |1 4| |_ _____
    ____|____| |____|_____

    fig. 1

    I heard from a professional plumber that the extra elbows can cause a drop in pressure, but more importantly there are more joints that could fail. So the extra digging is worth the trouble.

    But can this technique be applied even if the pipes are skewed?

    So let's generalize. Here is a proof by construction.

    The critical feature of the 4 elbow joint is that 2 vertical pipes shown below must be parallel (so they can be slid into place).

             _____    _____
    | __====__ |
    | |2 3| |
    || ||
    || ||

    fig. 2

    Here is a simplified drawing with conventional notation. Pretend it is in three dimensions.

            C         D
    *_________*
    | |
    | |
    <-*-----* *-----*->
    A' A B B'

    fig. 3

    Let there be a plane at point A perpendicular to ->AA' called P.

    • This plane includes all points in the rays that a 90 degree "elbow" at point A could draw when rotated.

    Now, let there also be a plane at point B perpendicular to ->BB' called Q.

    These planes are useful because they get us closer to identifying the orientation of the "vertical" pipes in fig. 2. The reason for this is that each plane contains all of the possible orientations of the pipes independently.

    So all we need to find is a line in plane P through point A that is parallel to a line in plane Q through point B. Then it is trivial to select a point C and draw a perpendicular line to a point D as illustrated in fig. 3.

    Notice that the planes may either intersect or not.

    1. In the case that the planes do not intersect

      This means the planes are parallel. Which means any line we chose through point A will have a parallel line through point B. So there are infinitely many lines to select and an infinite choice of points C and D. In other words there are infinitely many ways to orient the fitting in fig. 2 by rotating it around the pipes. The length of the "vertical" pipes is the other infinite choice.

    2. In the case that the planes intersect

      We can take the line of intersection -call it X- and draw a line parallel to X in plane P through point A. Likewise we can draw a line parallel to X in plane Q through point B. By transitivity the line in plane P through point A is parallel to the line in plane Q through point B. This time we only have one pair of parallel lines instead of an infinite choice. But there are 2 orientations for the "vertical" pipes as shown in fig. 4 and fig. 5. -The length of the "vertical" pipes is still an infinite choice.

           * 
    / \
    / \
    <---* \
    *
    /
    /
    *------>

    fig. 4
    <---*     
    /
    /
    *
    \
    \ *------>
    \ /
    \ /
    *

    fig. 5

    Yes! The 4 elbow technique can always work... in you have enough space.

- +The length of the "vertical" pipes is still an infinite choice.

       * 
/ \
/ \
<---* \
*
/
/
*------>

fig. 4
<---*     
/
/
*
\
\ *------>
\ /
\ /
*

fig. 5

Yes! The 4 elbow technique always works... in theory.

+ \ No newline at end of file diff --git a/blog/archive.html b/blog/archive.html index 65a3afb..df56e11 100644 --- a/blog/archive.html +++ b/blog/archive.html @@ -5,13 +5,13 @@ Archive | Tech Notes - + - + \ No newline at end of file diff --git a/blog/atom.xml b/blog/atom.xml index b66e4c1..fbbd1a1 100644 --- a/blog/atom.xml +++ b/blog/atom.xml @@ -12,11 +12,11 @@ /2024/08/10/Four_Elbows 2024-08-10T00:00:00.000Z - - The underground PVC water pipes outside my home are frequently cracking or leaking at the joints. After making several repairs I turned to reddit for an easier way.

A professional recommended using 4 elbows! Genius! The joint is assembled by sliding the top part into the bottom 2 elbows. Instead of having to dig out the pipes enough to bend the pipes to fit couplers on each end.

       _____    _____
| __====__ |
| |2 3| |
|| ||
|| ||

____ _| |1 4| |_ _____
____|____| |____|_____

fig. 1

But can this technique be applied even if the pipes are skewed?

Of course I want to generalize. I'm just the typical math aficionado. I will attempt a proof by construction.

The critical feature of the 4 elbow joint is that 2 vertical pipes shown below must be parallel (so they can be slid into place).

         _____    _____
| __====__ |
| |2 3| |
|| ||
|| ||

fig. 2

Here is a simplified drawing with conventional mathematical notation. Pretend it is in three dimensions.

        C         D
*_________*
| |
| |
<-*-----* *-----*->
A' A B B'

fig. 3

Let there be a plane at point A perpendicular to ->AA' called P.

  • This plane includes all points in the rays that a 90 degree "elbow" at point A could draw when rotated.

Now, let there also be a plane at point B perpendicular to ->BB' called Q.

These planes are useful because they get us closer to identifying the orientation of the "vertical" pipes in fig. 2. The reason for this is that each plane contains all of the possible orientations of the pipes independently.

So all we need to find is a line in plane P through point A that is parallel to a line in plane Q through point B. Then it is trivial to select a point C and draw a perpendicular line to a point D as illustrated in fig. 3.

Notice that the planes may either intersect or not.

  1. In the case that the planes do not intersect

    This means the planes are parallel. Which means any line we chose through point A will have a parallel line through point B. So there are infinitely many lines to select and an infinite choice of points C and D. In other words there are infinitely many ways to orient the fitting in fig. 2 by rotating it around the pipes. The length of the "vertical" pipes is the other infinite choice.

  2. In the case that the planes intersect

    We can take the line of intersection -call it X- and draw a line parallel to X in plane P through point A. Likewise we can draw a line parallel to X in plane Q through point B. +

    + The underground PVC water pipes outside my home are frequently cracking or leaking at the joints. After making several repairs I turned to reddit for advice on making repairs.

    Someone recommended using 4 elbows! The joint is assembled by sliding the top part into the bottom 2 elbows. Instead of having to dig out the pipes enough to bend the pipes to fit couplers on each end.

           _____    _____
    | __====__ |
    | |2 3| |
    || ||
    || ||

    ____ _| |1 4| |_ _____
    ____|____| |____|_____

    fig. 1

    I heard from a professional plumber that the extra elbows can cause a drop in pressure, but more importantly there are more joints that could fail. So the extra digging is worth the trouble.

    But can this technique be applied even if the pipes are skewed?

    So let's generalize. Here is a proof by construction.

    The critical feature of the 4 elbow joint is that 2 vertical pipes shown below must be parallel (so they can be slid into place).

             _____    _____
    | __====__ |
    | |2 3| |
    || ||
    || ||

    fig. 2

    Here is a simplified drawing with conventional notation. Pretend it is in three dimensions.

            C         D
    *_________*
    | |
    | |
    <-*-----* *-----*->
    A' A B B'

    fig. 3

    Let there be a plane at point A perpendicular to ->AA' called P.

    • This plane includes all points in the rays that a 90 degree "elbow" at point A could draw when rotated.

    Now, let there also be a plane at point B perpendicular to ->BB' called Q.

    These planes are useful because they get us closer to identifying the orientation of the "vertical" pipes in fig. 2. The reason for this is that each plane contains all of the possible orientations of the pipes independently.

    So all we need to find is a line in plane P through point A that is parallel to a line in plane Q through point B. Then it is trivial to select a point C and draw a perpendicular line to a point D as illustrated in fig. 3.

    Notice that the planes may either intersect or not.

    1. In the case that the planes do not intersect

      This means the planes are parallel. Which means any line we chose through point A will have a parallel line through point B. So there are infinitely many lines to select and an infinite choice of points C and D. In other words there are infinitely many ways to orient the fitting in fig. 2 by rotating it around the pipes. The length of the "vertical" pipes is the other infinite choice.

    2. In the case that the planes intersect

      We can take the line of intersection -call it X- and draw a line parallel to X in plane P through point A. Likewise we can draw a line parallel to X in plane Q through point B. By transitivity the line in plane P through point A is parallel to the line in plane Q through point B. This time we only have one pair of parallel lines instead of an infinite choice. But there are 2 orientations for the "vertical" pipes as shown in fig. 4 and fig. 5. -The length of the "vertical" pipes is still an infinite choice.

           * 
    / \
    / \
    <---* \
    *
    /
    /
    *------>

    fig. 4
    <---*     
    /
    /
    *
    \
    \ *------>
    \ /
    \ /
    *

    fig. 5

    Yes! The 4 elbow technique can always work... in you have enough space.

    ]]>
    +The length of the "vertical" pipes is still an infinite choice.

       * 
/ \
/ \
<---* \
*
/
/
*------>

fig. 4
<---*     
/
/
*
\
\ *------>
\ /
\ /
*

fig. 5

Yes! The 4 elbow technique always works... in theory.

]]>
Fidel Coria https://fidelcoria.com diff --git a/blog/rss.xml b/blog/rss.xml index 0d5eaff..13d7eba 100644 --- a/blog/rss.xml +++ b/blog/rss.xml @@ -13,11 +13,11 @@ https://fidelcoria.com/blog/2024/08/10/Four_Elbows /2024/08/10/Four_Elbows Sat, 10 Aug 2024 00:00:00 GMT - - The underground PVC water pipes outside my home are frequently cracking or leaking at the joints. After making several repairs I turned to reddit for an easier way.

A professional recommended using 4 elbows! Genius! The joint is assembled by sliding the top part into the bottom 2 elbows. Instead of having to dig out the pipes enough to bend the pipes to fit couplers on each end.

       _____    _____
| __====__ |
| |2 3| |
|| ||
|| ||

____ _| |1 4| |_ _____
____|____| |____|_____

fig. 1

But can this technique be applied even if the pipes are skewed?

Of course I want to generalize. I'm just the typical math aficionado. I will attempt a proof by construction.

The critical feature of the 4 elbow joint is that 2 vertical pipes shown below must be parallel (so they can be slid into place).

         _____    _____
| __====__ |
| |2 3| |
|| ||
|| ||

fig. 2

Here is a simplified drawing with conventional mathematical notation. Pretend it is in three dimensions.

        C         D
*_________*
| |
| |
<-*-----* *-----*->
A' A B B'

fig. 3

Let there be a plane at point A perpendicular to ->AA' called P.

  • This plane includes all points in the rays that a 90 degree "elbow" at point A could draw when rotated.

Now, let there also be a plane at point B perpendicular to ->BB' called Q.

These planes are useful because they get us closer to identifying the orientation of the "vertical" pipes in fig. 2. The reason for this is that each plane contains all of the possible orientations of the pipes independently.

So all we need to find is a line in plane P through point A that is parallel to a line in plane Q through point B. Then it is trivial to select a point C and draw a perpendicular line to a point D as illustrated in fig. 3.

Notice that the planes may either intersect or not.

  1. In the case that the planes do not intersect

    This means the planes are parallel. Which means any line we chose through point A will have a parallel line through point B. So there are infinitely many lines to select and an infinite choice of points C and D. In other words there are infinitely many ways to orient the fitting in fig. 2 by rotating it around the pipes. The length of the "vertical" pipes is the other infinite choice.

  2. In the case that the planes intersect

    We can take the line of intersection -call it X- and draw a line parallel to X in plane P through point A. Likewise we can draw a line parallel to X in plane Q through point B. + + The underground PVC water pipes outside my home are frequently cracking or leaking at the joints. After making several repairs I turned to reddit for advice on making repairs.

    Someone recommended using 4 elbows! The joint is assembled by sliding the top part into the bottom 2 elbows. Instead of having to dig out the pipes enough to bend the pipes to fit couplers on each end.

           _____    _____
    | __====__ |
    | |2 3| |
    || ||
    || ||

    ____ _| |1 4| |_ _____
    ____|____| |____|_____

    fig. 1

    I heard from a professional plumber that the extra elbows can cause a drop in pressure, but more importantly there are more joints that could fail. So the extra digging is worth the trouble.

    But can this technique be applied even if the pipes are skewed?

    So let's generalize. Here is a proof by construction.

    The critical feature of the 4 elbow joint is that 2 vertical pipes shown below must be parallel (so they can be slid into place).

             _____    _____
    | __====__ |
    | |2 3| |
    || ||
    || ||

    fig. 2

    Here is a simplified drawing with conventional notation. Pretend it is in three dimensions.

            C         D
    *_________*
    | |
    | |
    <-*-----* *-----*->
    A' A B B'

    fig. 3

    Let there be a plane at point A perpendicular to ->AA' called P.

    • This plane includes all points in the rays that a 90 degree "elbow" at point A could draw when rotated.

    Now, let there also be a plane at point B perpendicular to ->BB' called Q.

    These planes are useful because they get us closer to identifying the orientation of the "vertical" pipes in fig. 2. The reason for this is that each plane contains all of the possible orientations of the pipes independently.

    So all we need to find is a line in plane P through point A that is parallel to a line in plane Q through point B. Then it is trivial to select a point C and draw a perpendicular line to a point D as illustrated in fig. 3.

    Notice that the planes may either intersect or not.

    1. In the case that the planes do not intersect

      This means the planes are parallel. Which means any line we chose through point A will have a parallel line through point B. So there are infinitely many lines to select and an infinite choice of points C and D. In other words there are infinitely many ways to orient the fitting in fig. 2 by rotating it around the pipes. The length of the "vertical" pipes is the other infinite choice.

    2. In the case that the planes intersect

      We can take the line of intersection -call it X- and draw a line parallel to X in plane P through point A. Likewise we can draw a line parallel to X in plane Q through point B. By transitivity the line in plane P through point A is parallel to the line in plane Q through point B. This time we only have one pair of parallel lines instead of an infinite choice. But there are 2 orientations for the "vertical" pipes as shown in fig. 4 and fig. 5. -The length of the "vertical" pipes is still an infinite choice.

           * 
    / \
    / \
    <---* \
    *
    /
    /
    *------>

    fig. 4
    <---*     
    /
    /
    *
    \
    \ *------>
    \ /
    \ /
    *

    fig. 5

    Yes! The 4 elbow technique can always work... in you have enough space.

    ]]> +The length of the "vertical" pipes is still an infinite choice.

       * 
/ \
/ \
<---* \
*
/
/
*------>

fig. 4
<---*     
/
/
*
\
\ *------>
\ /
\ /
*

fig. 5

Yes! The 4 elbow technique always works... in theory.

]]>
<![CDATA[Does melting ice really cause sea levels to rise?]]> diff --git a/index.html b/index.html index 8f6f8cb..fae1257 100644 --- a/index.html +++ b/index.html @@ -5,13 +5,13 @@ Fidel Coria | Tech Notes - + - + \ No newline at end of file diff --git a/phrases.html b/phrases.html index bb85fe1..6537e6d 100644 --- a/phrases.html +++ b/phrases.html @@ -5,13 +5,13 @@ Phrases / Sayings / Quotes | Tech Notes - +

Phrases / Sayings / Quotes



El que temprano se moja, temprano se seca

Spanish, The one that get's rained on first, dries off first



Kontext ist könig.

German, Context is king.

Nabeel Kandah



There are no free lunches.



Es triste la soledad, pero es más bonita la libertad.

Spanish, Loneliness is painful, but liberty is more delightful.

Venancio Muñoz



Y’all can go to hell and I will go to Texas.

Davy Crockett



Premature optimization is the root of all evil.

Sir Tony Hoare



Mal de muchos, consuelo de tontos.

Spanish, Affliction of the masses, comfort to the dumb asses.



¿Manejar borracho? ¡No seas tonto Muchacho!

Spanish, Driving Drunk? Don't be stupid!



Every action you take is a vote for the type of person you wish to become. No single instance will transform your beliefs, but as the votes build up, so does the evidence of your new identity.

James Clear



Make illegal states unrepresentable.

Yaron Minsky



Más ingenio que presupuesto, y más corazón que técnica

Spanish, More wit than budget, and more heart than technique



- + \ No newline at end of file diff --git a/toolbox.html b/toolbox.html index f873ab8..c45e503 100644 --- a/toolbox.html +++ b/toolbox.html @@ -5,7 +5,7 @@ Toolbox of Software Developer Tricks, etc. | Tech Notes - + @@ -13,7 +13,7 @@

Toolbox of Software Developer Tricks, etc.

Useful little things are easy to lose


GitLab: Clone all repos from a group​

Install the glab cli tool first.

GITLAB_HOST=gitlab.example.com glab repo clone --group MyGroup --archived=false --preserve-namespace --paginate

Docker: "bash" into a docker container​

I often need to inspect docker images. The following is the command to do this and a break down of the options.

docker run -it --rm IMAGE_NAME /bin/bash

-i, --interactive Keep STDIN open even if not attached -t, --tty Allocate a pseudo-TTY --rm Automatically remove the container when it exits


GitLab CI: Split long commands... there's a bug​

At time of writing (29 Nov 2022) GitLab CI has an embarrassing bug. Certain script failures are not reported. Failures in script files are also not reported unless it's the last command in the script.

If multiple commands are combined into one command string, only the last command’s failure or success is reported. Failures from earlier commands are ignored due to a bug. To work around this, run each command as a separate script item, or add an exit 1 command to each command string.

source: https://docs.gitlab.com/ee/ci/yaml/script.html#split-long-commands


JavaScript thread sleep​

async function sleep(ms) {
await new Promise(resolve =>
setTimeout(resolve, ms)
)
}

Ruby Gems: execute specific version from several installed​

Multiple versions of a Ruby Gem can be installed for use from the command line. For example to see which versions of bundler you have

gem list bundler

To use the version you want put the version number between underscores right after the gem command line name (note this may be different than the gem name).

bundle _2.3.4_ install

Node: get package.json version​

$ node -p "require('./package.json').version"

Git: Step through commits on a branch​

Walk through commits on a branch by jumping back a number of commits from the branch head.

git checkout <branch-name>~<number>
git checkout spam_and_eggs~5
git checkout spam_and_eggs~6

Git SSH for multiple remote servers​

~/.ssh/config:

Host github.com
HostName github.com
User git
IdentityFile ~/.ssh/personal_github

Host github.company.com
HostName github.company.com
User git
IdentityFile ~/.ssh/work_github

SOURCE: https://www.freecodecamp.org/news/manage-multiple-github-accounts-the-ssh-way-2dadc30ccaca/


macOS: Always show hidden files​

defaults write com.apple.finder AppleShowAllFiles -bool true

Git debug ignore and excludes​

git check-ignore -v <FILE_NAME>

K8S: How to print Opaque Secrets​

kubectl get secret <SECRET_NAME> -o jsonpath="{.data.<DATA>}" | base64 --decode

GitHub: Find repos you own in an Organization​

It is impossible on the GitHub website to see a list of repos in an Organization that you own.

Here is a GraphQL query (with query variables) that gets you pretty close. You still have to manually filter repos forked from an Organization repo. The login values in the response can help select the org you care about. You can run the query on https://docs.github.com/en/graphql/overview/explorer. Don't forget to sign in.

query pagination($first: Int!, $after: String = null) {
viewer {
repositories(first: $first, after: $after, affiliations: [ORGANIZATION_MEMBER]) {
totalCount
nodes {
name, url
owner { login }
}
pageInfo {
startCursor, endCursor
hasPreviousPage, hasNextPage
}
}
}
}

Here is the REST api version:

curl \
-H "Accept: application/vnd.github.v3+json" \
-u "$USERNAME:$PERSONAL_ACCESS_TOKEN" \
https://api.github.com/user/repos?affiliation=organization_member&per_page=100&page=1

SOURCE: https://docs.github.com/en/rest/reference/repos#list-repositories-for-the-authenticated-user

- + \ No newline at end of file