Archive for the ‘Otaku’ Category

How Far Can You See In The Woods?

Thursday, March 12th, 2015

This is one I’ve been thinking about for a while: how far can you see in a forest?

pine

I’ve always been intrigued by the effect forests have on our vision. Even in forests where trees are far apart that you can’t touch two at a time, you usually can’t see too far. When Bernard and I went up to the Grand Canyon last year, the forests there are very light on underbrush and the trees have a decent distance between them and you still can’t see much further than a few dozen feet. When I was camping in January and I got up early and saw pademelons everywhere, I couldn’t see them beyond a few meters into the woods.

So I’ve been thinking, is there an equation that governs view distance in a forest? Which naturally led me to try and devise one myself.

newmexico

Once you sit down and think about it, you find it’s a bit of an open-ended problem. So I decided to start by thinking about an easier problem, and then expanding from there. So consider this one:

You stand somewhere on one side of a flat field, and your friend stands somewhere on the other side. The field is full of trees. What is the percent chance you can see your friend?

This is not a brain teaser with an easy answer, and the result will depend on many things:
– Where you stand
– Where your friend stands
– The size of the field
– The number of trees
– The size of the tree trunks

Problems with many unknowns can get difficult to solve quickly, so the first step is to eliminate some. The first two (location of you and your friend) can be expressed as the distance between you and them. The last three (field size, tree count and tree size) can be expressed as a ‘wood density’ (ie. the total cross-sectional area of the trees divided by the area of the field).

I speculate the general solution is some function of the distance between you and them, and the wood density. But how does one calculate the result?

Dense-forest2

As I teach my students, always approach a problem from extremes. The two extremes here are easy:
– If the wood density is zero (there are no trees) the chance you can see your friend is 100%
– If the wood density is 100 (the field is chock-a-block with trees) the chance you can see your friend is 0%

So we expect an answer somewhere between 0 and 100%. This may seem trivial, but there are problems in which the percent range can be much tighter and it’s useful to know we have the full 100%.

But what if there is only one tree? Consider these possibilities:

Screen Shot 2015-03-12 at 9.02.17 AM

On the left you (A) can’t see your friend (B) because a tree is smack in the middle. In the middle you can (the tree doesn’t block your view), but on the right you can’t either because the tree just blocks your view. Any general solution must account for all such possibilities (and an infinite amount more).

So how to calculate a percent chance for one tree? There is no way I can surmise to solve this via a general equation solution, so the required tool is computer simulation, specifically Monte Carlo simulation. In essence: generate a very large amount of ‘maps’ (of you, your friend and one tree) and calculate the percent chance from solving each and adding them.

For instance, if the only possible configurations were those shown above, the chance of seeing your friend would be 33.3% (only one in three maps). Of course there are many, many maps though (as many as you want actually), and it would be impossible to solve them all, so a more rigorous method is needed.

forest

Here’s how I would do it – and I welcome any theorists to give their techniques in the comments. This is (at this point), for one tree only:

1) Randomly generate your position (A) on the edge of the field
2) Randomly generate the position of your friend (B)
3) Determine the vector connecting the two of you (AB)
4) Randomly determine the position of the tree
5) Determine if the vector between A and B is blocked by the tree

This last step is trickier than it sounds, and the easiest way to do it (aside from a clever technique I discuss below*) might be to:
5a) Calculate the vector passing through the center of the tree perpendicular to the vector AB (this just requires some vector algebra)
5b) Calculate the intersection of these two vectors (more vector algebra)
5c) Calculate the distance between the point of intersection and the center of the tree (easy)
5d) If this distance is less than the tree radius, line-of-sight is blocked

The simulation would repeat the above steps many (n) times, incrementing a counter (p) by 1 every time you could see your friend. The final result would simply be (p/n)*100%

I imagine with only one tree the percent chance would be very high. But what about many trees?

Screen Shot 2015-03-12 at 9.20.19 AM

That’s only 3 possible examples (from a pool of infinity) of five trees (well, six on the left!). You can see how much more complex the problem seems to become.

