| warning: comparison between signed and unsigned integer expressions |
[Nov. 17th, 2009|12:43 pm] |
Dear Lazyweb,
Philosophically, why is it a warning to test equality between signed and unsigned integer expressions in C++? Is it a performance issue (i.e., u==i would become bitwise_equal(u, i) && i >= 0)? Is it just that it thinks mixing signedness is a bad idea? |
|
|
| VS Update |
[Nov. 10th, 2009|07:06 am] |
Previously I mentioned that Mudders had fun putting Mudd at #1 on VSPink.com, followed by spelling WIBSTER (loosely the Mudd equivalent of IHTFP). If you go there now, the top 25 no longer contains any Ws. It does, however, spell: Harvey Mudd rocks boo Cal Tech. (Using Cal Tech as the C, no less).
While it seems a little less than first-rate to keep perpetuating a one-sided rivalry, that is pretty cool. |
|
|
| B Movies |
[Oct. 31st, 2009|10:47 pm] |
Speaking of B movies, we watched Runaway could have been better, despite all it had going for it: Tom Selleck, Gene Simmons, robots, Tom Selleck's moustache, Gene Simmons's tongue (which got very little screen time). It was interesting to see the future as seen from 1984, complete with CRTs, analog video, huge telephones, and robots that fly and cook you dinner.
Where's my dinner-cooking robot? Stupid AI-complete problems. |
|
|
| References for Statistics on Manifolds and such? |
[Oct. 2nd, 2009|02:01 am] |
For work and for fun, I've started thinking hard about statistics in non-Euclidean spaces. For example, how do you average angles or find the MLE of a point in SE(3)n given a collection of relative rigid-body transformations or a generalized median of several homographies?
I've found some interesting papers, but no great references... do you have any recommendations? I'd like to know more about Remannian geometry, to understand affine connections, and statistics in these spaces. Any book references would be appreciated.
Yay math! |
|
|
| Traffic and Pricing |
[Aug. 20th, 2009|07:44 am] |
Great quote from Traffic by Tom Vanderbilt:
When Costco discounts televisions during its Christmas shopping promotions, pricing them so low that stores do not make a profit, what happens? There are huge lines at the door at five a.m. When cities provide roads that are priced so low that they lose money on them, what happens? There are huge lines on the highway at five a.m. |
|
|
| Total derivatives and spring systems |
[Jul. 29th, 2009|12:06 am] |
My wife is at a conference, so my mind turns to... linear algebra.
Suppose you have a spring system... like a horizontal yardstick bolted to the table at one end, flat side facing the table (not standing on edge). You can move the tip up and down and it will resist, springing back into place. You can also bend it horizontally, but it's much stiffer in that direction due to its shape. (For the sake of simplicity, let's give each element two degrees of freedom—no crazy axial motion or buckling or twisting modes; this is a toy example.)
Suppose I'm curious what happens to the shape of the yardstick when I move the end in either of those directions. This winds up being a differential equation and you can solve for it numerically or using FEA.
I'm interested in better understanding the FEA part of it. Considering just the tip of the yardstick, and assuming small deflection (so assuming no geometric nonlinearity), I expect the restoring force to be proportional to the displacement of the tip, and so
f=−Kx where f is the restoring force, K is the spring constant (a 2×2 matrix), and x is a 2×1 vector describing the horizontal and vertical displacement of that tip. Similarly the energy would be
u=½ xTKx
Now, FEA can give me a system stiffness matrix, a matrix relating the forces to the displacements of every little piece of the yardstick. That's all well and good, but how do we go from that to the 2×2 black box system matrix describing the displacement of the tip only?
My feeling is that it works like this: Intuitively, if you push the end of the yardstick up, it'll go up, and the rest of the yardstick will go along with it in what is clearly the first bending mode (the eigenmode of K corresponding to the smallest nonzero eigenvalue). Similarly if you push it horizontally, it'll move that way (and not deflect up). This is the second eigenmode. So if we want to know what happens to the shape when we push the end around, it looks like we just want to find enough low-eigenvalue eigenmodes to span the space we want to explore (tip goes up or down, tip goes side-to-side), then fit those to the prescribed deflection.
If that's right, I'm not sure exactly what basis make sense. If we eigendecompose the K for the full system so you have
VDVT=K with the eigenvalues in ascending order, then can we could just say we'll use the first n eigenvectors with nonzero eigenvalues. But what if those don't span the space in which we are interested? Unless we have repeated eigenvalues (let's assume we don't), we could just keep adding eigenvectors until we do span the space, but if we wind up with more than n eigenvectors then we don't have a unique solution. On the other hand, the only other thing I can think of is to build a basis by adding eigenvectors in increasing order, but skipping those that aren't linearly independent within the space of prescribed degrees of freedom. That seems most likely, but also seems totally kludgy.
So...
- What's the right way to do it?
- Is there an elegant way to solve this that I'm just missing
- Can you describe this
black boxing as finding a total derivative of the system energy with respect to the degrees of freedom you want to prescribe, constrained by minimum system energy?
|
|
|
| 3D Fetuses! |
[Jul. 23rd, 2009|10:11 pm] |
Back when our nephiews were in utero about 15 months ago or more, we asked their parents to get the data set from the 3D ultrasound so we could have it 3D printed. But noo.... the ultrasound tech didn't understand what they asked for and just gave 2D pictures from the 3D ultrasound.
Apparently now, 15 months later, someone has gone and done this. |
|
|
| Tensegrity Cake (Patent Pending) |
[Jul. 16th, 2009|01:21 am] |
The design criterion for our cake was that it be taller than the bride. At seven tiers and 5'7", it was. Using precision-engineering principles, it is remarkably sturdy and goes together without adhesives or complex locking mechanisms: it uses only kinematic couplings to connect the 39 ends of the 21 copper tubes to the 13 sides of the 7 tiers of cake.
The design could be used to produce cakes with more-conventional pillars, but why?
If you are interested in licensing, contact me.
[More photos]

 Photo: Pamela Helme; fisheye added by the groom
 Photo: Joanne Clapp Fullagar
