VisPy is quite an interesting tool. They say it is for “scientific visualization”. Here is an example of that. I took a demo from their github page and added a little code to generate a sinewave. The cool thing is that the graph, scaling, panning, zooming, and redrawing all come out of the box.
I previously wrote about installing VisPy. Thanks to the great efforts of some unnamed people, Python on Windows is really working nicely now.
Here is a screenshot:
Here is the code:
We got a nice new prism today and I was able to catch a full spectrum from the setting sun.
π (pi) is the ratio between a circle’s circumference and it’s diameter. You can check this by using a tape measure. Measure around a circle. Then measure across the circle.
π = Around / Across
Did you know there is a way to calculate π? There are a lot of different ways, but one is called the Leibniz formula for π.
Where the original Leibniz formula for π ends up calculating π/4, I’ve just factored this 4 into the infinite series.
π = 4/1 – 4/3 + 4/5 – 4/7 + 4/9 – 4/11 + 4/13 – 4/15 + 4/17 – … (forever)
The more terms you add/subtract to it, the closer it gets to being accurate. A problem with the Leibniz formula for π is that it takes a lot of calculations to get an accurate version of pi.
Here is a mini-program I wrote in Python 3 to repeat this one million times.
pi = 0
for n in range(1000000):
pi += ((-1)**n*4) / (2*n+1)
Here are some of the numbers from that calculation:
…999980 more times…
Here is real PI:
Isn’t it interesting that my version of PI, after a million iterations, is 1 digit off of real Pi, but the digit is in the middle? This has something to do with Euler numbers which you can read about at http://en.wikipedia.org/wiki/Euler_number .
For most practical purposes, 3.14159 is more than enough digits to use with Pi.
Ever wonder if you could use Pie to calculate Pi?
A spider was hanging out by my office door at night. Using the macro setting on my camera along with my Surefire flashlight, I got a close up picture that was pretty neat.
We saw four geese on our property the other day! Maybe we should tell them they are late in flying south :)
Here are a few facts on geese.
- Geese are a type of waterfowl belonging to the group of Anserini.
- Geese mostly eat greens vegetation and grains.
- There are three kinds of true geese gray geese, white geese ,and black geese.
Some Geese do amazing things while they are migrating. There is a species in Asia, Bar-headed Geese (Aner indicus), that migrate over the tallest mountain in the world (can you guess?) in the Himalayan Mountains. The air temperature is as low as -60 Degrees F.
Now that is a “wow”.
- Wikipedia contributors, “Goose,” Wikipedia, The Free Encyclopedia, http://en.wikipedia.org/w/index.php?title=Goose&oldid=633827032 (accessed November 19, 2014).
- “Migrating Geese”, Chipper Woods Bird Observatory, http://www.wbu.com/chipperwoods/photos/geese.htm (accessed November 19, 2014)
Here is a big spider that we found while raking leaves today.
Spiders are air-breathing arthropods. They are found in every continent except Antarctica.
Spiders mostly prey on bugs, but few large species prey on large birds and lizards. Argh, that is scary!
To find out more about spiders click here. http://en.wikipedia.org/wiki/Spider
That’s all for now.