Git Icons

I wanted to link to my Github repository, but as you may have noticed my personal links are all icons. Overplayed Web 2.0 or not, I like my 32 x 32 icons. A search of “Git Icons” did not bring up anything that I was in love with, so I made my own. I won’t say I’m particularly in love with these either, but I do “like” them. Right click the link below each image and click “save as”.

git16x16
16×16
git32x32
32×32
git48x48
48×48
git64x64
64×64
git128x128
128×128

After I finished the icon, was talking to a co-worker to show them what was out there and searched for Github Icons instead, which is really what I was looking for all along, and the Cat/Squid is WAY cooler. You may not, however like the Cat-Squid chimaera, so please feel free to use mine.

Gears

Vector Graphicked(sic) from a sketch, something I’d like to animate using the original SVG and HTML 5. Animated (view with Google Chrome or other HTML5-enabled browser
gears

Art Nouveau-y Phone

I do a lot of graphical work (at least more than I though I would) but have yet to post any of it. I did this originally for poormansdataplan.com, although this isn’t the same one that’s out on the site now (since improved). Created using Inkscape, a terrific Vector Graphics program.
phone

Toy Traffic Light App

I believe over the weekend the 50th copy of this app was sold, serving as motivation for me to put a video up of it. It’s a simple “toy” app of a traffic light. I used 3 quads, and swapped the textures out for each one (one texture for on, another for off). The quad itself had the color on the rendered polygon. You can get it here at the App Store

Membership.GetUser in SharePoint 2010 – Not Implemented

SharePoint 2010 will give you a “not implemented” error if you try to use Membership.GetUser() to get the currently logged in user via FBA. I’ve been using the following as a workaround. Inspired by The SharePoint Cowboy

  public static MembershipUser getUser()
        {
            //not passing in SPWeb because we need the current user.
            string username = SPContext.Current.Web.CurrentUser.LoginName;
            string[] arrTempString = username.Split('|');

            if (arrTempString.Length > 0)
            {
                //get the last string delimited by |
                username = arrTempString[arrTempString.Length - 1];
            }

            MembershipUserCollection collMembership = Membership.GetAllUsers();
            MembershipUser currentUser = null;
            foreach (MembershipUser user in collMembership)
            {
                if (user.UserName == username)
                {
                    currentUser = user;
                    break;
                }
            }
            return currentUser;
        }

Haunted House (GDI+)

ooooOOOOOP!! HA. Get it? Keep reading then. This first example I used in class to illustrate the use of collections (each moving ghost was an instance of a “ghost” class). Clicking the button added on into a collection, and another into an array (not an arraylist. scary!). Clicking on the ghost removed it from the collection, or array.. whichever it was stored in. The second example I used in the my VB Intro course, and I used the library (REUSE) from the first into an base form (INHERITANCE) class in a class library, then inherited that form in the main project to ENCAPSULATE away all the gory details. The rad lightning effect was a select case inside of a timer loop, background color from white to black (NOPE, NOT OBJECT ORIENTED PROGRAMMING).


Edit 1/22/12: I couldn’t stand reading my bad jokes again, thus the strikethroughs.

Now! with more textures

Got textures working in iOS & OpenGL. I struggled with this one for a bit… I had all the code correctly but I neglected the importance of using texture images that are in THE POWER OF TWO. iOS will just not show the texture, the program won’t crash or anything (which I guess is nice). Anyways. that means that if you want to use a square image for example, it can’t be 119 x 119 pixels in resolution. You would want to make it 128 x 128. In my case, I used 512 x 512. In the video below I had two textures that I made in Inkscape, one just a circle with transparent background, the other a circle with some blurring and a darker circular line within it. Both were PNGs and 512 x 512. The texture that is shown after clicking is the same dimension as the other, but held up side-by-side the circle would appear smaller. The images themselves were white, the color is coming through the Quads, which if you look at my previous post you’d see are indeed colored (randomly).

iOS OpenGL touch/collision detection & controls

Got touch detection working – tricky because the screen (touch) coordinates are different than the OpenGL world coordinates, and will change according to the z coordinates. i added the slider to adjust the z value to test it (delegates? reference outlet? What?). Added a label to get the x, y coordinates of where the touch happened. Also added a vector_x, vector_y variable to the quad struct for movement.

Objective C and Arrays of Vertices

Originally attempted to create an 2D array of GLFloats, but the pointers scared me off. Instead, created a Quad struct that has an array (12 vertices) that I feed into a Triangle strip. I can then make an array of Quads with a for loop and then iterate through THAT array later to draw them (and increment the RGB values too):

iOS 5 OpenGL & Triangle Strip

Using Triangle Strip (like Quad strip) to draw the squares. Code is inside a function (method? message?) taking multiple parameters.. in this case x and y. Doing a rotate, draw the squares, clear matrix, rotate other direction and draw other squares (with changing color in between). Also learned to zoom in while recording with Quicktime on Mac (ctrl + mousewheel).