Home
DJ Sez's Journal [entries|friends|calendar]
DJ Sez

[ userinfo | livejournal userinfo ]
[ calendar | livejournal calendar ]

This is retarded [04 Feb 2005|02:42pm]
[ mood | amused ]
[ music | You're an idiot ]

Livejournal is the fucking stupidest thing, um, ever.

3 comments|post comment

The Night Is An Aesthetical [sic] Game Genie [03 May 2004|01:52am]
[ mood | pessimistic ]
[ music | The Fire Theft - Chain ]

The sensor readings can, assuming a fixed-disc radius of sensor detection, be thought of as chords on a circle. Using two such chords (and locations of the nodes, i.e. the centers of the circles), given a fixed, or at least piecewise linear, velocity, the equation of the trajectory can be determined.

Consider two nodes on two circles, A and B, located at (x1,y1) and (x2,y2) respectively. The chord of intersection (i.e. the sensor reading) for node A is alpha. For node B the chord is beta. Note that these chords can rotate 360 degrees across the circle; there is nothing explicitly given that anchors these chords to any particular orientation on the circle. The radii of the two nodes (circles) are r1 and r2, respectively, with r2 < r1.

A triangle for each node can be constructed. One side is the radius of the node (i.e. the radius of detection). Another side is a normal from the center of the circle to the chord of detection. This line segment will bisect the chord, by definition. The length of this side is unknown. The third side is the bisected chord length. So, the length of this unknown side, which we'll denote s1, is given by:

r1^2 = 1/2 * alpha + s1^2

Solving for s1 gives
(1) s1 = sqrt(r1^2 - 1/2 * alpha)

Similarly, for the other circle we have
(2) s2 = sqrt(r2^2 - 1/2 * beta)

Using s1 and s2 as their respective radii, we construct two new circles centered at (x1,y1) and (y1,y2) called C1 and C2. The trajectory will now be one of four possible tangent lines to these two circles. In order to find this line, we construct a third circle, centered at (x1,y1), with the radius r1-r2 (remembering that r1 > r2).

We then construct a triangle, with side 1 from (x1,y1) to (x2,y2) (i.e. a line segment connecting the centers of A and B), side 2, the radius of this newest circle (r1-r2) and side 3, a segment connecting the top of the radius (i.e. the point on the circle that the radius "hits") and the center of B (x2,y2).

We can translate this third side, along the segment r2 (i.e. the different between our smallest "inner" circle and our second circle) until we intersect the second circle at a tangent point. Since this third side ended at the center of B (x2,y2) as defined, by definition after traversing r2 units away from B, we will end up at a point on the circle. This new line we've created from the translation will be the line that is tangent to our two circles C1 and C2.

Hence, for piecewise-linear target sensor readings, a closed-form solution for the equation of the trajectory is obtainable.


It's written up horribly, yes. And I'm not so sure anyone cares about the result, but I'm pretty sure no one else figured that out. That last part (the circle-circle tangent shit) was fucking hard to figure out. I never really did any analytic geometry.

But I think it's neat.

post comment

navigation
[ viewing | most recent entries ]

Advertisement