# Khan/khan-exercises

### Subversion checkout URL

You can clone with HTTPS or Subversion.

Fetching contributors…

Cannot retrieve contributors at this time

94 lines (80 sloc) 3.982 kb
 Recognizing rays, lines, and line segments
randRange(0, 359) randRange(4, 7) [(LENGTH/2) * cos( TILT ), (LENGTH/2) * sin( TILT )] [-1 * (LENGTH/2) * cos( TILT ), -1 * (LENGTH/2) * sin( TILT )] LENGTH - 2 [(INNER_LENGTH/2) * cos( TILT ), (INNER_LENGTH/2) * sin( TILT )] [-1 * (INNER_LENGTH/2) * cos( TILT ), -1 * (INNER_LENGTH/2) * sin( TILT )] { r: 0.2, fill: "blue", stroke: "none" }

Identify this figure.

init({ range: [ [-6, 6], [-6, 6] ], scale: 20 });
line( END1, END2 ); circle( END1, DOT_ATTRS ); circle( END2, DOT_ATTRS );
Line segment
• Line segment
• Ray
• Line

This one-dimensional figure has two endpoints and a set length (it doesn't go on forever).

A 1D figure that has two endpoints and a set length is a line segment.

line( END1, END2, { arrows: "->" } ); circle( END1, DOT_ATTRS ); circle( INNER2, DOT_ATTRS );
Ray

This figure is one-dimensional and has one endpoint. It goes on forever in the other direction, though.

Therefore, this figure is a ray.

line( END1, END2, { arrows: "->" } ); line( END2, END1, { arrows: "->" } ); circle( INNER1, DOT_ATTRS ); circle( INNER2, DOT_ATTRS );
Line

This figure is straight, one-dimensional, and it goes on forever in both directions. It doesn't have any endpoints.

That description means this figure is a line.

Something went wrong with that request. Please try again.