Interesting though, the simulation wouldn’t change much. The only difference would be to step 4 above, which would become:
4) Randomly populate the field with trees, saving their positions in an array

And then step 5 would be repeated for every tree. You wouldn’t have to test every single tree against line-of-sight for each AB vector, you could just stop when one blocked the view.

With this modified algorithm, I’d save (into my output file) the following:
1) Position of you (A)
2) Position of friend (B)
3) Size of field
4) # of trees
5) % chance of seeing friend (output of simulation)

Tests would have to be run to find out how many times the simulation needed to be ran. One thing I learned writing my simulation for my PhD was how few runs were actually necessary. My code would have happily ran all day long simulating billions of photos (each of which required hundreds of calculations) but in the end I stopped at only 1000. I found that the variability of the results for photon counts above 1000 was essentially 0, so there was no need to run more. It would be interesting to do the above coding and plot the results vs ‘maps’ ran and see where the plot gets flat. I bet it’s lower than we’d expect.

Once the basic simulation was in place, modifications I would add include:
– Variable tree size. The wood density would decide the total cross-sectional area of trees, and you could rather easily vary the radius per tree and keep track of total area so as not to exceed the desired density
– Foliage. Trees (bushes) could have a ‘transmission ratio’, possibly linked to a secondary radius (to discriminate between trunk and leaves). So line of sight could be half-blocked for instance if you were viewing your friend through leaves (as opposed to blocked by a trunk)
– Variable field size. The field is nothing more than a construct to give some constraint to the problem. It would be trivial to instead solve the following: You and your friend stand in a forest full of trees. What is the percent chance you can see your friend?

I strongly suspect the results would show a strong proportionality between the magnitude of AB, the wood density and the chance of seeing your friend, and it’s likely an equation could be fitted to allow for a general solution.  It’s tempting to suppose the trivial result would simply equal wood density (ie 50% trees = 50% chance), but my gut tells me it isn’t that simple.

denseforest

One interesting consideration is the dimension of the field, and how it may affect results. I have mostly ignored it here, but it may be worth considering. Consider the following examples:

Screen Shot 2015-03-12 at 9.41.13 AM

Each permutation has 6 trees, but the first two have very narrow fields, both of which will lead to very low chances to see your friend (for random A, B positions). It’s true that the ‘wood density’ varies strongly between the first two the one on the right, and I wonder if that will be enough to correlate the results. In other words, can the exact field dimensions actually be ignored?

wood2

So lets return to the general problem, and what has caused me to think about all this: How far can you see in the woods?

It’s a much more interesting problem to imagine, but I think I may save it for another post  🙂

About that clever technique: It occurs to me a completely different way of solving this would be to do it graphically and exploit hardware graphics techniques. For instance, make the trees sprites and draw a vector between A and B and see if there is a collision with a tree. Do this enough times and save the results. The resolution (and I don’t mean computer screen resolution) would be necessarilly less, but maybe this technique – which saves a lot of coding and vector algrebra calculations – could work?

Elektronik Muzik

Sunday, March 8th, 2015

Between Christmas and my birthday, I obtained several unusual musical instruments. Obviously it was time to put my talents to use and create music! Therefore I announce the formation of my band ‘The Ultra Man’, and the release of my first single ‘Journey to Albion’. In this entry you’ll witness the creation of this soon-to-be-chart-topping hit.

The first instrument is the drum machine, otherwise known as the ‘simple buzzer circuit’ made using components in the ‘littlebits’ circuit kit JBF got me for Christmas. This is nothing more than a 9V battery connected to a pulse generator (to vary the speed of the beep) and a buzzer. Not a traditional drum machine perhaps, but The Ultra Man is no traditional band:

The electronic bass is achieved via the Otamatone device. This is about as unusual as instruments get these days, and creates sound via a pressure pad and an adjustable echo-chamber (opening the mouth of the device changes the pitch). Here’s the mysterious Ultra Man playing it:

You can see the song coming together can’t you?

The final piece in the puzzle is the Stylaphone. This gift-from-god is like a chiptune-in-a-box, and (once again) uses electronic wizardry to create astounding sounds from the future. The stylus completes a circuit when touched to the metal keys, and as you can see here the results are nothing less than magical:

