File: xfpolys.cat

package info (click to toggle)
scilab 2.4-1
  • links: PTS
  • area: non-free
  • in suites: potato, slink
  • size: 55,196 kB
  • ctags: 38,019
  • sloc: ansic: 231,970; fortran: 148,976; tcl: 7,099; makefile: 4,585; sh: 2,978; csh: 154; cpp: 101; asm: 39; sed: 5
file content (45 lines) | stat: -rw-r--r-- 1,349 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45

xfpolys(2)                     Scilab Function                     xfpolys(2)
NAME
  xfpolys - fill a set of polygons of the same size

CALLING SEQUENCE
  []=xfpolys(xpols,ypols,[fill])

PARAMETERS

  xpols,ypols
            : two matrices of size (n1,n2) (polygon def)

  fill      : vector of size n2 (number of polygons) (pattern id's).

DESCRIPTION
  fills a set of polygons of the same size defined by the two matrices
  xpols,ypols . xpols= [ xpol1;xpol2;...]', each column of the matrix xpols
  gives the x-values of the points of a polygon (i.e ypols).

  fill(i) gives the id of the pattern for filling the polygon number i

  -    if fill(i) < 0,   the polygon is filled with pattern -fill(i).

  -    if fill(i) == 0,  the polyline is only drawn with the current dash
       style ( or current color ).

  -    if fill(i) > 0,  the polygon is filled with the pattern fill(i). Then
       its contour is drawn with the current dash (or color) and closed if
       necessary.

EXAMPLE
  plot2d(0,0,[-1],"012"," ",[0,-10,210,40]);
  x1=[0,10,20,30,20,10,0];
  y1=[15,30,30,15,0,0,15];
  xpols=[x1;x1;x1;x1]';xpols=xpols + [0,60,120,180].*.ones(x1)';
  ypols=[y1;y1;y1;y1]';
  lpat=xget("lastpattern");
  // setting the current dash (or line color)
  xset("dashes",5);
  xfpolys(xpols,ypols,[-1,0,1,2]);
  xset("default");

AUTHOR
  J.Ph.C.