Wednesday, July 20, 2011

Rubik's Cube


A long time ago, I took several online tutorials on how to solve the Rubik's cube and mashed them into my favorite, fairly easy-to-remember solution. Here it is:


  1. Complete the top row as white with all sides matching the center cubies. The simplest way to explain the moves to complete the first layer is: Look at the cubie you’re trying to move and swing that face so it puts the cubie in to position. Now swing the perpendicular row to the one you just swung out of the way to save that cubie in its new position. Now move the first row you swung back to its original position, and then swing the row with the correct cubie back to its original position. Once you’ve completed each side, you should have a short T shape on all sides where the top row and the center cubie for each side are correct.

  2. Complete the 2nd row as follows:

    1. If you need to replace a cubie on a face where the incorrect cubie is in the FRC position and the correct cube is in the FDC position, make sure the F face of the correct cubie matches the color of the FC cubie, then perform the following:

      1. D’ R’ D R F’ R F R’

    2. If incorrect cubie is in the FLC position, perform the following:

      1. D L D' L' F L' F' L

    3. If the F face of the correct cubie does not match the center cubie, find the face where the center cubie is the color of the F face of the correct cubie, then make that face of the cube the F face and rotate the B layer to make the correct cubie face F, then follow step 2a or 2b.

      1. Example: You have the green face as F and you need to replace the FLC cubie with the O/G cubie that's in the bottom layer, but the color on the O/G cubie that's facing you is orange instead of green. Rotate the cube so that the orange face is F, then rotate the bottom layer so the O/G cubie is on the F face, then do 2a or 2b.

    4. If you end up with a cubie that's in the 2nd row, but in the wrong position, rotate the B face so that a cubie containing yellow and 1 other color is in the FBC position and use either 2a or 2b, depending on where the cubie you want to move lies on that face. This will put the cubie you wanted to move in the bottom row so you can use it for 2a or 2b.

  3. To create a cross on the bottom layer, flip the cube so the white face is now D and the yellow face is now U. This will be the case for all future algorithms. You will now have one of the following two states showing on the yellow side of the cube:

    1. The center cubie is the only yellow showing on the U face.

      1. Solution: Complete solution for 3b or 3c and the U face will become state 3b or 3c. Then complete the solution for 3b or 3c again depending on the result.

    2. The U face has one full row of yellow cubies that crosses the center.

      1. Solution: Orient the cube so the yellow row runs R-L on the U face and perform:

        1. F R U R' U' F'

    3. The U face has half a cross of yellow cubies.

      1. Solution: Orient the cube so the L-shaped set of cubies is as follows: ULC, UC, UBC; then perform:

        1. F U R U' R' F'

  4. You now need to correctly permute the 4 U corners (for this step, the rotation of these 4 cubies is not important, only their position). There are now 3 possible states for the cube. One is that all of the corners are in the correct places. The other two are as follows with the following solutions:

    1. Two adjacent corners need to be swapped.

      1. Solution: Orient the cube so the two that need to be swapped are in positions URF and URB. Perform:

        1. L U' R' U L' U' R U2

    2. Two diagonal corners need to be swapped.

      1. Solution: Run the solution for 4a once with at least one of the corners that need to be swapped on the R face. The cube should now be in state 4a. Orient and run solution for 4a again.

  5. You now need to correctly orient the 4 corners so that the entire yellow face of the cube is correct. The simplest way to do this is to rotate the corners one at a time. This will take less time than trying to figure out what state the cube is currently in and running one of 7 sets of algorithms. Running this algorithm 2 times will rotate the cubie once clockwise and 4 times will rotate it twice. To do this, make sure the corners are in their correct positions and perform:

    1. (R’ D’ R D) x 2 or 4

    2. After performing this on one corner, rotate the 1st row ONLY (yellow) and perform again on the next corner that is incorrect. The R face of the cube will become jumbled while performing these rotations, but once you’ve completed all of the corners that need to be rotated, the R face should be back to normal.

  6. The final step is to orient the 4 yellow edges correctly so they match the faces of the cube. If this is already done, congratulations, you’ve solved the cube. If not, here are the final 4 possibilities:

    1. Two of the edges need to be swapped F-B and the other two need to be swapped L-R (or visa versa).

      1. Solution: Run solution 6c or 6d. The cube will then be in state 6c or 6d. Run appropriate solution.

    2. Two of the edges need to be swapped from URC to UBC and two need to be swapped from UFC to ULC (or visa versa).

      1. Solution: Run solution 6c or 6d. The cube will then be in state 6c or 6d. Run appropriate solution.

    3. One edge is correctly oriented (Left side) and the other 3 need to be swapped so UFC moves to UBC, UBC moves to URC, and URC moves to UFC.

      1. Solution: With the correctly oriented cubie on the L face, perform:

        1. R2 U F B’ R2 F’ B U R2

    4. One edge is correctly oriented (Left side) and the other 3 need to be swapped so UBC moves to UFC, UFC moves to URC, and URC moves to UBC.

      1. Solution: With the correctly oriented cubie on the L face, perform:

        1. R2 U’ F B’ R2 F’ B U’ R2

