# How Do Computers Make A Dot Move

Disco Ball -- How fast do the dots move?

x = distance of the dot from the position of the light source.
θ = angular displacement of the flat element on the ball
θ = 0 when the flat piece is directly facing the light.
http://i675.photobucket.com/albums/vv116...

x = 2 - cosθ - (5 - sinθ) / tan(α + 2θ)
where 2sinα = sin(α + θ)

x = [2 - cosθ] - [(5 - sinθ)*(2 - cosθ - sinθtan2θ)/(sinθ + (2-cosθ)*tan2θ)]

The velocity of the dot can be found by differentiating x, knowing that

I'm getting
v = [2π/10] * [45 - 30cosθ - 8sin³θ] / [1 - 8cosθsin³θ + 15cos³θ - 16cos⁴θ]

That last term is cosθ to the power 4 if your computer does not display the font.

You wouldn't expect the velocity of the dot to remain constant if the ball is made up of flat panels.

*EDIT*
Oh, is it 0.1 m? I didn't see that. Then the equations become:

5v/π = NUM / DEN
NUM = [10 - 2r(1+r)² sin³θ + 5r {4 + 3r - 3(1+r)cosθ} ]
DEN = [{r - 2(1+r) cosθ} sinθ]²
r = 0.1

5v/π = [10 - 2r(1+r)² sin³θ + 5r {4 + 3r - 3(1+r)cosθ} ] / [{r - 2(1+r) cosθ} sinθ ]²

The plots of x and v vs θ are shown below.
http://i675.photobucket.com/albums/vv116...
http://i675.photobucket.com/albums/vv116...

The average speed of the dot across the wall is 8.22 m/s

My computer screen just randomly got a black circular dot in the top left corner how can I fix this?

There is 7 dots and can only move one to make 2 lines of 4 dots?

Try it with 6 pennies instead of 7 (Monet is right, the original puzzle is 6 pennies in an L shape & move one to make 4 in each row). Take the top one and stack it on the one that is the corner of the L and they will both have 4. Two in the corner and two each direction

* *
*
* * *
^ stack it on top of this one

How do you convert an alphanumeric data field into a Comp3 or numeric data field in COBOL?

[This looks better in courier font. All of my PIC clauses line up to col 40 and I indent nested IFs properly.]

Two ways. The one below this is probably more efficient; COBOL tends to groan when you use the INSPECT verb the way the wiring in an old house does when the refrigerator kicks in.

01 ALPHA-FIELD PIC X(18).
01 NUM-FIELD REDEFINES ALPHA-FIELD.
05 NF-15 PIC 9(15).
05 NF-DOT PIC X(01).
05 NF-DEC PIC 9(02).

01 OUT-NUM PIC S9(13)V99.
01 WS-DEC PIC V99.

Set a switch somewhere. Use the INSPECT verb on the alpha field with TALLY to see if there is a "-" in your field. If so, set the switch.

Then, if so, use INSPECT again, replacing "-" with "0".
Then use INSPECT a second or third time, replacing space by "0".

Now move NF-15 to OUT-NUM, then COMPUTE WS-DEC = NF-DEC/100 and add WS-DEC TO OUT-NUM.

Finally, if the switch you set is "Y", multiply by -1.

Don't forget to set the switch off each time you INSPECT.

Here is version 2.
==================================

01 FIELD-18 PIC X(18).

01 FIELD-17 REDEFINES FIELD-18.
05 F17-SIGN PIC X(01).
05 F17-NUM PIC 9(14)
05 F17-DOT PIC X(01).
05 F17-DEC PIC 9(02).

01 FIELD-16 REDEFINES FIELD-18.
05 FILLER PIC X(01).
05 F16-SIGN PIC X(01).
05 F16-NUM PIC 9(13)
05 F16-DOT PIC X(01).
05 F16-DEC PIC 9(02).

etc - 16 redefines, tha first filler getting bigger by 1 and Fnn-NUM getting smaller by 1 in each redefine.

You'll need NEW-FIELD AS PIC S9(13)V99.

IF F17-NUM NUMERIC
IF F17-SIGN = "-"
SUBTRACT F17-NUM FROM 0 GIVING NEW-FIELD
ELSE
MOVE F17-NUM TO NEW-FIELD
ELSE
IF F16-NUM NUMERIC . . .

You don't need the Fnn-DEC defined for F16 through F01, since it will always be 9(02). Compute a second new field, defined as v99, by F17-dec / 100, then add new-field-dec to new-field.

Use Fnn-DOT to check; if it is ".", you have a valid number. If not, you don't.

You could use the same idea - many redefines and a long test - if your values could be 1234.56, 12345.6 or 123456.

How to use a red dot sight the dot keeps moving?

I bought a 100.00 red dot sight for my ar-15 and I'm having a very hard time understanding how to use red dots.

The problem I'm having is this, if i move my head the red dot moves around so I dont know which way my barrel is really pointing. With a scope or iron sights they are fixed to the gun and if i move my head and break the cheek weld the scope and iron sights stay right there with the gun and the only way to get the gun on target is it move the actual gun thats the only way the iron sights will move and be on target.

However when I aim the gun downrange in the general direction of the paper target and turn my head the red dot moves, if I am at 50 yards and move my head a little bit I can make it look the gun is pointing at a new target even though the gun hasnt actually moved.

I can make the red dot look like its pointing at a different target by sinking my head low on the stock but the barrel hasnt been moved at all.

There is no point of reference that I need to actually move the gun to bring it to target.

So when I am aiming I dont know how much of it is due to my head moving or the barrel moving because the red dot moves