Subversion Repositories wimsdev

Rev

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

Rev Author Line No. Line
539 bpr 1
!goto $wims_read_parm
2
 
3
:def
4
title=Tracée de courbe implicite
5
synonyme=tracée implicite, tracer courbe implicite, courbe implicite 2D,tracer courbe plane implicite, courbe plane implicite
6
input=equation
7
!exit
8
 
9
:proc
10
formula=!item 1 of $formula
11
fml=!mathsubst X=x in $fml
12
fml=!mathsubst Y=y in $fml
13
eq==
14
!if $eq isin $formula
15
 f=!translate internal = to , in $formula
16
 !distribute items $f into f1,f2
17
 !if $f2=$empty or $f1=$empty
18
  error=bad_formula
19
  !exit
20
 !endif
21
 fml=$f1 - ($f2)
22
!else
23
 fml=$formula
24
!endif
25
result=$fml
26
x1=$[$xrange1]
27
x2=$[$xrange2]
28
y1=$[$yrange1]
29
y2=$[$yrange2]
30
s1=$[$picturesize1]
31
s2=$[$picturesize2]
32
!distribute item -2,2,-2,2,260,260 into dx1,dx2,dy1,dy2,ds1,ds2
33
!for r in x1,x2,y1,y2,s1,s2
34
 !if NaN isin $($r)
35
  $r=
36
 !endif
37
 !default $r=$(d$r)
38
!next r
39
insdraw_size=$s1,$s2
40
!exit
41
 
42
:output
43
Courbe plane implicite définie par
44
!htmlmath $formula
45
 :
6055 bpr 46
 <div class="wimscenter">
539 bpr 47
!insdraw xrange $x1,$x2\
48
yrange $y1,$y2\
49
arrow $x1,0,$x2,0,10,grey\
50
arrow 0,$y1,0,$y2,10,grey\
51
levelcurve red,$fml,0
52
 
6055 bpr 53
</div>
539 bpr 54
!exit
55