Archive for June 22, 2006

Gophers Galore

Like many people who live in the wilderness, aka smack dab in Los Angeles (Santa Monica Mountains), Gophers will often wreak havoc on your landscaping. If you’ve ever tried to get rid of them, you’ll know a little garden hose and water won’t do the job. They’ll come right on back up as soon as you’ve turned off the water and plug up the hole right in front of you (arrogant little buggers).

What doesn’t work:

  1. Water hose (they dig drainage tunnels so that the water just emptys out on the hillside. Further more, they build their food storage and sleeping burrows so that water drains out before it reaches them.
  2. CO (Carbon Monoxide) poisoning doesn’t work either. Sounded good, but California emissions standards are so strict that the vehicle will not produce enough toxic gas at idle to fill the tunnels before dissipating. Perhaps if you have a diesel truck, you’ll have luck with this strategy.
  3. Sulfur Sticks don’t work unless the gopher happens to be very near by. It’s by far the most fun technique, but hasn’t paid off for me.

What does work:

  1. Filling the tunnels with propane gas and igniting it. Problem is you’ll probably blow up half your lawn and start a forest fire, so it’s not too practical.
  2. victor gopher trap Gophers GaloreTraps seem to be the only practical solution to irradicating the gophers (temporarily). There’s a special trick however, to placing the traps. Identify to recent mounds relatively close by to eachother. Find a thin rod (probe) to stick into the ground between the two mounds. After penetrating the ground for about 6 inches, you should feel a sudden drop. If you do, then you’ve identified one of their main thoroughfares. Prepare your traps (I recommend the Victor Gopher traps). Attach a string/wire to each trap so that it won’t be dragged intothe tunnel. Never handle the traps with your bare hands, as the gophers are weary of the human scent (they will burry the trap before touching it). Take your shovel and dig down to the tunnel opening up (excavate) about a 8 inch square area (the smaller the better), taking care not to collapse the entrances. Place one trap in either entrance and secure the strings to something solid. Cover the hole with a small board and seal the cracks with dirt so that no light enters. Gophers are incredibly active and if you truely identified recent mounds, the gopher will likely run in to the trap within 2 hours. If you check the trap after 2 hours and you notice no activity, chances are you’ll need to try a new location. If you’re unlucky, you’ll notice that the traps were burried and the tunnel closed by someone other than you icon smile Gophers Galore . He’ll not reuse that tunnel, so you’ll have to find a new one to place the traps in.
  3. Poison works, but is less fun than the traps and you’ll never know conclusively if you got the gopher. The strategy is the same as above, but instead of placing traps in either entrance of the main tunnel, you’ll instead bait the entrances with poison bait, making sure to use garden soiled gloves to mask any human scent.

Finger Me

Remember the good ‘ol days of ASCII art? The competitions to have the coolest .plan? This about tops them all.

Never underestimate the power of Japanese technology!

Angel Cop #5 (dub)

Never underestimate a good conspiracy theory when you have to explain some monumental screwup to the media.

—Roujin Z anime (dub)

Cubic Splines Revealed

There are many forms of numerical approximation, and even more names for the different methods. Depending on how they are used, they are often called by a different name if certain parameters are different. For a recent implementation in a network game, I’ve had to become very familiar with these concepts.

For example a Parametric Free (or Natural) Cubic Spline,  is in fact, the Cubic Bézier Curve when defined in terms of Parametric coordinates ( e.g. where you interpolate the dependent variables x, y on t.)

Generally, a free cubic spline is defined as
y = S(x) = ax3 + bx2 + cx + d

However, when you parameterize S(x) with respect to [wrt] time, x = x(t), y = y(t), you get the Cubic Bézier curve.

x(t) = at3 + bt2 + ct + d
y(t) = et3 + ft2 + gt + h
(let t = 0, and then d,h simply become d = x0 and h = y0 )

A really nice explanation of the derivation of a-f is presented at:
http://www.tinaja.com/glib/fastbez.pdf   

Since general cubic splines always go through their end-points, the Cubic Bézier curve must also go through all of the end-points wrt to time t. This is where in the confusion lies as to whether or not the spline goes through all the points. It definately goes through all the end-points, but whether or not you define your “control points” to equal your end-points is up to you.

Since you generally use cubic splines to piece-wise approximate an extended curve between multiple fixed/known/measured points, I call all these piece-wise fixed end-points the control points. However, when defining the Cubic Bézier, you must approximate (or choose from your control points) two inner points between each of the end-points. The Cubic Bézier curve will not pass through these inner points. Some people call these inner points also “control points”, in which case the curve will not pass through all the control points. Thus, it’s a matter of perspective.

I personally believe that if the two inner points are an approximation (e.g. non-end-points), it’s unfair to call them control points because they are not guaranteed accurate (e.g. not measured). But if you select some of your end-points as your inner points (e.g now guaranteed accurate), beware the curve will not pass through them, even though you know it should! A real catch-22.

A little bit more explanation can be found at http://groups.google.com/group/comp.graphics.algorithms/msg/7276de840df9614c?hl=en&fwc=1

A sample implementation in C is on Wikipedia: http://en.wikipedia.org/wiki/B%C3%A9zier_curve

An alternate approach is to use the standard 2D Cubic Spline interpolation on an XY plane, fixing x and y wrt to t. If you do this, you can use the example in “Numerical recipies in C” at http://www.library.cornell.edu/nr/bookcpdf/c3-3.pdf to create a Cubic Spline in each dimension (x(t), y(t)). E.g. Instead of fixing x and interpolating for y, fix t and interpolate for x, then keeping the same fixed t interpolate for y.

Illegal Workers’ Rights

Living in California has imbred a kind of presumption in me and probably most people that illegal workers are the “Mexicans” . As with all blanket statements, they’re usually wrong and the same is true for this assumption. One group of these illegal workers are international students who come here and are expected to pay a tuition 2-3x a US Citizen would pay, probably even more once exchange rates (relatively speaking) are figured into the equation. On top of that, they are only allowed to work on campus and part-time, which is probably only at minimum wage. With such limited legal options, many work under the table performing jobs paid by the hour.

My girlfriend is in this situation, unable to work legally and not fortunate enough to have parents that can support her. She’s managed to keep a steady job, but not without incident. Her last job was at one of the hundred mobile phone shops in K-Town. Her employer, a first generation Korean guy had generally always respected his employees, but was uniformly late in paying them. It got to a point when she couldn’t pay her bills on time and risked hurting her credit. She made the decision to leave and hope to get paid the $1,800 owed to her later when her employer had the money. But when her boss found out, he lost it. He said “If you ever come around  here again, I’ll call the INS! You can forget about your pay check.” He seemed to think it was his right to pay her and not his obligation. I am sure the threat is an idle one, but it drives home the point. What rights does she have?

Turns out, there are many organizations representing illegal workers. For that, I am grateful. One in particular, respresents Korean laborers and has been very helpful to my girlfriend. By advising her of her rights, informing her how little legal power he has over her, she was able to get paid in the end… albiet 3 weeks later. She had kept insisting that he give her some money. He wrote her a bad check, that when she cashed, bounced twice. But that was his fatal mistake. It gave her all the bargaining power she needed to take him to small claims court. He conceeded he was a jerk and gave her cash! The funny thing is, he wanted the bounced check back. As if that would protect her? Bank records are immutable and photocopies hold up well enough in court.

 

 

Luck favors those who are prepared.

—Anonymous