Geometrical shapes using 3D canvases and OpenGL
Source code name: "gem3D_hplotxyz.py"
Programming language: Python
Topic: Graphics/3D
DMelt Version 1.4. Last modified: 05/18/2016. License: Pro
https://datamelt.org/code/cache/gem3D_hplotxyz_8507.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 jhplot import *
from java.awt import Color
from java.util import Random

c1=HPlotXYZ("Hplotxyz",600,400,2,1)
c1.setGTitle("Geometrical shapes")
c1.visible(1);
c1.setTickDecimalAll(1)

c1.setColorFill(Color.red)
c1.setColorWireframe(Color.white)
c1.setWireframe(1)
c1.addSphere(1,1,1,2,2,20,20)

c1.setColorWireframe(Color.blue)
c1.setColorFill(Color.blue)
c1.addDisk(1,1,-2,1,2,50,50)
c1.update()

c1.cd(2,1)
c1.setTickDecimalAll(1)
col=Color(10,220,20,70)
c1.setColorFill(col)
c1.setColorWireframe(col)
c1.setWireframe(0)
c1.addTube(1,1,1,0.5,0.5,2,40,40)
c1.update()







You see the box below because you did not login.