Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
sagemath
GitHub Repository: sagemath/sagesmc
Path: blob/master/src/sage/plot/java3d.py
8815 views
1
r"""
2
Interactive OpenGL based 3D
3
4
TESTS:
5
6
Make sure this module can be imported properly::
7
8
sage: import sage.plot.java3d
9
"""
10
11
#*****************************************************************************
12
# Copyright (C) 2007 Robert Bradshaw <[email protected]>
13
#
14
# Distributed under the terms of the GNU General Public License (GPL)
15
# as published by the Free Software Foundation; either version 2 of
16
# the License, or (at your option) any later version.
17
# http://www.gnu.org/licenses/
18
#*****************************************************************************
19
20
21
from sagenb.notebook.applet import Applet
22
23
sun_libs = ["libs/objtest.jar", "applet-launcher.jar", "j3dcore.jar", "j3dutils.jar", "vecmath.jar", "jogl.jar", "gluegen-rt.jar"]
24
sun_params = { "codebase_lookup": "false",
25
"subapplet.classname": "org.sagemath.sage3d.ObjectViewerApplet",
26
"subapplet.displayname": "Sage Java 3-D Viewer",
27
"jnlpNumExtensions": 1,
28
"jnlpExtension1": "/java/3d/sun-libs/java3d-latest.jnlp",
29
"progressbar": "true",
30
"noddraw.check":"true"
31
}
32
33
34
class Java3DApplet(Applet):
35
def __init__(self, width=400, height=400, inline=None):
36
Applet.__init__(self,
37
code = "org.jdesktop.applet.util.JNLPAppletLauncher",
38
width = width,
39
height = height,
40
archive = ["lib/sage3d.jar"] + ["sun-libs/" + lib for lib in sun_libs],
41
codebase = "3d",
42
params = sun_params)
43
44
45