DMelt:Math/2 Parametric Functions
From HandWiki
Revision as of 10:57, 14 February 2021 by imported>Jworkorg
Member
Parametric functions
Parametric functions can be constructed using the Java class jhplot.FPR.
The variables "u" and "v" are parametric variables used to build "x,y,z".
To display such functions, use the canvas
jhplot.HPlot3DP.
Lets us show an example of creating two parametric function:
from java.awt import Color from jhplot import * c1 = HPlot3DP("Canvas",600,600,2,1) c1.setGTitle('3D surfaces') c1.visible(); f1=FPR('u=2 Pi u; z=1.5*(v-.5); x=z cos(u)*.8-0; y=z sin(u)*.8+0') f1.setFillColor(Color.green) f2=FPR('u=2 Pi u; x=cos(u)*.5+.1; y=sin(u)*.5+.1; z=1.5*(v-.5)') c1.cd(1,1) c1.draw(f1) c1.cd(2,1) c1.draw(f2)
The output of this script is shown here
As you can see, one can overlay several functions on top of each other and set the transparency level.
Here are some examples:
![]() |