Thursday, February 01, 2018

Weeping willows

Earlier, I mentioned my visualizations the "Weeping Willow" that depicts the hailstone function but I didn't explain it — I'll try to give a quick description now.
In the picture, all of the red numbers are even and are above their halves. The odd black odd numbers are above numbers that are one more than triple their value (if the number is x then they are above 3x + 1). All number sequences starting with a red number can be traced down to 1. For example, if you start at the red number 212 (located directly above the 1) you can trace the sequence: 212 106 53 160 80 40 20 10 5 16 8 4 2 1. Notice how the numbers half until they reach an odd number (53 and 5) when they become one more than their triple. This behaviour sums up the tree aspect of the "willow". The weeping aspect comes from green numbers. Each of the green numbers are multiples of 3 and 2; these numbers are below their halves. So number sequences starting with green numbers can be trace up until they hit black numbers at which point they turn downward and also end up at the number 1. For example, if you start at the green number 288 (located along the left side of the tree) you can trace the sequence: 288 144 72 36 18 9 28 14 7 22 11 34 17 52 26 13 40 20 10 5 16 8 4 2 1. After 9 in the sequence, the sequence of numbers descend in the tree eventually reaching the base of one. The ascending green part forms linear structures which is very unlike the branching structure of the rest of the tree.
Every sequence of numbers in the visualization is rigidly defined by iterating the hailstone function which is simply defined by f(x) = x/2 if it is even or 3x + 1 if it is odd. The question that many people ask is, does every sequence end in 1? In terms of this tree, is every number in this tree? It certainly is an interesting question to which I refer you to the link above.
I can't answer many questions about the sequences but I perhaps this visualization can shed some light on the problem. The picture comes from a Javascript tool that uses html's DOM with some added branch-lines provided by a dynamic SVG background. The program can generate any subtree of defined by its base number and a other parameters: start number, maximum number, and tree depth. The one below has 19 as its base (19,20000,200). It also has supplementary map at the bottom that helps show the numbers that are not in the tree: numbers like 27 which have has a particularly long sequence ending in 1 (27 .82 41 .124 62 31 94 47 .142 71 .214 107 .322 161 .484 242 121 364 182 91 274 137 412 206 103 310 155 466 233 .700 350 175 526 263 .790 395 .1186 593 .1780 890 445 1336 668 334 167 502 251 754 377 1132 566 283 850 425 1276 638 319 958 479 1438 719 .2158 1079 .3238 1619 .4858 2429 .7288 3644 1822 911 2734 1367 4102 2051 6154 3077 .9232 4616 2308 1154 577 1732 866 433 1300 650 325 976 488 244 122 61 184 92 46 23 70 35 106 53 160 80 40 20 10 5 16 8 4 2 1 — the "." here shows that the number is maximum value of the sequence so far). Try out the program. Hopefully, my program isn't to buggy to play with.

Monday, January 29, 2018

Back to Business

That's small bee business. I'm aiming to create more regular posts. Partly, I was fighting with the Blogger platform; a battle I have been waging since I started using SVG files. The issue is that I can't upload SVG images. After a few forays of cutting and pasting the code into the html, I found it awkward and cumbersome. I should mention that there are plenty of solutions but I was looking for options that I could share with my students that would be free so that they could also do it on their own. I feel that it's important to show students free tools so that when they leave university they can still do things regardless of their situation. I would hate for my students to only be able to do things without expensive tools or services — for instance, if all they work on is CS7 or laser cutters, they start to think through these tools and will be crippled without access. Also, I'm pretty frugal.
To help remind me later of my contortions, I'll jot down a few highlights. My first solution: I figured out a way to link google drive files to the page. Essentially, google allowed you to serve up drive files as web pages to the world. This was worked well until google decided to change their policy on google drive. Before their policy change, I had served up a lot of my class examples through drive files — I prefer to also keep my class examples accessible so that after a class ends, they still retain access to the examples that help them later. My class wiki's (wikispacescoderesources is one of my public ones which isn't closed to a particular class like mmsun) were littered with links to my google drive. After some scrambling I was on to my second solution. I was able to switch to dropbox only to realize after one semester that they too would discontinue their ability to serve up personal files as web resources. For my third solution, I ended up using a freehostia.com site which I purchased the domain jimmorey.com. Unfortunately, the free version has a 250M limit and restricts individual files to 500k. Since most of my examples are code related, I have modest storage needs but some of my files exceed 500k: in particular, Brocolli.svg is a fractal images that is more than 1MB in size. So after attempting to use a gzip-ed version that failed. I was finally found svgomg , which was able to reduce the file size to 493K — luckily under 500K.
I was able to then fix my old entry Embedding my Broccolli — a play on the embed tag that I'm not even using anymore....
As a further complication, Blogger doesn't like that my free site is unsecured. It complains and doesn't work for the summaries or previews but it seems to work otherwise. I may have to migrate again... Who knew that there would be so much maintenance with a blog?

Wednesday, October 18, 2017

My web woes

I really like this small change. I wasn't expecting such a big difference. I was aiming to promote the octagram called the Star of Lakshmi or khatam sulayman, which is two overlapping squares following the recent descending pentagons had two overlapping pentagons. I switched back to emphasizing the square rather than the triangles and ended up with this above pattern. I quite like the details in this pattern. Probably, it doesn't actually benefit that much from the animation. Or perhaps I need to work on a different animation...

...Polyproblems for this blog relate to the shifting sands of the web.  When I was happily posting rasterized images of my tilings, I ran into no big issues.  Blogger stored all my photos (screen captures in png format) transparently in some google place like picasso but didn't bother me about storage and such.  But then I ran across SVG files and became quite drawn to the vector way (also my previous postscript skills were somewhat resurrected--although SVG files aren't nearly as powerful: no variables, loops etc). Anyway, finding a place to dump the files has been an issue I was solving with drive then dropbox and now after the services changed I have ended up resorting to jimmorey.com--essentially free hosting in Germany with space limitations. But I now have to go back and fix this blog...



