Subversion Repositories wimsdev

Rev

Rev 13601 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
13600 czzmrn 1
 
2
!if $wims_read_parm!=slib_header
3
  !goto proc
4
!endif
5
 
6
slib_title=Rosettes
7
slib_author=Marina, Cazzola
8
slib_example=cn,3,0,[segment 0.8,0,1,1,blue],html\
9
dn,3,0,[segment 0.8,0,1,1,blue],html\
10
cn,1,0,[segment 0,0,1.4,0,blue;segment 1.4,0,1.4,1.4,blue;segment 0,0,1.4,1.4,red],html\
11
cn,1,90,[segment 0,0,1.4,0,blue;segment 1.4,0,1.4,1.4,blue;segment 0,0,1.4,1.4,red],html\
12
cn,2,0,[segment 0,0,1.4,0,blue;segment 1.4,0,1.4,1.4,blue;segment 0,0,1.4,1.4,red],html\
13
cn,3,0,[segment 0,0,1.4,0,blue;segment 1.4,0,1.4,1.4,blue;segment 0,0,1.4,1.4,red],html\
14
cn,4,0,[segment 0,0,1.4,0,blue;segment 1.4,0,1.4,1.4,blue;segment 0,0,1.4,1.4,red],html\
15
cn,5,0,[segment 0,0,1.4,0,blue;segment 1.4,0,1.4,1.4,blue;segment 0,0,1.4,1.4,red],html\
16
cn,6,0,[segment 0,0,1.4,0,blue;segment 1.4,0,1.4,1.4,blue;segment 0,0,1.4,1.4,red],html\
17
cn,7,0,[segment 0,0,1.4,0,blue;segment 1.4,0,1.4,1.4,blue;segment 0,0,1.4,1.4,red],html\
18
cn,8,0,[segment 0,0,1.4,0,blue;segment 1.4,0,1.4,1.4,blue;segment 0,0,1.4,1.4,red],html\
19
cn,9,0,[segment 0,0,1.4,0,blue;segment 1.4,0,1.4,1.4,blue;segment 0,0,1.4,1.4,red],html\
20
cn,10,0,[segment 0,0,1.4,0,blue;segment 1.4,0,1.4,1.4,blue;segment 0,0,1.4,1.4,red],html\
21
dn,7,0,[segment 0.5,0.7,1,1,green;trange 0,1;plot red,t,sin(t)],html\
13601 bpr 22
dn,12,10,[segment 0.5,0.7,1,1,green;trange 0,1;plot red,t,sin(t)],html,400\
23
dn,3,10,[segment 0.5,0.7,1,1,green;trange 0,1;plot red,t,sin(t)]
24
 
13600 czzmrn 25
slib_require=pari
26
 
27
!exit
28
 
29
:proc
30
 
31
!distribute items $wims_read_parm into slib_cndn, slib_n,slib_startang,slib_disegno,slib_url,slib_size
32
slib_disegno=!declosing $slib_disegno
33
!! eventualmente calcolare  ?? option
34
slib_xrange=-2,2
35
slib_yrange=-2,2
36
!default slib_size=200
37
 
38
slib_out=xrange $slib_xrange\
39
yrange $slib_yrange\
40
linewidth 3
41
 
42
!! it works with flydraw, has to be tested with canvasdraw
43
 
44
!for slib_i = 0 to $slib_n-1
45
  slib_angolo=$[round(((360*$slib_i)/$slib_n)+$slib_startang)]
46
  !if $slib_cndn iswordof dn
47
    slib_matr=[cos(2*pi*$slib_i/$slib_n), -sin (2*pi*$slib_i/$slib_n); -sin(2*pi*$slib_i/$slib_n),-cos(2*pi*$slib_i/$slib_n)]*[cos(2*pi*$slib_startang/360),sin(2*pi*$slib_startang/360);-sin(2*pi*$slib_startang/360),cos(2*pi*$slib_startang/360)]
48
    slib_matr=!exec pari $slib_matr
49
    slib_matr=!replace internal ; by , in $slib_matr
50
    slib_out=$slib_out\
51
    linear $slib_matr\
52
    $slib_disegno\
53
    killlinear
54
  !endif
55
  slib_out=$slib_out\
56
  rotate $slib_angolo\
57
  $slib_disegno\
58
  killrotate
59
!next
60
!if url iswordof $slib_url or html iswordof $slib_url
61
  insdraw_size=$slib_size,$slib_size
62
  !insdraw $slib_out
63
  slib_out=$ins_url
64
  !if html iswordof $slib_url
17173 bpr 65
    slib_out=<img src="$ins_url" alt="">
13600 czzmrn 66
  !else
67
    slib_out=$slib_out,$insdraw_size
68
  !endif
69
!endif
70
 
71