Sponsored links: Algebra eBooks
 

Help Index

A

B

C

D

E

F

G

H

I

J

K

L

M

N

O

P

Q

R

S

T

U

V

W

X

Y

Z

The Maxima on-line user's manual

Algebra Calculator

Search:

Points Calculator

Points

-- Graphic object: points ([[<x1>,<y1>], [<x2>,<y2>],...]) -- Graphic object: points ([<x1>,<x2>,...], [<y1>,<y2>,...]) -- Graphic object: points ([<y1>,<y2>,...]) -- Graphic object: points ([[<x1>,<y1>,<z1>], [<x2>,<y2>,<z2>],...]) -- Graphic object: points ([<x1>,<x2>,...], [<y1>,<y2>,...], [<z1>,<z2>,...]) -- Graphic object: points (<matrix>) -- Graphic object: points (<1d_y_array>) -- Graphic object: points (<1d_x_array>, <1d_y_array>) -- Graphic object: points (<1d_x_array>, <1d_y_array>, <1d_z_array>) -- Graphic object: points (<2d_xy_array>) -- Graphic object: points (<2d_xyz_array>) Draws points in 2D and 3D.

This object is affected by the following graphic options: point_size, point_type, points_joined, line_width, key, line_type and color. In 3D mode, it is also affected by enhanced3d.

"*"/* Schnittpunkt zweier Geraden bestimmen */;
load(draw);
"*"/* Gleichung Gerade1 */;
p1:7*s+2*r=-3;
"*"/* Gleichung Gerade2 */;
p2:s-r=1;
"*"/* Gleichungssystem lösen */;
res:solve([p1,p2],[r,s]);
"*"/* Schnittpunkte festhalten */;
punkte:matrixmap(rhs,res);
"*"/* Die graphische Darstellung der Lösung */;
draw2d(proportional_axes = xy,color=black,implicit(p1,r,-3,3,s,-3,3),color=blue,implicit(p2,r,-3,3,s,-3,3),color=red,point_type=7,point_size=2,points(punkte),grid=true,xrange=[-3,3],yrange=[-3,3]);

2D

points ([[<x1>,<y1>], [<x2>,<y2>],...]) or points ([<x1>,<x2>,...], [<y1>,<y2>,...]) plots points [x1,y1], [x2,y2], etc. If abscissas are not given, they are set to consecutive positive integers, so that points ([<y1>,<y2>,...]) draws points [1,<y1>], [2,<y2>], etc. If <matrix> is a two-column or two-row matrix, points (<matrix>) draws the associated points. If <matrix> is a one-column or one-row matrix, abscissas are assigned automatically.

If <1d_y_array> is a 1D lisp array of numbers, points (<1d_y_array>) plots them setting abscissas to consecutive positive integers. points (<1d_x_array>, <1d_y_array>) plots points with their coordinates taken from the two arrays passed as arguments. If <2d_xy_array> is a 2D array with two columns, or with two rows, points (<2d_xy_array>) plots the corresponding points on the plane.

Examples:

Two types of arguments for points, a list of pairs and two lists of separate coordinates.

          (%i1) load(draw)$
          (%i2) draw2d(
                  key = "Small points",
                  points(makelist([random(20),random(50)],k,1,10)),
                  point_type    = circle,
                  point_size    = 3,
                  points_joined = true,
                  key           = "Great points",
                  points(makelist(k,k,1,20),makelist(random(30),k,1,20)),
                  point_type    = filled_down_triangle,
                  key           = "Automatic abscissas",
                  color         = red,
                  points([2,12,8]))$

     Drawing impulses.
          (%i1) load(draw)$
          (%i2) draw2d(
                  points_joined = impulses,
                  line_width    = 2,
                  color         = red,
                  points(makelist([random(20),random(50)],k,1,10)))$

     Array with ordinates.
          (%i1) load(draw)$
          (%i2) a: make_array (flonum, 100) $
          (%i3) for i:0 thru 99 do a[i]: random(1.0) $
          (%i4) draw2d(points(a)) $

     Two arrays with separate coordinates.
          (%i1) load(draw)$
          (%i2) x: make_array (flonum, 100) $
          (%i3) y: make_array (fixnum, 100) $
          (%i4) for i:0 thru 99 do (
                  x[i]: float(i/100),
                  y[i]: random(10) ) $
          (%i5) draw2d(points(x, y)) $

     A two-column 2D array.
          (%i1) load(draw)$
          (%i2) xy: make_array(flonum, 100, 2) $
          (%i3) for i:0 thru 99 do (
                  xy[i, 0]: float(i/100),
                  xy[i, 1]: random(10) ) $
          (%i4) draw2d(points(xy)) $

     Drawing an array filled with function read_array.
          (%i1) load(draw)$
          (%i2) a: make_array(flonum,100) $
          (%i3) read_array (file_search ("pidigits.data"), a) $
          (%i4) draw2d(points(a)) $

