space page 5 - Dave's Blog

Search
My timeline on Mastodon

Generating N-D Tetris Pieces

2008 Jun 1, 7:27

When I woke up this morning for some reason I was thinking about Polytope Tetris, my N-D Tetris game, and specifically generating Tetris pieces in various number of dimensions. When I first wrote PTT I thought that as the number of dimensions increased you could end up with an infinite number of non-equivalent crazy Tetris pieces. However this morning I realized that because you only get four blocks per piece there are only a possible three joints in a single Tetris piece which means that you only need three dimensions to represent all possible distinct N-D Tetris pieces.

Below is the table of the various possible pieces per number of dimensions and sorted by the number of joints in the piece. Notice that the 'J' and 'L' become equivalent in 3D because you can rotate the 'J' through the third dimension to make it an 'L'. The same happens for 'S' and 'Z' in 3D, and 'S+' and 'Z+' in 4D.

Joints Name 1D 2D 3D +
1 I I I I I
2 J J J J
L L
3 O O O O
T T T T
S S S S
Z Z
T+ T+ T+
S+ S+ S+
Z+ Z+
Total 1 7 8 7

As a consequence of not realizing there's a finite and small number of N-D Tetris pieces, I wrote code that would randomly generate pieces for a specified number of dimensions by wandering through Tetris space. This consists of first marking the current spot, then randomly picking a direction (a dimension and either forward or backward), going in that direction until hitting a previously unvisited spot and repeating until four spots are marked, forming a Tetris piece. However this morning I realized that continuing in the same direction until reaching am unvisited spot means I can't generate the 'T+' piece. I think the better way to go is keep the list of all possible pieces, pick one randomly, and rotate it randomly through the available dimensions. Doing this will also allow me to give distinct pieces their own specific color (like the classic Tetris games do) rather than picking the color randomly like I do now.

PermalinkCommentspolytope tetris tetris

Saul and Ciera's Wedding

2008 Apr 26, 11:45

Saul IncredulousLast weekend while Sarah was up in Canada for a spa weekend with her sister and her sister's other bridesmaids, I went to Saul and Ciera's wedding in Three Rivers, California near Sequoia National Park. I flew into Fresno picked up a rental car and my GPS device navigated me to a restaurant with the wedding location no where in sight. "No problem," I thought, "I'll just call someone with an Internet connection and..." I had no cell reception. What did people do before GPS, Internet, and cell phones?

Saul and Ciera's Wedding CakeA waitress in the restaurant pointed me down the road a bit to the wedding location which was outside overlooking a river. Their wedding cake was made up like a mountain with two backpacks at the top and rope hanging down. Ciera's father married them and the ceremony was lovely. The music after included Code Monkey to which all the nerds were forced to get up and awkwardly dance.

Vlad plays with KatieBesides getting to see Ciera and Saul who I hadn't seen in quite a while, I got to see Daniil and Val, Vlad, and Nathaniel. Since last I saw Daniil and Val they had a child, Katie who is very cute and in whom I can see a lot of family resemblance. The always hilarious Vlad, Daniil's brother, was there as well with his wife who I got to meet. Nathaniel, my manager from Vizolutions was there and I don't know if I've seen him since I moved to Washington. It was fun to see him and meet his girlfriend who was kind enough to donate her extra male to male mini-phono cord so I could listen to my Zune in the rental car stereo on the drive back.

PermalinkCommentswedding saul and ciera california nontechnical

Katie's space

2008 Apr 21, 4:52Daniil and Val's child's new blog. At 6 months old she's already had two blogs.|Katie MagdalinPermalinkCommentsblog baby friend daniil-magdalin katie-magdalin

Kevin@Work: Consolas: the Coder's Font

2008 Apr 15, 2:51How to use Consolas in cmd.exe among other places: "Consolas is one of a set of new ClearType fonts that shipped as part of Windows Vista and Office 2007... I love to code in it... In this post, I'll go through all the places I use monospaced fonts."PermalinkCommentsfont windows howto consolas code vista cmd

Dinner with Goodwins at Icon Grill

2008 Mar 27, 9:33

The Goodwin family, except for Michelle who is taking a class trip to Washington DC and New York, was in Seattle this week. Sarah and I met up with them for dinner last night at the Icon Grill. I enjoy the Icon Grill in general and last night was no exception especially having dinner with the Goodwins which was a lot of fun. It was particularly cold and at one point snowed. The Goodwin's are seeing all the classic tourist attractions in Seattle some of which are depicted in the following 1962 Seattle's Worlds Fair postcard. The postcard is featured on Paleo-Future and unsurprisingly the 1962 Worlds Fair favored Seattle's Space Needle and monorail.