Photo sequence: Joanne Clapp Fullagar |
|
|
| RIP WBCN |
[Jul. 16th, 2009|12:02 am] |
It appears that the station that introduced me to the music of my generation, WBCN, is closing its doors. I guess WAAF wins after all these years.
Sure I rarely listened to them because they always have stupid drive-time jocks yapping, so my commute is dominated by WBUR (NPR), and sure if I did get music it was from WAAF because they have a commercial-free music-only evening commute, but still, 'BCN... wow. I'm officially recessed. |
|
|
| jpg2mpg howto |
[Jul. 8th, 2009|06:47 am] |
After much fumbling, I figured out how to convert a pile of JPGs into a video. The magic line was this:
convert -delay 20 -resize 800x600 IMG_{1840..1922}.JPG ~/foo.mpg
where -delay is a number in centiseconds (so 20 is 5 fps).
The thing is, Ubuntu's install of ImageMagic (which provides convert) doesn't come with mpeg2encode, which is what it uses to make mpg files. I had to do this:
$ wget ftp://ftp.mpegtv.com/pub/mpeg/mssg/mpeg2vidcodec_v12.tar.gz
$ tar xvzf mpeg2vidcodec_v12.tar.gz
$ cd mpeg2
$ make
$ cd mpeg2enc
$ sudo cp mpeg2encode /usr/bin
Then convert it worked happily. |
|
|
| Communal storage and backup |
[Jul. 6th, 2009|08:53 pm] |
mew0422 and I are trying to sort out our data-storage needs. She has a laptop, I have a desktop. We want some NAS and we want a good backup solution.
It looks like Apple's Time Machine is entirely client-based and so can use any mountable storage, be it a Time Capsule, a USB HDD, or something else.
With that in mind, it seems like we'd be best to get non-Apple NAS—something upgradable and it shouldn't need to be a Wi-Fi server itself. (Recommendations?)
Here's what I'm thinking: I am inclined to use the JWZ Backup Solution for my computer, possibly rsyncing to NAS in addition to swappable drives. mew0422 would use Time Capsule to backup to the NAS box.
The only thing left is how to back up the NAS drive (financial files, shared media, etc.) Any thoughts?
I hate IT. |
|
|
| Ascot! |
[May. 16th, 2009|09:19 pm] |
After a Quixotic goose chase involving many many mensware stores, I finally found someone who sells ascots in person! (Had it gone on much longer, the quest may have needed an ascot mascot.) After asking but finding none at JoS. A. Bank, I was directed to a place called SYMS which is kind of like a wearhouse-sized T.J. Maxx focusing on dress clothes.
Also in this search I found Porta Classica of 1625 Blue Hill Ave. Matapan (no website). If you live in the greater Boston area and want an awesome zoot suit, that's the place to go. |
|
|