File: pendg3.mpl

package info (click to toggle)
scilab 4.0-12
  • links: PTS
  • area: non-free
  • in suites: etch, etch-m68k
  • size: 100,640 kB
  • ctags: 57,333
  • sloc: ansic: 377,889; fortran: 242,862; xml: 179,819; tcl: 42,062; sh: 10,593; ml: 9,441; makefile: 4,377; cpp: 1,354; java: 621; csh: 260; yacc: 247; perl: 130; lex: 126; asm: 72; lisp: 30
file content (15 lines) | stat: -rw-r--r-- 422 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# Copyright INRIA

# sliding pendulum: curve #3

X:=x->x-2*k3*x*sin(k1*sqrt(1+4*k3^2*x^2))/sqrt(1+4*k3^2*x^2)/k2;
Y:=x->k3*x^2+sin(k1*sqrt(1+4*k3^2*x^2))/sqrt(1+4*k3^2*x^2)/k2;
k1:=20; k2:=18; k3:=1/2;
plot([X(x),Y(x),x=-1..1],scaling=CONSTRAINED);

k1:='k1'; k2:='k2'; k3:='k3';
FX:=1/diff(X(x),x);
FX:=simplify(eval(FX,1+4*k3^2*x^2=S^2),symbolic);
FY:=-1/diff(Y(x),x);
FY:=simplify(eval(FY,1+4*k3^2*x^2=S^2),symbolic);