So what happens when all three instruments used simultaneously to create a song? Well readers, this happens:

Even if I do say so myself, that’s pretty special 🙂

Exosuit

Sunday, February 8th, 2015

Bernard got me this for Christmas:

IMG_6113.JPG

It’s a ‘designer series’ Lego kit, which means it was designed by a fan and made by Lego after it won an Internet vote. I’d never heard of it, so it was quite a surprise. Look at the design!

IMG_6114.JPG

Lots of small pieces boded well for complexity, and the manual is very professional. Everything about this ‘amateur’ kit suggests the opposite!

That said, the first step of the instructions is the easiest step I’ve ever seen in a kit:

IMG_6119.JPG

Assembly was simple, and the final product looks amazing:

IMG_6199.JPG

It’s detailed and extremely poseable:

IMG_6198.JPG

It’s also (coincidentally?) in approximately 1:144 scale, which means it plays well with most robot kits. Here is Lego spaceman using his Exosuit to fend off a savage attack from Liger Zero:

IMG_6201.JPG

And yes, I do know Liger Zero isn’t 1:144 scale 😉

A great kit. Thanks Santa Brother!

The Gamebook History Post

Sunday, February 1st, 2015

I’ve read a few blog posts about gamebook collecting in recent months, and thought it was time to make my own.

What’s a gamebook? It’s a solo RPG adventure in book form. Tradaitionally gamebooks are distinct from ‘choose your own adventures’ in that they have some sort of system associated with them (usually keeping track of statistics and items, or rolling dice), but strict classification isn’t easy to do and the lines blur here and then with particular books.

While not the very first gamebook, the genre can be traced back to this particular book, which came out way back in 1982:

figfan01o

I was 10 at the time, and bought my first book – the exact version picture above – via the scholastic book club at school. It changed my life!

All of a sudden I didn’t just have to read about fantasy adventures involving orcs and elves and demons and dragons, I could play them as well! I was too young at the time to know that the authors were entrenched in interests I would eventually adopt myself (not the least being Dungeons & Dragons), and merely got swept away by the magic of the book with it’s vivid descriptions of peril, chaos and heroism and the astonishing (to this day) artwork contained within. I must have read through the book dozens and dozens of times, and the joy I experienced was only surpassed by the discovery that there would be more books like it published soon afterward.

I eagerly bought every Fighting Fantasy (as the series was dubbed) book as they were released, initially via the school book club and soon thereafter (once gamebooks had become a phenomenon) in the bookstores. Other series began (Lone Wolf, Way Of The Tiger, Falcon etc.) and I bought them too. I quickly built up a sizeable collection and it became perhaps my biggest hobby. I even wrote two books of my own (sequels to Scorpion Swamp and Forest Of Doom), compiled a bestiary (prior to the publication of Out Of The Pit) and even copied the art to hang it on my wall:

Save0032

The above was taken in 1987, when I was fifteen and still clearly still enjoying my gamebooks. I was quite proud of my collection and it was displayed prominently in my room. I even saved related miscellany, including the adverts in magazines, reviews in newspapers, related magazines (Warlock and Proteus) and even an iron-on patch I was given at a bookstore when I purchased a book once.

Then I ‘grew up’, life moved on (ie. girls were invented) and my gamebook hobby – as it did for many of my generation – took a back seat. By my first college years I still had my gamebooks but rarely purchased any new ones, and when I left Australia in ’93 I left them to my brother. Even then I didn’t consider selling them, because they were still an important (and very happy!) memory of my young adolescent years. I’m not 100% sure what happened to the collection. I know most of the Fighting Fantasy titles would move into AW’s care (where the collection remains to this day), but I don’t know what Bernard ever did with all the others.

Fast forward a few years. I moved to America, got married and a job and became immersed in video games (& video game collecting). But I never forgot about the gamebooks, and the memories were always good ones. When I first returned to Oz in 2000 I brought back two books with me (ironically Scorpion Swamp and Forest of Doom) that I purchased for a song at a used bookstore, and reading them – maybe 10 years since I last had – was just as much fun as it ever was. In those days the gamebook fad had died; no new books were being published (killed as they had been by video games and the passage of time) and even on the internet it was difficult to find much enthusiasm. It seemed they would live on in my memories only.