3D

points ([[<x1>,<y1>,<z1>], [<x2>,<y2>,<z2>],...]) or points ([<x1>,<x2>,...], [<y1>,<y2>,...], [<z1>,<z2>,...]) plots points [<x1>,<y1>,<z1>], [<x2>,<y2>,<z2>], etc. If <matrix> is a three-column or three-row matrix, points (<matrix>) draws the associated points.

When arguments are lisp arrays, points (<1d_x_array>, <1d_y_array>, <1d_z_array>) takes coordinates from the three 1D arrays. If <2d_xyz_array> is a 2D array with three columns, or with three rows, points (<2d_xyz_array>) plots the corresponding points.

Examples:

     One tridimensional sample,
          (%i1) load(draw)$
          (%i2) load (numericalio)$
          (%i3) s2 : read_matrix (file_search ("wind.data"))$
          (%i4) draw3d(title = "Daily average wind speeds",
                       point_size = 2,
                       points(args(submatrix (s2, 4, 5))) )$

     Two tridimensional samples,
          (%i1) load(draw)$
          (%i2) load (numericalio)$
          (%i3) s2 : read_matrix (file_search ("wind.data"))$
          (%i4) draw3d(
                   title = "Daily average wind speeds. Two data sets",
                   point_size = 2,
                   key        = "Sample from stations 1, 2 and 3",
                   points(args(submatrix (s2, 4, 5))),
                   point_type = 4,
                   key        = "Sample from stations 1, 4 and 5",
                   points(args(submatrix (s2, 2, 3))) )$

     Unidimensional arrays,
          (%i1) load(draw)$
          (%i2) x: make_array (fixnum, 10) $
          (%i3) y: make_array (fixnum, 10) $
          (%i4) z: make_array (fixnum, 10) $
          (%i5) for i:0 thru 9 do (
                  x[i]: random(10),
                  y[i]: random(10),
                  z[i]: random(10) ) $
          (%i6) draw3d(points(x,y,z)) $

     Bidimensional colored array,
          (%i1) load(draw)$
          (%i2) xyz: make_array(fixnum, 10, 3) $
          (%i3) for i:0 thru 9 do (
                  xyz[i, 0]: random(10),
                  xyz[i, 1]: random(10),
                  xyz[i, 2]: random(10) ) $
          (%i4) draw3d(
                   enhanced3d = true,
                   points_joined = true,
                   points(xyz)) $

There are also some inexact matches for points. Try ?? points to see them.

(%o1)                                true
(%i2) 

Points Example

Related Examples

points

points ([[1,2], [3,4]]);

Calculate

points-print-sum

P(t) := 1/2*a*t^2 + t...

points: [0, 5.27, 7.1...

print(sum((P(t - 1) -...

Calculate

points

points ([[1,2], [3,4]]);

Calculate

points-rk

dxdt: vx;

dvxdt: x/(x^2+y^2)^(3...

dydt: vy;

Calculate

points-rk

dxdt: vx;

dvxdt: x/(x^2+y^2)^(3...

dydt: vy;

Calculate

points-print-sum

P(t) := 1/2*a*t^2 + t...

points: [0, 5.27, 7.1...

print(sum((P(t - 1) -...

Calculate

points

wxdraw2d(grid=true,xa...

Calculate

points

g:points([100,300,500...

wxdraw2d(g);

Calculate

points-rk

points:rk([v,4*u],[u,...

Calculate

points

g:points([100,300,500...

wxdraw2d(g);

Calculate