Congratulations! You’ve just solved the Rubik’s cube. With practice and memorization, you should be able to complete this set of algorithms in 60 seconds or less from a scrambled cube! Good luck!

Thursday, March 31, 2011

Exalted Character Builder

Alright. Down to some actual blogging which I haven't done in... well, I've never actually done real blogging (the post below doesn't count because it's a tutorial). So, I'm working on a web-based character builder for the Exalted RPG. I hope White Wolf doesn't mind - but why would they since they basically threw the whole product line out the window? I hope to release the codebase for it as an open-source project for the community to play with after I have my builder up and working. It is currently hidden in a folder on another one of my domains but after I have some testing and QA done with my friends and have imported the ENTIRE LIST OF CHARMS (a couple hundred, I'd guess), I will throw it on a new domain of it's own to see how it does. I've only implemented the most basic of spam protection so I hope it doesn't get spammed into oblivion. Anyway, wish me luck and I'll make another post when it is ready for testing.

Sunday, August 2, 2009

Copying Movies to the PlayStation 3

Today's article hopes to demonstrate the easiest methods for transferring media (standard definition and high definition) to the PlayStation 3. These methods will work for media that have been ripped from DVDs and Blu-Rays into many formats and containers (some with very little or no loss of quality). This article will not cover the ripping, muxing, or encoding of these files as there are too many formats and methods with articles already on the web. This article assumes you already have the movie in a transportable container (AVI, MPG, M4V, MKV, M2TS, TS, etc.) and simply wish to move it to your PS3 in a format that can be played back on that device.

NOTE: I do not condone downloading illegal copies of any media. This article is intended to be used on legal, backup copies of media that you own.

Some Background Information
The PlayStation 3 is capable of playing a few of the most common formats available (see the PlayStation 3 Manual), but this article will focus on transferring files in one of three containers: AVI (encoded as DivX), M4V, and M2TS. This is to attempt to retain as much quality as possible while being the most likely to play back correctly on the PS3.

External Storage Devices - The PlayStation 3 is only compatible with devices formatted using FAT32. This has a major limitation in that it can only hold files up to 4GB. As far as I know, Sony does not have any plans to update the PS3 firmware to support any other file systems that can transfer larger files (ext3, NTFS, etc...). If you are only transferring standard-definition movies that have been re-encoded to a near-lossless format, this should not be a problem as they will never exceed 4GB, but this becomes a major drawback for high-definition movies in near-lossless formats (more on how to bypass this later).

Codecs - I suggest downloading ffdshow if you do not already have it. This includes codecs for most audio and video formats which will allow you to play back the movies before and after conversion on your PC/laptop (in most cases).

Formats
x264 in TS or M2TS - These are the easiest to work with, but most people don't have their files in either of these containers due to their relative obscurity. If your move is in TS, simply re-name the file extension to m2ts. If it is in m2ts (originally or after changing the extension), just copy the file to the PS3 using one of the methods down below.

DivX in AVI - If the movie you are looking to transfer is already in DivX format, you're in luck! You can simply copy it to the PS3 using an external USB storage device. See the section further down on transferring using USB.

x264 in MKV - This is probably the best format you can possibly have for high-definition movies. In my opinion, x264 retains the most quality of any codec today and MKV (Matroska) is the future of high-definition containers. Anyway, this one is also pretty simple. Download a program called mkv2vob. After installing, open the application and go to the configuration tab. Here are the settings you need:
  • Output Type: File
  • Preferred Audio Language: Your language (English for me)
  • Video Transcoding: Automatic
  • Preferred Subtitle Language: None (unless you want subtitles, and only if they are included with the original MKV)
  • Output File Extension: m2ts
  • Transcoding Codec: x264 (slow) (this only applies if your MKV is not already in x264 format)
  • Checkboxes: Always Transcode DTS (the PS3 will not play back DTS so it must be transcoded to AC3)
You may have noticed that I skipped the setting for File Splitting. This was intentional as I need to now mention the transfer method. If you are planning to transfer the output with a USB device, you will need to set this to "FAT32 (4GB)" as the transfer device needs to be in FAT32, which has a file size limit of 4GB. If you wish, however, to keep the file in one piece then set this to None and see my section below on transferring over Wi-Fi. NOTE: Transferring over Wi-Fi takes more than double the time of transferring via USB, but is worth it for a single file, IMHO.

Now, simply go to the Add File tab, make sure the Destination Directory is set to where you want it to be, then choose the MKV file in Source File and click Add File. If there is no video or audio transcoding necessary (e.g. the file is already in H.264 with AC3 or AAC audio), then the program simply splits and remuxes the file into an m2ts container which takes about 20 minutes. If there is only audio re-encoding necessary, the process takes a bit longer (about 30-40 minutes). If there is video re-encoding necessary, it could take a couple of hours or so. After the transcoding/remuxing is finished, see the sections below on how to transfer the file to the PS3.

Other Formats - Most other formats cannot be played on the PS3 without video re-encoding. To do this, I suggest downloading HandBrake. This application is open-source and I've seen very few instances where it couldn't convert the file I needed it to. HandBrake is pretty simple to use. Just download and install the program, then run it. At the top, click the Source button, then Video File. Once you've selected the source, click Browse next to Destination. Choose where you want to save the output and give it a file name. Now, on the right, under Presets, expend Gaming Consoles and choose PS3. This will automatically choose the correct settings for outputing to M4V for the PS3. If you need subtitles, go to the Audio & Subtitles tab and choose the language at the bottom. I would not suggest messing with the audio tracks unless you really know what you're doing. Now, just click "START" at the top. To transfer the file to the PS3, see the next section. NOTE: The transcoding will probably take a very long time (depending upon the input format).

Transferring to the PlayStation 3
There are two methods detailed below for transferring movies to the PS3: using an external USB device and using a streaming application over Wi-Fi. There are advantages and disadvantages to both, but the largest differences are the size that can be transferred with USB and the time required for Wi-Fi. As noted a couple of times above, external USB storage devices that are compatible with the PS3 can only transfer files smaller than 4GB. This is due to FAT32 being the only file system that the PS3 will accept in external USB storage devices. You can split the movie into multiple files if it is larger than 4GB, but you will have to switch files 1/2 way through viewing the movie on the PS3. If the file is smaller than 4GB, it's a no-brainer: use USB. If it is larger than 4GB, I prefer to use Wi-Fi, even though the time required to transfer the file is more than double that of USB. You must make this choice for yourself.

Transferring with USB - This method is pretty straight-forward. Plug the USB device (formatted as FAT32) into your PC or laptop. Copy the file (or files) onto the USB device. Plug the USB device into the PS3. In the XMB, go to Movies and browse to the device. If you select the device and see nothing, hit Triangle > Show All. Find the movie file(s) you just copied and hit Triangle > Copy. This shouldn't take more than a few minutes (longer for high-definition movies). Once it is done, you'll probably want to re-name the file and possibly put it under an album name. To do this, back out of the USB device and browse to the movie. Hit Triangle > Information. From here you can change the movie name to whatever you want.

Transferring with Wi-Fi - This method takes a little more tweaking and a lot more transfer time, but is worth it to keep your high-definition movies in one piece, if you ask me. There are two applications that are decent for transferring your movies to the PS3: TVersity and Windows Media Center. TVersity tends to take the least amount of setup and hassle, but seems to transfer the files even slower than Windows Media Center. This is why I prefer WMC, but those of you who don't want much fuss should probably use TVersity. NOTE: WMC is only an option for those using Vista. Those using XP must use TVersity.

Using TVersity - TVersity is pretty simple to work with. Download it from the TVersity website (get the free edition) and install it. Once installed, add the folder where you store your movies in AVI (DivX), M4V, and M2TS format to the video library. On the PlayStation 3, if TVersity does not show up right away, go to Search for Media Servers in the XMB. If it is not detected, then you have a problem with your network configuration (which I will not go into here). If it is detected, browse in it to Videos > Folders. There you should see your movies. Choose the one you want and hit Triangle > Copy. As I said before, this will take a while, so go do something for a couple of hours. Once it is done, you can change the name and album by going to the movie (under Movies in the XMB) and hitting Triangle > Information.

Using Windows Media Center (Vista Only) - As I mentioned before, this takes a bit of work, but once it works it transfers a bit faster than TVersity. First, you'll need to do some registry tweaking and install a program to keep WMC from transcoding the files on the fly as the copy (which you've already done in previous steps). To get WMC to recognize and play M2TS files, see this blog entry. To get it to recognize and play M4V files, see this one. Please note that the Haali Media Splitter is very important as it keeps the files from re-encoding during streaming/copying.

