Jump to content

fiveworlds

Senior Members
  • Posts

    1903
  • Joined

  • Last visited

Everything posted by fiveworlds

  1. I have one too. How do I find coordinates for points on the circle dividing a circle into areas representative of their size in %? I know when doing a normal piechart but I want to divide like this.
  2. I thought it was too until I tried numbers taking more than 50% of the pie chart. Didn't know that learned something new. I fixed the error I had with the pie chart. I also added a random color picker, var width = 200; var height = width; var numbers = [200, 10, 20, 60, 12, 10]; var total = numbers.reduce(function(a, b) {return a + b;}); var piechart = ""; var startx = width / 2; var starty = startx; var radius = width / 2 - 10; var deg = total / 360; var half = total / 2; var dx = radius; var dy = 0; var lastangle = 0; var angle = 0; var radseg = 0; var arc = 0; var i = 0; var ax = 0; var ay = 0; var adx = 0; var ady = 0; var nextx = 0; var nexty = 0; var beginning = "<svg width='" + width + "' height='" + height + "'>"; var end = "</svg>"; var color = ""; for (i = 0; i < numbers.length; i += 1) { angle = lastangle + numbers[i] / deg; radseg = angle * (Math.PI / 180); nextx = Math.cos(radseg) * radius; nexty = Math.sin(radseg) * radius; color = '#' + (0x1000000 + (Math.random()) * 0xffffff).toString(16).substr(1,6); if (numbers[i] > half) { arc = 1; } else { arc = 0; } ax = startx + nextx; ay = starty + nexty; adx = startx + dx; ady = starty + dy; piechart += "\n"; piechart += "<path d=\"M" + startx + "," + starty; piechart += " L" + adx + " , " + ady; piechart += " A" + radius + " , " + radius + " 0 " + arc + " , " + " 1 " + ax + " , " + ay; piechart += " z\" "; piechart += " fill=\"" + color + "\" stroke=\"black\" stroke-width=\"2\" "; piechart += " fill-opacity=\"1\" stroke-linejoin=\"round\" />"; dx = nextx; dy = nexty; lastangle = angle; } document.write(beginning + piechart + end); I am going to try for a piechart tag under svg eventually.
  3. Íc am making the point that correct spelling is subjective to where you are. Even here some places expect you to always spell program as programme or potatoe as potato. Making english spelling completely subjective to where you are. I know people who can't spell who have built ships and people who have perfect spelling who would never be able to.
  4. Is it program or programme? cookie or biscuit??? potato or potatoe??
  5. You're confusing the differences between petrol and diesel. Diesel creates more CO2 per gallon than petrol.
  6. I have no doubt you have. However most people do not read journal articles for fun. They read them to get a degree in order to get a job. Or else they have a degree in a certain job which requires them to keep up to date with journal articles. Why would somebody who is not a doctor read a doctor's journal article?? The information is completely useless to anybody else because they are legally not allowed to practice medicine without a license.
  7. That's because people read journals for college homework and when they have finished college people hate reading journals. Most of them even hate college they just go for increased work opportunities. Most jobs require a degree and college isn't free. Let's face it most college lecturers don't even read journals they take students assignments and correct for things like grammar, spelling, punctuation, typography and that you've followed orders like a good little slave and followed their referencing system to the letter.
  8. I'm going to say the conjecture is wrong on the basis that the last three largest prime numbers have an over fifty thousand line gap each with 100 numbers in each therefore there is no way for the largest prime - 1 to be found as the sum of two primes.
  9. That's about my best... Hej ,jag är från irland, och jag har kämpat för att lära sig och tala engelska så flytande som jag talar mitt modersmål , jag önskar bara engelska var så enkelt som irländsk ....
  10. Learning to survive on another planet is imperative to the survival of the human race. There are volcanoes etc on earth which could render the earth completely uninhabitable for hundreds of years. Being able to relocate humanity to Mars would allow more of humanity to survive. Also as has been noted before the nearest habitable planet may take thousands of years to travel to. Modern electronics has an unknown longevity in space. Most buildings on earth have not survived that long with the exception of the pyramids etc.
  11. Ask yourself how many different websites you need to block to stop Microsoft taking data off windows 10. http://www.forbes.com/sites/gordonkelly/2016/02/09/windows-10-data-tracking-spying-levels/#c7165677aa99 Also little known is that Microsoft can force the older versions of their software to update to windows 10. They don't actually have to give you a choice about updating. Let's look at it from the perspective of opening your car. At one time we all used a key. Now we can open our car with a button. The problem is that a hacker can save the open signal and re-transmit it when you are gone opening your car.
  12. My latest way to waste time. Figuring how to make pie charts with javascript and svg. I know google charts gives it to you but they use massive code. Here's my attempt. <head> <style> path{stroke: black; stroke-width: 2;cursor:pointer;stroke-linejoin="round"} path:hover{stroke: black; stroke-width: 2;opacity:0.5;} .red{fill: red;} .green{fill: green;} .blue{fill: blue;} .purple{fill: purple;} .yellow{fill:yellow;} </style> <script> function add(a, b) {return a + b;} var numbers = [30,40,20,50,77]; var colors = ["red","green","blue","purple","yellow"]; var labels = ["red","green","blue","purple","yellow"]; var piechart; var title = "pie chart"; var total = numbers.reduce(add,0); var radius = 135; var startx = 150; var starty = 240; var lastx = radius; var lasty = 0; var seg = 0; var rectx = 420; var recty = 140; var textx = 470; var texty = 156; var collate = "<svg width='800' height='500'>"; var collate1 = ""; var title = "<text x='240' y='50' style='font-size: 36;font-weight: bold;fill: #0099ff;stroke: black;stroke-width: 2'>"+title+"</text></svg>"; for (i = 0; i < numbers.length; i++) { arc = "0"; seg = (numbers[i]/total) * 360+seg; if ((numbers[i]/total) > 180){arc = "1";} radseg = seg * (Math.PI/180); nextx = Math.cos(radseg) * radius; nexty = Math.sin(radseg) * radius; minuslasty = - lasty; nextxminuslasty = - (nextx - lasty); nextxminuslastx = nextx - lastx; nextyminuslasty = - (nexty - lasty); percentage= (numbers[i]/total) * 100; collate = collate + "<path class='"+colors[i]+"' d='M " + startx + "," + starty + " l " + lastx + "," + minuslasty + " a" + radius + "," + radius + " 0 " + arc + ",0 " + nextxminuslastx + ","+ nextyminuslasty + " z' />"; collate1 = collate1 + "<rect x='"+rectx+"' y='"+recty+"' width='30' height='20' class='"+colors[i]+"' /><text x='"+textx+"' y='"+texty+"' >"+labels[i]+" "+percentage+"%</text>"; lastx=nextx; lasty=nexty; texty=texty+40; recty=recty+40; } piechart=collate+" <circle cx='150' cy='240' r='80' stroke='black' stroke-width='3' fill='white' />"+collate1+title; document.write(piechart); </script> </head>
  13. That's not true I have been to the UK you can get stopped at a police checkpoint on the road at any time so they can check tax etc. Alternatively they can ask for your driving license to check if you have penalty points or not. Or if you are standing in one place too long (aka loitering) the PC can ask for your id.
  14. Got the same problem since this morning computer monitor won't start without restarting the computer. Everything else starts fine the speakers/keyboard and mouse. It is probably my graphics card I have had it for 8 years now and it was second hand when I got it.
  15. We still have them any police officer can ask for your passport and or driving license. You may not get stopped at borders much anymore but you should always have some form of id.
  16. Have to agree with you i'm from Ireland and haven't seen the sun today maybe it is on vacation...
  17. It sounds like a made up story. Nobody has ever found "Atlantis" or even ruins of "Atlantis". Nobody has ever found the "Akashic records" either. They make for a nice story but other than that there isn't really any evidence supporting their existence.
  18. i would imagine they are generating the values via brute force though so they are not going to make the graph 100% accurate
  19. According to wolfram alpha it looks like this.
  20. Right so I double checked my math and I forgot a number. It is working out at 4269 years per light year. [latex]\frac{Speed\; of \: light \: in\: seconds \; *\; Seconds\: in\: an\: hour \;*\; Seconds\: in\: a\: minute\; * \; hours\: in\: a\: day\; *\; 365}{speed\: of\: spacecraft\: in\: km\: per\: hour\;*\;24\;*\;365\;*\;1000}[/latex]
  21. Using the unmanned spacecraft speed record. 393927289812 6067008 64929.4 177.89 711.55 years for 4 light years. I think we should first figure how fast we can actually go. I know there have been predictions that if we go too fast we will die etc but so far that hasn't happened.
  22. That was 2012. This is 2015.
  23. I don't know. I don't think it is possible. You can however solve it by brute force given x and testing loads of numbers.
  24. y = x7+x5 x = y7+y5 Then you can isolate y on the left hand side if you want.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.