Two parametric FNE functions on HPlot3DP canvas
Code: "func_param4.py". Programming language: Python
DMelt Version 1. Last modified: 12/11/2015. License: Pro
https://datamelt.org/code/cache/func_param4_2762.py
To run this script using the DMelt IDE,
copy the above URL link to the menu [File]→[Read script from URL] of the DMelt IDE.
from java.awt import Color
from jhplot import *
c1 = HPlot3DP("Canvas",500,600)
c1.setGTitle('Sphere and torus')
c1.visible()
f1=FPR('r=0.7; u=2 Pi u; v=Pi v; \
x=r cos(u) sin(v); y=r sin(u) sin(v); z=r cos(v)')
f1.setDivisions(50,50)
f1.setLineColor(Color.blue);
f2=FPR('u=2 Pi u; v=2 Pi v; r=.7+.2cos(u); z=.2 sin(u)-0.5; x=r cos(v); y=r sin(v)')
f2.setDivisions(30,30)
f2.setFillColor( Color(20,170,170) )
c1.draw(f1)
c1.draw(f2)
You see the box below because you did not login.