Yes I tried that, the answers normally get quite confused and angrymistermack wrote: I made a comment on the science forum about the invariance of the speed of light, .

Yes I tried that, the answers normally get quite confused and angrymistermack wrote: I made a comment on the science forum about the invariance of the speed of light, .
Code: Select all
<!DOCTYPE html>
<html lang="en_GB">
<head>
<meta charset="utf-8"/>
<title>Brian Peacock | Ping2</title>
<meta name="generator" content="GAPP v1.1"/>
<meta name="author" content="MrBrianPeacock@gmail.com">
<meta name="description" content="Pages developed for personal use only."/>
<meta name="date" content="24.02.2017 15:09:26 GMT"/>
<style type="text/css"><!--
@import url('https://fonts.googleapis.com/css?family=Julius+Sans+One');html{font-size:20px;box-sizing:border-box}*,*:before,*:after{box-sizing:inherit;padding:0;margin:0}body{color:#bbb;background-color:#20232c;background-image:linear-gradient(to right,#000,#111,#222,#111,#000);font-family:'julius sans one','source sans pro',helvetica,sans-serif}h1,h2,h3,h4{font-weight:200}h2{font-size:1.6rem;line-height:2rem}h3{font-size:1.3rem;line-height:1.62rem}h4{font-size:1.16rem;line-height:1.45rem}a{color:#6c9;text-decoration:none;-webkit-transition:color 555ms,background-color 555ms,border-color 555ms;transition:color 555ms,background-color 555ms,border-color 555ms}a:hover{color:#fa2}p,li,dt,dd,blockquote{font-size:1rem;line-height:1.45rem}.brk{width:100%;height:2px;margin:2rem auto;clear:both;display:block}.line{background-image:linear-gradient(to right,#333,#666,#333)}#hold{width:90%;max-width:940px;margin:2rem auto;clear:both;display:block;overflow:hidden}#header{padding:0 12px;margin-bottom:3rem}#page_title{color:#fff}#page_title span{color:#aaa;float:right}#content{padding:0 1rem;margin:0 auto;clear:both;display:block}#cHolder{position:relative;width:100%;height:auto;background-color:#000;background-position:center center;background-repeat:no-repeat;margin:1.4rem auto;clear:both;display:block;box-shadow:0 0 1.6rem #000;overflow:hidden}#cHolder canvas{position:absolute;top:0;left:0;width:100%;clear:both;display:inline-block}#action{text-align:center;margin:1rem auto;display:block}.button{min-width:7rem;color:#999;background:#111;font-weight:900;font-size:1.2rem;font-weight:normal;line-height:2rem;text-align:center;text-shadow:1px 1px 2px #000;padding:0 1.4rem;border:1px solid #999;display:inline-block;margin:0 .3rem 0 0;cursor:pointer;transition:all 555ms ease-in}.button:hover{color:#fff;background:#095;border-color:#ccc}#copyright{color:#999;font-size:.8rem;line-height:2rem;text-align:center;display:block}#balls{width:100%;height:2rem;font-size:1rem;text-align:center;line-height:2rem;margin:0 auto;clear:both;display:block;overflow:hidden}.ball{width:44%;margin:0 1rem;display:inline-block}.ball>*{vertical-align:middle}#bb1{text-align:right}#bb2{text-align:left}.bbox{width:1.4rem;height:1.4rem;border:0 solid;border-radius:100%;margin-right:1rem;display:inline-block}#bb1 .bbox{background-color:#a57125}#bb2 .bbox{background-color:#34812a}.spacer{width:100%;height:1.4rem;display:block}input[type=range].inputangle{-webkit-appearance:none;width:92%;max-width:500px;margin:10.8px 0}input[type=range].inputangle:focus{outline:0}input[type=range].inputangle::-webkit-slider-runnable-track{width:92%;max-width:500px;height:8.4px;cursor:pointer;box-shadow:1px 1px 1px #000,0px 0 1px #0d0d0d;background:#636363;border-radius:1.3px;border:.2px solid #010101}input[type=range].inputangle::-webkit-slider-thumb{box-shadow:1.3px 1.3px 3px rgba(0,0,0,0.5),0px 0 3px rgba(43,43,43,0.5);border:1px solid #000;height:30px;width:30px;border-radius:100%;background:#9b9b9b;cursor:pointer;-webkit-appearance:none;margin-top:-11px}input[type=range].inputangle:focus::-webkit-slider-runnable-track{background:#707070}input[type=range].inputangle::-moz-range-track{width:92%;max-width:500px;height:8.4px;cursor:pointer;box-shadow:1px 1px 1px #000,0px 0 1px #0d0d0d;background:#636363;border-radius:1.3px;border:.2px solid #010101}input[type=range].inputangle::-moz-range-thumb{box-shadow:1.3px 1.3px 2.8px rgba(0,0,0,0.5),0px 0 1.3px rgba(13,13,13,0.5);border:1px solid #ccc;height:30px;width:30px;border-radius:100%;background:#9b9b9b;cursor:pointer}input[type=range].inputangle::-ms-track{width:92%;max-width:500px;height:8.4px;cursor:pointer;background:transparent;border-color:transparent;color:transparent}input[type=range].inputangle::-ms-fill-lower{background:#565656;border:.2px solid #010101;border-radius:2.6px;box-shadow:1px 1px 1px #000,0px 0 1px #0d0d0d}input[type=range].inputangle::-ms-fill-upper{background:#636363;border:.2px solid #010101;border-radius:2.6px;box-shadow:1px 1px 1px #000,0px 0 1px #0d0d0d}input[type=range].inputangle::-ms-thumb{box-shadow:1.3px 1.3px 2.8px rgba(0,0,0,0.5),0px 0 1.3px rgba(13,13,13,0.5);border:1px solid #000;height:30px;width:30px;border-radius:100%;background:#9b9b9b;cursor:pointer;height:8.4px}input[type=range].inputangle:focus::-ms-fill-lower{background:#636363}input[type=range].inputangle:focus::-ms-fill-upper{background:#707070}label>*{vertical-align:middle;font-size:1.3rem}#angleoutput{width:4rem;display:inline-block}.ibox{max-width:16rem;height:auto;color:#999;text-align:right;margin:0 auto;clear:both;display:block}.obox{min-width:4rem;font-weight:bold;text-align:left;display:inline-block}#hide{position:absolute;top:-9999px;left:-9999px;width:1px;height:1px;overflow:hidden;z-index:-9999;}#info strong{font-family:monospace,monospace}
--></style>
<script>
var MrM2=(function(x,f){var q="MrM2",v=+(f.innerHeight/f.innerWidth).toFixed(5),i=Math.PI*2,b=function(y){return(y*Math.PI)/180},o=null,m=null,l=null,d=null,a=null,g=function g(z){var y,A=z.slice(0,1);g.c=(g.c||Object.create(null));if(typeof g.c[z]==="undefined"){switch(A){case"#":g.c[z]=x.getElementById(z.slice(1));break;case".":g.c[z]=x.getElementsByClassName(z.slice(1));break;default:y=[].slice.call(x.querySelectorAll(z));return y.length!==0?y:false}}return A==="#"?g.c[z]:[].slice.call($c[z])},k=(function(y){return f.requestAnimationFrame||f.webkitRequestAnimationFrame||function(z){f.setTimeout(z,1000/60)}}()),p=function p(){var z=x.createElement("canvas"),y=z.getContext("2d"),A={w:Math.round(o.x*0.08),h:Math.round(o.y*0.02)},C={w:Math.round(o.x*0.012),h:o.h+4},B=-(A.h/2);z.width=o.w;z.height=o.h;y.fillStyle="#333";y.strokeStyle="#000";y.lineWidth=2;for(;B<=o.h;B+=A.h*1.75){y.beginPath();y.fillRect(o.x-A.w/2,B,A.w,A.h)}y.beginPath();y.fillRect(o.x-A.w/2+4,-2,C.w,C.h);y.beginPath();y.strokeRect(o.x-A.w/2+4,-2,C.w,C.h);y.beginPath();y.fillRect(o.x+A.w/2-4-C.w,-2,C.w,C.h);y.beginPath();y.strokeRect(o.x+A.w/2-4-C.w,-2,C.w,C.h);g("#cHolder").style.backgroundImage="url("+z.toDataURL()+")";z=null},r=function r(){g("#scrollPoint").scrollIntoView({behavior:"smooth",block:"start"})};function j(A,y,z){this.cnv=g(A);this.ctx=this.cnv.getContext("2d");this.w=y||this.cnv.parentNode.clientWidth-24;this.h=z||Math.round(this.w*v);this.x=0;this.y=0;return this}j.prototype.set=function(z,y){this.cnv.width=this.w;this.cnv.height=this.h;this.cnv.style.width=z?z+"px":this.w+"px";this.cnv.style.height=y?y+"px":this.h+"px";this.x=this.w/2;this.y=this.h/2;return this};j.prototype.bg=function(y){this.ctx.beginPath();this.ctx.fillStyle=(y||"#000");this.ctx.fillRect(0,0,this.w,this.h)};j.prototype.clr=function(){this.ctx.clearRect(0,0,this.w,this.h)};j.prototype.drawIMG=function(B,z,D,A,C){this.clr();this.ctx.drawImage(B,z,D,A,C)};function s(y){this.x=0;this.y=0;this.d=0;this.ping={x:0,y:0,r:0};this.cols=y;this.ctx=o.ctx}s.prototype.drawEmitter=function(){this.ctx.fillStyle=this.cols.a;this.ctx.beginPath();this.ctx.arc(this.x,this.y,15,0,i);this.ctx.fill()};s.prototype.drawPing=function(){this.ctx.fillStyle=this.cols.a;this.ctx.strokeStyle=this.cols.b;this.ctx.beginPath();this.ctx.arc(this.ping.x,this.ping.y,this.ping.r,0,i);this.ctx.stroke();this.ctx.beginPath();this.ctx.arc(this.ping.x,this.ping.y,3,0,i);this.ctx.fill()};function t(){this.h=Math.round(o.y*0.88);this.w=Math.round(o.x*0.1);this.x=o.x-this.w/2;this.y=o.h-this.h-20;this.s=o.h*0.0012;this.p=o.h*0.002;this.clock=new s({a:"#B87721",b:"#E29A15"});this.reflect=new s({a:"#3C8D26",b:"#96E31C"});this.clock.x=o.x;this.clock.y=this.y+this.h/2;this.clock.ping.x=this.clock.x;this.clock.ping.y=this.clock.y;this.reflect.x=o.x;this.reflect.y=this.y;this.R=this.reflect.y-this.clock.y;this.ctx=o.ctx;this.tH=this.h/7;this.gap=this.h*0.03;this.now=null;this.running=false;this.pinger="clock";this.spot={};this.time={}}t.prototype.c2rDist=function(){var z=this.clock.ping.x-this.reflect.x,y=(this.clock.ping.y>this.reflect.y)?(this.reflect.y-this.clock.ping.y):(this.clock.ping.y-this.reflect.y);return +(Math.sqrt((z*z)+(y*y))).toFixed(2)};t.prototype.r2cDist=function(){var z=this.clock.x-this.reflect.ping.x,y=(this.reflect.ping.y>this.clock.y)?(this.clock.y-this.reflect.ping.y):(this.reflect.ping.y-this.clock.y);return +(Math.sqrt((z*z)+(y*y))).toFixed(2)};t.prototype.seconds=function(){var y=new Date().getTime()-this.now;return(y/1000).toFixed(2)};t.prototype.drawSpot=function(){this.clock.ctx.fillStyle=this.clock.cols.a;this.clock.ctx.beginPath();this.clock.ctx.arc(this.spot.x,this.spot.y,3,0,i);this.clock.ctx.fill()};t.prototype.drawCars=function(){o.clr();this.ctx.fillStyle="#444";for(var y=this.y;y<(this.y+this.h-this.gap);y+=this.tH){this.ctx.beginPath();this.ctx.fillRect(this.x,y+(this.gap/2),this.w,this.tH-this.gap)}this.clock.drawEmitter();this.reflect.drawEmitter()};t.prototype.updatePos=function(){if(this.clock.y>20&&this.reflect.y>20){this.y-=this.s;this.clock.y-=this.s;this.reflect.y-=this.s;o.clr();this.drawCars();if(this.pinger==="clock"){this.clock.ping.r+=this.p;this.clock.d=this.c2rDist();if(this.clock.ping.r<this.clock.d){this.clock.drawPing()}else{this.reflect.ping.x=this.reflect.x;this.reflect.ping.y=this.reflect.y;this.time.ping=this.seconds();this.pinger="reflect"}}if(this.pinger==="reflect"){this.reflect.ping.r+=this.p;this.reflect.d=this.r2cDist();if(this.reflect.ping.r<this.reflect.d){this.clock.drawPing();this.reflect.drawPing()}else{this.spot={x:this.clock.x,y:this.clock.y};this.time.boing=this.seconds();this.pinger="complete"}}if(this.pinger==="complete"){this.clock.drawPing();this.reflect.drawPing();this.drawSpot()}}else{this.running=false}};t.prototype.angle=function(y){this.reflect.x=this.clock.x+Math.cos(b(y-90))*this.R;this.reflect.y=this.clock.y-Math.sin(b(y-90))*this.R;this.setPingPoints();this.drawCars()};t.prototype.setPingPoints=function(){this.clock.ping.x=this.clock.x;this.clock.ping.y=this.clock.y;this.reflect.ping.x=this.reflect.x;this.reflect.ping.y=this.reflect.y};var c=function c(){var B=m.ctx,C=m.x/32,F=m.y/32,A=0,E=0,z=m.x,G=m.y;function D(){if(A<m.w){m.drawIMG(l.cnv,z-(A/2),G-(E/2),A,E);A+=C;E+=F;a=k(D)}else{m.drawIMG(l.cnv,0,0,m.w,m.h)}}setTimeout(D,1000)},w=function w(){var J=l.ctx,D=Math.round(o.h*0.02),C=d.clock.ping.x,G=d.clock.ping.y,B=d.reflect.ping.x,F=d.reflect.ping.y,z=d.spot.x,E=d.spot.y,A=+(d.clock.d).toFixed(2),y=+(d.reflect.d).toFixed(2),K=(A+y).toFixed(2),I=d.time.ping,H=d.time.boing;l.bg("rgba(0,0,0,0.4)");J.strokeStyle="#999";J.fillStyle="#ccc";J.lineWidth=2;J.font=D+"px monospace";J.textBaseline="middle";J.beginPath();J.moveTo(C,G);J.lineTo(B,F);J.lineTo(z,E);J.stroke();[[C,G],[B,F],[z,E]].forEach(function(L){J.beginPath();J.arc(L[0],L[1],3,0,i);J.fill()});J.textAlign="left";J.fillText("T: 0:00",C+25,G);J.textAlign="right";J.fillText("T: "+I,B-25,F);J.fillText("d: "+A,B-25,F+D);J.textAlign="left";J.fillText(" T: "+(H-I).toFixed(2),z+25,E);J.fillText(" d: "+y,z+25,E+D);J.fillText(" ",z+25,E+(D*2));J.fillText("Tt: "+H,z+25,E+(D*3));J.fillText("dt: "+K,z+25,E+(D*4));c()},h=function h(z){var y=parseInt(z.target.value,10);if(!d.running){d.angle(y);g("#angleoutput").textContent=y}},u=function u(){if(d.running){d.updatePos();a=k(u)}else{w()}},e=function e(y){d.now=new Date().getTime();d.running=true;r();u()},n=function n(A){var y,z;if(o===null){y=g("#cHolder").clientWidth;z=f.innerHeight-30;o=new j("#c1",y,z).set();m=new j("#c2",y,z).set();l=new j("#c3",y,z).set();g("#cHolder").style.width=o.cnv.style.width;g("#cHolder").style.height=o.cnv.style.height;g("#reload").addEventListener("click",n,false);g("#begin").addEventListener("click",e,false);g("#inputangle").addEventListener("input",h,false);x.removeEventListener("DOMContentLoaded",n,false)}o.clr();m.clr();l.clr();p();g("#inputangle").value=0;g("#angleoutput").textContent=0;g("#begin").textContent="Start";d=new t();d.drawCars()};x.addEventListener("DOMContentLoaded",n,false)}(document,window));
</script>
</head>
<body>
<div id="hold">
<div id="header">
<h1 id="page_title">Brian Peacock <span>Ping2</span></h1>
</div>
<div class="brk line"></div>
<span id="scrollPoint"></span>
<div id="content">
<div id="cHolder">
<canvas id="c1"></canvas>
<canvas id="c2"></canvas>
</div>
<div class="brk line"></div>
<div id="action">
<div id="info">
<strong>T</strong> = time (secs) <strong>d</strong> = distance (pix)<br />
<strong>dt</strong> = distance total <strong>Tt</strong> = time total
</div>
<div class="spacer"></div>
<div id="balls">
<div id="bb1" class="ball">
<span class="bbox"></span>
Clock
</div>
<div id="bb2" class="ball">
<span class="bbox"></span>
Reflector
</div>
</div>
<div class="spacer"></div>
<div id="slider">
<div id="angle">
<label for="inputangle">Angle:
<input type="range" id="inputangle" class="inputangle" min="0" max="180" step="1" value="0" /> <span id="angleoutput">0</span>
</label>
</div>
</div>
<div class="spacer"></div>
<div class="spacer"></div>
<div id="buttons">
<div id="begin" class="button">Start</div>
<div id="reload" class="button">Reload</div>
</div>
</div>
</div><!-- END #content -->
<div class="brk line"></div>
<div id="copyright">Mr Brian Peacock © 2017</div>
</div><!-- // END hold -->
<div id="hide">
<canvas id="c3"></canvas>
</div>
</body>
</html>
That's such a cool animation, B.Brian Peacock wrote:Here you go MrM. Revised model.
Been trying to get my head around exactly what happens to sound waves in moving objects (and I guess stationary objects in a wind?). I suspect you would hear the Doppler effect if a couple of conditions where met. Let's say instead of a car you are on an open train bed that is travelling down the tracks at some speed. In the centre of the train bed is a horn mechanism that is sounding continuously. If you are at the front of the train bed and then move to the back of the train bed, I imagine you would hear the Doppler effect. Likewise you would hear the Doppler effect in your car example if it was possible to stand on planks that extended out of the front and back of the car. But you'd only notice it if you walked from one plank to the other.Scott1328 wrote:It seems to me this question comes down to: why don't I hear a Doppler effect from the radio or other passengers in the car when we are moving down the highway at 90 kph but a pedestrian certainly does hear a Doppler effect from those same sources?
You're talking about time as measured by the clocks that you are familiar with, that's all.pErvin wrote:Time dilation has nothing to do with clock type. I explained this already. Time dilation occurs between relatively moving inertial frames. At non-relativistic speeds the sound clock reads slower simply because of the greater distance the sound has to travel on a moving train.
Users browsing this forum: No registered users and 9 guests