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:

Polygon Calculator

Polygon

-- Graphic object: polygon ([[<x1>,<y1>], [<x2>,<y2>],...]) -- Graphic object: polygon ([<x1>,<x2>,...], [<y1>,<y2>,...]) Draws polygons in 2D.

2D

load(draw);
 scene1: gr2d(title="Ellipse",                   nticks=30,                   parametric(2*cos(t),5*sin(t),t,0,2*%pi));
 scene2: gr2d(title="Triangle",                   polygon([4,5,7],[6,4,2]));
 draw(scene1, scene2, columns = 2);

polygon ([[<x1>,<y1>], [<x2>,<y2>],...]) or polygon ([<x1>,<x2>,...], [<y1>,<y2>,...]): plots on the plane a polygon with vertices [<x1>,<y1>], [<x2>,<y2>], etc..

This object is affected by the following graphic options: transparent, fill_color, border, line_width, key, line_type and color.

Example:

          (%i1) load(draw)$
          (%i2) draw2d(color      = "#e245f0",
                       line_width = 8,
                       polygon([[3,2],[7,2],[5,5]]),
                       border      = false,
                       fill_color  = yellow,
                       polygon([[5,2],[9,2],[7,5]]) )$

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

(%o1)                                true
(%i2) 

Polygon Example

Related Examples