fod

When next I returned to Australia (in 2006), things had changed quite a bit. A British publisher (Wizard books) had purchased the rights to Fighting Fantasy books and had started republishing a few years prior. I was quite excited by this, and purchased many on that trip. In addition, when in Newcastle on that trip I bought every single gamebook (from any series) I found in used bookstores, including doubles of some. Upon returning to Sydney, I gave AW almost all of them as a gift, keeping only the doubles for myself (and of course the new imprints of FF books). I may not have realized it at that moment, but this was the start of my modern collection.

Within a few months of arriving back in America I had started buying books online, mostly (in those days) via ebay. I started with Fighting Fantasy books, and my goal was initially just the titles I had never read/owned but quickly became to build a full set of all books. This was still several years prior to the gamebook renaissance, and I was able to get books at astonishing prices (such as Night Dragon for only $3!). I remember watching auctions of lots of books – in which I only needed one or two – go buy with only my bid and winning for much less than I was prepared to pay. Those were fun days, and within only a few months I had close to a full collection of the Fighting Fantasy series. Some books remained elusive though, and it would take almost 8 years to complete the collection, by which point I had numerous imprints of many of the books including (almost) the entire US series.

I’d been well-and-truly bitten by the gamebook bug though, and long before finishing my FF collection I started on the other series. I dove in headfirst, and agressively hunted down the books from other major series such as Lone Wolf, Falcon, Skyfall, Grailquest and Golden Dragon. I discovered Demian’s webpage and it became sort of a shopping list for me. I was buying books on ebay and amazon mostly from overseas (Canada, England and Australia), and still trawling the used shops in Australia on my annual visits (I returned with 36 books in January 2011).

My collection continued to grow. By this time many of you knew about it, and I was helped significantly by Adam (who gave me many books, including returning the ones I’d given him in ’06), Bernard (who dug deep and bought me a few missing and expensive titles) and Florence (who astonished me with this graduation gift). It was getting harder and harder to find books I didn’t have, and my ‘recent aquisition’ piles tended to include more and more obscure series:

books2

So we come to today. You can view my entire collection here. I don’t know how many there are – over 300 at last count – and the website I created (to assist me when I am traveling) isn’t even complete (since it doesn’t list duplicates or all FF imprints I own). I’m still actively buying books to fill in the blanks in my collection, and have even started buying the reprints of old series being published by Morris and Thompson. The collection is physically quite large now, long having outgrown the full-sized bookshelf once dedicated to it. I really need to sort it at all and work out how to store it better…

To pre-empt questions from those that may read this:

Q: Do you read them all?

A: Yes – and no. I have played through every FF book and most of the books from other landmark series, but I haven’t yet played all Lone Wolf books, or every book from every series. However there isn’t a series I haven’t played at least one (if not more) books from, including the standalone gamebooks.

Q: What are your favourites?

A: You can’t go wrong with Fighting Fantasy titles, especially the fantasy ones from earlier in the series (pre #30). If someone was only ever going to read one gamebook, I’d always recommend the grand-daddy of them all Warlock Of Firetop Mountain. That said the other series I would recommend are the Blood Sword books (which have a deservedly high reputation), the Virtual Reality (now called Critical IF) books, the (Lovecraftian) Forbidden Gateway series and the recent Destiny Quest series. But to be honest, I love all gamebooks, even the ‘bad’ ones 🙂

Q: What about Choose Your Own Adventures?

A: You can’t spend a decade buying gamebooks online or in used bookstores without eventually picking up some titles that blur the line between gamebook and choose-your-own-adventure. You’ll see on my website I have a few, and there are others I didn’t bother listing. Typically I find the traditional choose-your-own-adventure titles to be too childish for my interests, but some books that use the mechanic (notable Life’s Lottery by Kim Newman) are every bit as entertaining as a ‘real book’.

Q: What’s the most you’ve paid for a book?

A: Not much, maybe $20 at the very most, probably less. As I said above, I bought most of the books that are now very pricey long before people started collecting again in earnest, and got them for a song. I feel sorry for those that want to obtain something like an original Knights Of Doom or Deathmoor today). I know some of the gaps in my collection could easily be filled with a single click on amazon or ebay, but I’m not going to pay big $$$ for a book just to own it (yet).

