 |
Show dots in interactive 3D display using VisAd
Source code name: "hvisadd_P2D_dots.py"
Programming language: Python
Topic: Data arrays/P2D
DMelt Version 1.4. Last modified: 07/09/1971. License: Pro
https://datamelt.org/code/cache/hvisadd_P2D_dots_1410.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 *
c1 = HVisAd("VisAd")
display=c1.getDisplay()
cont=display.getGraphicsModeControl()
cont.setLineWidth(1)
ren=c1.getRender(); ren.setBoxOn(True) # draw a box
from java.util import Random
r=Random()
X,Y,Z=[],[],[]
p=P2D("data")
for j in range(10000):
p.add(r.nextGaussian(),r.nextGaussian(),r.nextGaussian())
c1.setAxes("X",-4,4,"Y",-4,4,"Z",-4,4)
c1.draw(p)
c1.visible() # show canvas
You see the box below because you did not login.