rtoy / maxima

A Clone of Maxima's repo
Other
0 stars 0 forks source link

VTK 8.2.0 cannot render some explicit functions in R^3 #2867

Open rtoy opened 3 months ago

rtoy commented 3 months ago

Imported from SourceForge on 2024-07-07 00:07:57 Created by tomio-arisaka on 2021-07-07 11:40:54 Original: https://sourceforge.net/p/maxima/bugs/3808


The next web-page describes how to draw explicit functions in R^3 with VTK. (Thanks to Mario Rodríguez Riotorto) http://riotorto.users.sourceforge.net/Maxima/vtk/explicit/index.html

VTK 8.2.0 cannot render the following explicit functions in R^3. (But VTK 8.0.1 has no problems)

(1) An example of the "Make use of zrange option in the presence of poles" item: http://riotorto.users.sourceforge.net/Maxima/vtk/explicit/index.html#zrange1

(%i1) load ("draw");
(%o1)         /opt/local/share/maxima/5.45.1/share/draw/draw.lisp
(%i2) draw_renderer : 'vtk7;
(%o2)                                vtk7
(%i3) 
draw3d(
  zrange     = [-10,15],
  enhanced3d = [sin(x)+cos(y),x,y],
  isolines   = [sin(x)+cos(y),x,y],
  explicit(1/(x^2+y^2), x, -3, 3, y, -3, 3)) $

The output is "zrange1-8.2.0.png"

(2) An example of the "Another use of zrange" item: http://riotorto.users.sourceforge.net/Maxima/vtk/explicit/index.html#zrange2

(%i1) load ("draw");
(%o1)         /opt/local/share/maxima/5.45.1/share/draw/draw.lisp
(%i2) draw_renderer : 'vtk7;
(%o2)                                vtk7
(%i3) 
draw3d(
  zrange = [-5,5],
  explicit(x^2+y^2, x, -1, 1, y, -1, 1),
  color  = red,
  explicit(1/(x+y), x, -2, 2, y, -2, 2)) $

The output is "zrange2-8.2.0.png"

(3) An example of the "Complex valued gamma function, Γ(z) " item: http://riotorto.users.sourceforge.net/Maxima/vtk/explicit/index.html#gamma

(%i1) load ("draw");
(%o1)         /opt/local/share/maxima/5.45.1/share/draw/draw.lisp
(%i2) draw_renderer : 'vtk7;
(%o2)                                vtk7
(%i3) 
draw3d(
  zrange          = [0,6],
  xu_grid         = 100,
  yv_grid         = 100,
  isolines        = true,
  isolines_levels = [0,0.1,6],
  explicit(cabs(gamma(x+%i*y)),x,-4,4,y,-3,3)) $

The output is "gamma-8.2.0.png"

(4) An example of the "Complex valued error function, erf(z) " item: http://riotorto.users.sourceforge.net/Maxima/vtk/explicit/index.html#error

(%i1) load ("draw");
(%o1)         /opt/local/share/maxima/5.45.1/share/draw/draw.lisp
(%i2) draw_renderer : 'vtk7;
(%o2)                                vtk7
(%i3) 
draw3d(
  zrange     = [-10,10],
  enhanced3d = [z,x,y,z],
  xu_grid    = 200,
  yv_grid    = 200,
  isolines   = true,
  explicit(cabs(erf(x+y*%i)), x, -5, 5, y, -5, 5) ) $

The output is "error-8.2.0.png"

(5) An example of the "Complex valued Riemann's zeta function, ζ(z)" item: http://riotorto.users.sourceforge.net/Maxima/vtk/explicit/index.html#riemann

(%i1) load ("draw");
(%o1)         /opt/local/share/maxima/5.45.1/share/draw/draw.lisp
(%i2) draw_renderer : 'vtk7;
(%o2)                                vtk7
(%i3) 
draw3d(
  zrange          = [0,60],
  xu_grid         = 100,
  yv_grid         = 100,
  isolines        = true,
  isolines_levels = [0,0.2,6],
  explicit(cabs(zeta(x+%i*y)),x,-20,20,y,-30,30)) $

The output is "riemann-8.2.0.png"

My environment of Maxima:

$ sw_vers
ProductName:    Mac OS X
ProductVersion: 10.13.6
BuildVersion:   17G14042
$ 
$ port installed vtk and active
The following ports are currently installed:
  vtk @8.2.0_7+python38+qt5 (active)
$ 
$ vtkpython --version
Python 3.8.11
$ 
$ maxima --quiet --batch-string='build_info();'
(%i1) build_info()
(%o1) 
Maxima version: "5.45.1"
Maxima build date: "2021-06-21 23:47:20"
Host type: "x86_64-apple-darwin17.7.0"
Lisp implementation type: "SBCL"
Lisp implementation version: "2.1.5"
  ...

Attachments:

rtoy commented 3 months ago

Imported from SourceForge on 2024-07-07 00:07:58 Created by tomio-arisaka on 2021-07-07 11:53:45 Original: https://sourceforge.net/p/maxima/bugs/3808/#de0c


VTK 8.0.1 has no problems. See attached png files. They are outputs of VTK 8.0.1.

Attachments: