You are a guest. Restricted access. Read more

2D functions

Functions in 2 dimensions can be build analogously using the Java class F2D. The example below shows how to construct and evaluate a function 2D:


from jhplot  import F2D
f = F2D("2*exp(-x*y/50)+sin(pi*x)/y")
print f.eval(10,20)

To show F2D function, use the canvas HPlot3D. In this example we shows 2 functions on top of each other:


from jhplot  import F2D, HPlot3D
c1 = HPlot3D("Canvas")
c1.visible()
c1.setNameX("X"); c1.setNameY("Y")
f1 = F2D("2*exp(-x*y/4)", -2.0, 5.0, -2.0, 5.0)
f2 = F2D("4*x*y", -2.0, 5.0, -2.0, 5.0)
c1.draw(f1,f2)

scavis/functions/f2d.txt · Last modified: 2013/04/14 16:52 (external edit)
Back to top
CC Attribution-Share Alike 3.0 Unported
chimeric.de = chi`s home Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0