Q: What are your most-wanted gamebooks that you don’t yet have?

A: In no particular order, these are the five that have eluded me but I haven’t yet given up on:

Trial Of Champions (original US imprint)
Sorcery box set with spellbook (I consider myself owning it ‘in spirit’ since AW has the one I bought years ago)
Blood Sword #5 (prohibitively expensive; may be reissued soon)
– high number Lone Wolf books (again, prohibitively expensive)
Citadel Of Chaos (US Wizard reissue, early 2000s. Jonathan Green mentions it’s existence in You Are The Hero, but does it actually exist?)

But the true Holy Grail would be a foreign imprint book. There’s hundreds of thousands of them out there – Warlock was published in dozens of languages – but I’ve never found one. I’ve particularly like a Japanese version, and have invested some time checking used shops and hobby stores during my many trips to that country (all to no avail). One day this may be mine:

dd

(Incidentally I do own the English language – and some JP imprints – of the Queen’s Blade books, as well as a number of Lost World gamebooks. I should probably add them to the website…)

Well that’s enough for a history. The collection is old and quite complete, but I consider it active and ever-growing. If you’ve got any questions add them in the comments, or via twitter if that’s what got you here.

And may your stamina never fail 😉

 

My Very Own Odo

Saturday, January 24th, 2015

One of the more unexpected items I received for Christmas was this vinyl model kit:

IMG_5998.JPG

Yes it’s everyone’s favourite changeling, ‘Constable’ Odo from Star Trek: Deep Space 9. This kit was made in 1995 and KLS bought it new for under a tenner! Here’s the contents of the box:

IMG_5999.JPG

IMG_6001.JPG

Not a bad likeness is it?

I’ve assembled vinyl kits before, and immediately a problem was apparent. The age of the vinyl had made it hard and brittle, and there was no way I’d be able to cut off the flash without softening it first. So it was time to give Odo a hot bath:

IMG_6003.JPG

A few minutes at a light boil was enough to soften the vinyl enough for the razor blade:

IMG_6005.JPG

And soon the pieces were ready for gluing:

IMG_6009.JPG

IMG_6010.JPG

The second problem became apparent at this point: the kit wasn’t well designed. To be specific, some of the pieces didn’t fit well, and the fact they needed gluing (as opposed to using ball joints) was poor design in the first place! I soldiered on carefully though, and soon got to this point:

IMG_6011.JPG

A bit more glue and some time drying and assembly was complete:

IMG_6012.JPG

What’s that you say? “Where’s his legs?” The fact is the waist joints just didn’t match at all, and even if they had the upper half is so much heavier he wouldn’t ever stand so… I tossed his legs in the bin! I was happy with half an Odo 🙂

But I wasn’t finished yet! I was serious about this kit, and carefully began to paint him…

IMG_6033.JPG

And mere minutes later, my very own Odo was complete:

IMG_6032.JPG

Look at his flaming hair! His jaundiced skin! His inky-black jacket with red piping and silver trim. As one would expect from a design of my very own, Odo looks majestic.

IMG_6039.JPG

Now before some of you get all ‘but that’s not canon’ on me, please be aware that this isn’t supposed to be Odo from the TV episodes.

No my friends, this is Odo from my unpublished DS9 fan fiction script entitled “Elegy of The Vampire Savior”. That’s the one in which Odo teams up with Space Dracula to save the colonists of the fourth moon of Nosferon from being enslaved by a tyrannical computer. This particular outfit is the one Odo wore during the logic battle with the Machine Brain, immediately after his fated lover Udu died in his arms.

If you’d like more details, please let me know.

IMG_6040.JPG

I didn’t ever expect to get my very own Odo for Christmas. And now I wonder how I ever lived without him!