[Icon Grill front. Licensed under under Creative Commons. By Troy B Thompson][Seattle's Worlds Fair Postcard]

PermalinkCommentsicon grill life washington goodwins sarah seattle nontechnical

Retro Sabotage: Highwaymen On Memory Lane - Flash Games [ver.9.0 req.]

2008 Mar 23, 3:26Flash versions of retro games with humorous differences.PermalinkCommentsgame humor retro games flash web internet pacman space-invaders tetris via:boingboing

Juanita Beach Visit and Map

2008 Mar 7, 3:26

Don't Feed the Ducks SignTwo weekends ago it was actually sunny and kind of warm so Sarah and I went down to Spud Fish and Chips and Juanita Beach Park. We ate fish and chips on the dock. I took a few pictures and this time actually put some geographical information on Flickr so now I've got a map of my tiny fish and chips journey. On the map click on the floating marks to view the associated photos.

Flickr provides access to the geo data associated with your photos via GeoRSS feeds. And Google Maps displays GeoRSS feed content on their maps allowing you even to edit the data but doesn't appear to let you easily export the GeoRSS. Live Maps does the inverse, allowing you to create and export GeoRSS data but not import it. I'd like both please. Oh well.

PermalinkCommentsmap photo personal fish-and-chips juanita-beach

4.12: Mother Earth Mother Board

2008 Feb 15, 4:29FTA: "The hacker tourist ventures forth across the wide and wondrous meatspace of three continents, chronicling the laying of the longest wire on Earth."PermalinkCommentsvia:swannman neal-stephenson

Desert Space Foundation - Universal Warning Sign Exhibition

2008 Feb 2, 5:51FTA: "The purpose of the warning sign is to deter intentional or inadvertent human intrusion or interference at the site and to effectively communicate over the course of the next 10,000 years (the projected duration of the volatility of the waste) that tPermalinkCommentsart sign warning radioactive-waste nuclear-waste

Ben Folds Myspace Gig playlist on YouTube

2008 Jan 29, 5:10Ben Folds performs his myspace gig, webcast live from his studio in Nashville, Tennessee on October 24th 2006. The performance has been split into various videos gathered here. I hadn't heard "Bitches Ain't Shit" like that before (last video).PermalinkCommentsben-folds ben-folds-five bff music video myspace youtube performance live

Howto: iPhone Webclip icons

2008 Jan 16, 2:53These are as bad as favicons! Boo on URI space squatting.PermalinkCommentshowto apple iphone icon favicon webdesign web ipod development via:swannman

Vegas and New Year

2008 Jan 2, 8:57

Normal Sized Slot MachineTwo and half weeks ago Sarah and I went to Las Vegas where I got to see Jesse, Pat, Chris, and (briefly because he's some kind of big shot too busy for his friends now etc) Grib from college. They're mostly in San Jose and I hadn't seen them for a while so it was a lot of fun to hang out. We all stayed at the MGM which is a nice hotel with some good restaurants. In other Vegas related links, Sarah added Sarah's Las Vegas restaurant reviews to her reviews and Jesse has Jesse's Vegas photos up too.

Vegas DinnerSarah and I saw the Blue Man Group (video from a concert) and the Price is Right Live Show. The Blue Man Group was very cool although the music was all rock with a heavy drum focus (not depicted in the videos I linked) which I got a little tired of. But despite that I really enjoyed the show, very funny and I totally recommend it. The Price is Right Live Show is like the regular show on TV except the recording is not televised and its not hosted by Bob Barker or Drew Carey. So folks from the audience are still called up to play the same games and really win prizes. It was advertised as hosted by Todd Newton, B-list game show host, but was instead hosted by JD Roberto who hosted such things as "Reality Remix" and the show "Are You Hot? The Search for America's Sexiest People". The showcase showdown included the 2008 version of my car and thankfully I wasn't picked to compete for that because, well I don't know where they bought the car, but I would have gotten the price very wrong. We sat right next to the stage for that show and had a good time.

MGM Grand in Las VegasFor New Years Eve Sarah and I stayed in and watched the glitched Seattle Space Needle fireworks show from a safe distance. On New Years we went to a pot-luck at Todd's house and had a fun time. Todd's place is on the top of a hill and has a lovely view of Washington's snow-capped mountains.

PermalinkCommentsnewyear vegas lasvegas personal bluemangroup

Angie and Kane Went Away

2007 Nov 19, 12:35Angie and Kane Go Away PartyTwo weekends ago I went down to California for Angie and Kane's going away party. It was fun despite going to a country western club. It was a very large place with plenty of space for line dancing, a dentist chair turned into a make-margaritas-in-your-mouth chair, and of course a mechanical bull. Surprisingly, I did not fit in.

Jon's Go Away PartyThis past weekend Sarah and I went to the EMP and SciFi Museum. The last time I was there was for the Star Trek convention (I'm cool) and Sarah hadn't been before. We also ate in the attached diner which was acceptable.PermalinkCommentsemp seattle nontechnical

Bunny Yawns

2007 Nov 13, 8:47
Cadbury yawns.
From: David Risney
Views: 1165
5 ratings
Time: 00:10 More in Pets & Animals
PermalinkCommentsvideo

Bunny Hears Something

2007 Nov 13, 8:45
Cadbury hears something, slowly.
From: David Risney
Views: 94
1 ratings
Time: 00:15 More in Pets & Animals
PermalinkCommentsvideo

Why I Feel Old

2007 Oct 12, 3:20And now to fit in better with the rest of the emo kids on LJ, in no particular order here are some reasons why I feel old: PermalinkCommentspersonal nontechnical

The Evolution of a specification -- Commentary on Web architecture

2007 Oct 3, 10:21Tim Berners-Lee writes about principles for new technology in the context of the evolution of HTML and the development of namespaces and XML.PermalinkCommentsarchitecture article tim-berners-lee w3c internet history evolution html namespace xml web mmm multimedia-mesh humor test-of-independent-invention

Namespaces in XML 1.0 (Second Edition)

2007 Sep 11, 1:46The XML spec. Info on setting the default namespace including how to remove a default namespace once its been set.PermalinkCommentsspecification reference w3c xml namespace

Palak And Meghal's Wedding

2007 Sep 1, 4:32
The child in front of me kept staring at me.
From: David Risney
Views: 59
0 ratings
Time: 00:07 More in People & Blogs
PermalinkCommentsvideo

Bunny Sniff and Shake

2007 Aug 13, 3:35
I've been told that family members after reading my webpage which contains some technical related material would turn to my cousins webpage. So, in an effort to not drive away readers I've...
From: David Risney
Views: 328
3 ratings
Time: 00:08 More in Pets & Animals
PermalinkCommentsvideo
Older EntriesNewer Entries Creative Commons License Some rights reserved.