File: batman_gnuplot_bug.in

package info (click to toggle)
mathomatic 16.0.5-5.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,192 kB
  • sloc: ansic: 22,029; makefile: 340; sh: 319; python: 96; awk: 39
file content (14 lines) | stat: -rw-r--r-- 1,332 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14

; Read this in with mathomatic, not rmath nor matho.
; These are the Batman equations.
; They plot the Batman logo using many absolute value functions with gnuplot.
; This plot proves gnuplot has a bug in it, because it doesn't come out quite right.
; There are 4 expressions simultaneously plotted here;
; it is the first, and longest, expression that comes out wrong.
; If you plot this in Google or Lybniz, it comes out right.

plot 1.5*sqrt((-abs(abs(x)-1))*abs(3-abs(x))/((abs(x)-1)*(3-abs(x))))*(1+abs(abs(x)-3)/(abs(x)-3))*sqrt(1-(x/7)^2)+(4.5+0.75*(abs(x-0.5)+abs(x+0.5))-2.75*(abs(x-0.75)+abs(x+0.75)))*(1+abs(1-abs(x))/(1-abs(x))),(-3)*sqrt(1-(x/7)^2)*sqrt(abs(abs(x)-4)/(abs(x)-4)),abs(x/2)-0.0913722*x^2-3+sqrt(1-(abs(abs(x)-2)-1)^2),(2.71052+1.5-0.5*abs(x)-1.35526*sqrt(4-(abs(x)-1)^2))*sqrt(abs(abs(x)-1)/(abs(x)-1))

; If readline is enabled,
; hitting the up arrow, then the Enter key, should allow a replot.
:push plot 1.5*sqrt((-abs(abs(x)-1))*abs(3-abs(x))/((abs(x)-1)*(3-abs(x))))*(1+abs(abs(x)-3)/(abs(x)-3))*sqrt(1-(x/7)^2)+(4.5+0.75*(abs(x-0.5)+abs(x+0.5))-2.75*(abs(x-0.75)+abs(x+0.75)))*(1+abs(1-abs(x))/(1-abs(x))),(-3)*sqrt(1-(x/7)^2)*sqrt(abs(abs(x)-4)/(abs(x)-4)),abs(x/2)-0.0913722*x^2-3+sqrt(1-(abs(abs(x)-2)-1)^2),(2.71052+1.5-0.5*abs(x)-1.35526*sqrt(4-(abs(x)-1)^2))*sqrt(abs(abs(x)-1)/(abs(x)-1))