Friday, August 18, 2017

Back to Vagrancy

Now that I'm out of ZU (my old employment), I'm back to vagrancy. So I'll have a bit more time for my blog.  My first thing will be to redo all the links that use SVG files.  I will probably just host my images on jimmorey.com but I'll do it when I have access to a real computer not my 7" tablet.  We'll have to see if I extend the scope of my blog to include more than just polygons to some visualizations like my "Weeping Willow" figure that depicts the hailstone function.  I particularly like the meaningful drooping branches that happen to be composed of numbers that are multiples of three.  I was probably thinking about using that resource to teach about CSS but it's current form is too complex.  I'm not sure if I can simplify the example into something that would work well with novices.

I guess since I can't fix the images yet, I'm stuck with writing about these less polygon things...  Unless I can easily link it to polygoncraze....  More soon

Saturday, October 10, 2015

Opacity Changes


I really like this small change. I wasn't expecting such a big difference. I was aiming to promote the octagram called the Star of Lakshmi or khatam sulayman, which is two overlapping squares following the recent descending pentagons had two overlapping pentagons. I switched back to emphasizing the square rather than the triangles and ended up with this above pattern. I quite like the details in this pattern. Probably, it doesn't actually benefit that much from the animation. Or perhaps I need to work on a different animation...

Descending Squares


Unlike normal, I was able to deliver the square version of the descending pentagons quickly. There was no math to figure out. although there was one interesting choice that I looked into. The choice was to place the 45 triangles to be touching the previous square rather than the corner square. I guess it's simply a preference about complexity. I like both.

The first version is a simple analogue of the descending pentagons--actually it was the original doodle on my boogie board. I find the boogie board is a great exploratory tool because of it's impermanence. Somehow it helps me focus on process rather than product. The version of the boogie board I have doesn't save any of your work and there is no erase so you are stuck with any mistakes unless you erase the entire drawing. So I am tasked with focusing on the internalizing any thing that I do that I think is important. Perhaps this is a bit of a throw back to all the time I spent with chalk and blackboards. Regardless of the tools, the square doodle is a decorated version of drawing a square then using the midpoints of the square as a new square. The corners of the original square then get decorated with their own squares. The second version of this descending square alters the importance of the decorations by using them as a key functioning part. The decorative triangles determine the scale of another layer--it has to fit in the previous square.

I'll look at variations for the pentagon.

My intuition tells me that the hexagon won't be as interesting but I'll probably check it out anyway. If there is anything of note I'll post it.

Descending Pentagon


 You have to reload this page to see the animation ...perhaps I should put it on a bit of a repeat.  It took a surprising amount of high school math to unravel how to make this.  I guess I could have been content with just eyeballing it but that seems to take all the challenge away plus it makes it more difficult to augment later. Perhaps I should have used a better tool than Excel: maybe Geometer's Sketchpad.  Next time.  Perhaps I'll put up the square version of this pattern when I get the time.  
Essentially, it's a snazzy version of starting with a pentagon and using the sides midpoints to make a slightly smaller pentagon and descending forever (or in this case 12 levels?).  The snazziness is was the time consuming part.  Computing the lighter bands took a bit of effort--more of a stamina thing rather than a difficult thing.

Popular Posts