I suppose this is what I get for driving a 40 year old car. I was driving up the hill to the grocery store in Midtown a few days ago, I clutch in to downshift to take a right turn and slam. My foot hits the pedal and feels no resistance before bottoming it out onto the kick panel. I had just enough momentum to make the turn, roll down the street, make a turn into an alleyway, a right into the parking garage of the store, and down a level into a parking spot. Thanks Newton.
I was initially worried that something in the transmission had gone, but I set my phone under my transmission and moved the clutch pedal back and forth, and noticed no movement. I ordered a clutch cable, and thanks to the jBugs people who purchased this item also purchased section on their website I was instructed to purchase a clutch cable hook as well. This came in handy. Seriously though, has anyone ever actually used that section before? The hook ended up around five dollars, so it was a low-risk investment.
The cluster is actually kind of an ingenious setup. The gas pedal isn't on the diagram, though the spring mechanism is on the very right. The brake pedal mounts to the cluster with a ring, and the clutch cable hook then feeds through the hole in the middle of all of the components to attach to the pedal. There's a pin that feeds through the pedal and the cable hook.
Turns out, the cable was perfectly fine. The clip on the end of the cable had actually worn completely through the thin part of the cable hook. I suppose just after repeated actuation it slowly eroded the metal. It was really rewarding to open up the cluster and pull out a broken hook, just because I had bought it.
The repair was super easy actually. Just a little strange getting the springs back on the cluster (I hate round springs). I had lots of help from my good friend Colin (who is pictured beautiful below), together it took us around 2 hours before I was back on the road. 10/10 - would replace clutch cable again.
I just finished an assignment yesterday for my C++ programming class (ECE 2036). One of the homework assignments earlier in the semester was a simple complex number class, and now the class is covering threading. We're using the standard POSIX threads library, but the class is kind of lame and they wrote a wrapper for us to use; the class taught how to use the wrapper class correctly. This homework was to generate a mandelbrot fractal, the assignment came with some prewritten code that uses QT to open a window and write some pixels. We were to plug our complex number class in there and write just a few lines.
Well, being dissatisfied with that, and wanting to play with OpenCL to see what the commotion was about, I learned enough to write a simple kernel.
#define MAX_ITERATION_COUNT 2000
inline float2 complexMultiply(float2 a, float2 b) {
return (float2)(a.x * b.x - a.y * b.y, a.x * b.y + a.y * b.x);
}
inline float complexMagnitude(float2 a) {
return sqrt(a.x * a.x + a.y * a.y);
}
inline float complexMagnitudeSquared(float2 a) {
return (a.x * a.x) + (a.y * a.y);
}
kernel void mandlebrot(global int2 *screenSize, global float2 *location, global float *domainSize, global int *iterationCountOut, global float2 *coordsMemOut) {
size_t a = get_global_id(0);
int xPixel = a % screenSize[0].x;
int yPixel = floor(((float)a / (float)screenSize[0].x));
float xCoord = location[0].x + ((float)xPixel * domainSize[0] / (float)screenSize[0].x);
float yCoord = location[0].y + ((float)yPixel * domainSize[0] / (float)screenSize[0].x);
float2 imagCoordinate = (float2)(xCoord, yCoord);
coordsMemOut[a] = imagCoordinate;
float2 Z = imagCoordinate;
int iterationCount = 0;
for(iterationCount; iterationCount <= MAX_ITERATION_COUNT; iterationCount++) {
if(complexMagnitudeSquared(Z) > 4) {
break;
} else{
Z = complexMultiply(Z, Z) + imagCoordinate;
}
}
iterationCountOut[a] = iterationCount;
}
The idea is that I pass in a series of vector coordinates which are just individual pixels for now. I think later I can use this to space the pixels out and then do a color smoothing algorithm to connect the points. What's neat is that I can also super-sample and then rescale to do anti-aliasing. What's passed out from the kernel is the number of iterations that it took for the magnitude to become "unbounded" which in this case is a magnitude of 4 or greater.
Anyway, I suppose it goes without saying that this is way faster than the threaded version. I'm parallelizing individual pixels and not just sending one half of the plane to one core and the other half to the other. What happens now is I just get caught up looking at the pretty pictures and stop making the code better. Oops. My coloring function kinda sucks, and the bottleneck is now I'm using OpenGL to literally paint individual pixels. I need to figure out how to dump the output to an image. I should also add a way to pan around the thing and zoom in. Right now I'm just using coordinates off websites that show cool areas. Here's what I've got so far though:
I'm in a program at GT called Grand Challenges, they gave us some classes on how to work well in groups and with others, and then talked to us a lot about how to solve insurmountable problems. So, right now my group is working on the cliché CO2 emissions problem. Even more cliché is that our solution is an app. We want to use live traffic data and some data from other sources to provide people with multimodal commute options. Google will give you directions for your car or your bike or your feet, but they don't allow you to mix driving and taking a bus, for example.
We want to provide people with emissions and health data for possible routes, as in, ""if you drive and then bike this far, you'll burn this many calories and emit this many kilograms of CO2." We're almost in the development stage, and we needed to come up some mockups to pitch our idea to get some more funding from the program. I wanted the maps to look unique, so I spent an afternoon toying with MapBox. I followed their instructions on feeding publicly available open street map data (free) into MapBox. I played around with some minimalistic styling, and ended up with something kinda pretty.
Next I needed to add some routes on top, nothing fancy, just something dumb. I used the Google Maps HTTP API for some directions, using some waypoints to make the routes look a little more interesting. The API comes back with a list of steps, which each have a polyline object that contains a series of lat,long coordinates in an ASCII compressed format to save space. I used the polyline library to extract them all out, before plugging them into a leaflet.js script that overlays the polyline back on top of the MapBox hosted map. Which is a convoluted way of saying, I made this:
This came out way better than I ever hoped. So, all that was left was to punch it into a mockup of the app in Photoshop. Which, also came out way better than I hoped. I'm really not a designer. Sometimes I open Photoshop or Illustrator and magic happens, and sometimes it just doesn't. I really don't know what I'm doing. I used some CC licensed icons from the Noun Project and some mockup helper helper file I found on Smashing Magazine somewhere.