HP Forums
Graph 3D and Piecewise functions - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: HP Prime (/forum-5.html)
+--- Thread: Graph 3D and Piecewise functions (/thread-22010.html)



Graph 3D and Piecewise functions - MigPrime - 07-08-2024 03:20 PM

I'm using Graph 3D and a Piecewise function specification to display a Bessel function J1(r) over a full range. The function uses two parts defined over its argument r=Sqrt(X^2 + Y^2).
The two parts are defined in FZ1(X,Y) and FZ2(X,Y) and the Piecewise funtion to plot is :
FZ4(X,Y) = PIECEWISE(√(X^2+Y^2)<3,FZ1(X,Y),√(X^2+Y^2)≥3,FZ2(X,Y))

If I plot each part FZ1 and FZ2 separately, they look fine and checked values (zeros, max etc ) are accurate (except for range where each aren't valid). An example of FZ2 alone is below exactly as expected. FZ1 over other region is ok too.

The combined Piecewise plot (FZ4 plotted only) shows the two merged and the values were checked and are ok with continuity where FZ2 and FZ2 meet at r=3.0.

My question is what causes those lines in the rendering? They don't show up in either FZ1 or FZ2 plotted alone.

I checked this in both the virtual calculator and my HP Prime G2 and they both show the rendering "artifacts". Virtual calculator on Win11 Dell XPS 15 9510 is quite fast (but crashes fairly often) but HP Prime G2 doesn't crash but is quite slow (expressions for FZ1 and 2 are quite long polynomial fit expressions )

[attachment=13697][attachment=13698]