Once you've done both of these, you'll need to set up media sharing. There is a great article at HCW on how to stream and copy media to the PS3 using WMC. The only thing this article leaves out is how to enable media sharing in the first place. You must go to your Network and Sharing Center and enable Media Sharing on your Wi-Fi connection. Also, I had problems with the Windows Media Player Network Sharing Service not working because the UPnP Device Host service wouldn't start. I don't remember the exact details on the fix, but they can be found online by searching for the error code you receive when trying to start the WMPNSS. After everything is installed and running and your PS3 can see your PC/laptop, the rest is pretty easy.

Open Windows Media Center. Go to Pictures + Videos > Video Library. Right-click in the video library and choose Library Setup. On the setup screen, choose Add a Folder to Watch then click Next. Now choose Add a Folder on This Computer then click Next. Browse to the folder and put a checkmark next to it and click Next then Finish. Let it search the folder and load all the media, then you can close WMC. On your PS3, you should now be able to browse to the WMC. Under it, go to Videos > Folders and you should see the folder you just added. To copy a movie, browse to it and hit Triangle > Copy. Once it is copied (which will probably take a couple of hours or more), you can change the name and album by browsing to it under Movies in the XMB and hitting Triangle > Information.

Well, that's all I've got. If anyone has any suggestions for changes or additions to this article, please leave them in the comments section. Thanks, and enjoy!

Tuesday, July 14, 2009

Purpose of Blog

This is the basic post about what this blog is for and why I decided to add my two cents to the billions of dollars of information and opinions already out there. This blog is not my ramblings about what I find annoying or wrong with the world (although, believe me, I could write for hours about that alone). This blog is meant to spark new ideas and possibly inventions by offering some ideas of my own. Those may be ideas for how to improve certain products or perhaps new bits of interesting or cool technology that I come accross. They may even bee whole new inventions, laid out in full that I just don't have the time, money, or ambition to complete myself. Who knows? But, if you're interested in tech or inventing, keep watching. I'll do my best.