Ask Your Question

toricweb's profile - activity

2022-07-20 11:52:04 +0200 received badge  Popular Question (source)
2020-09-08 16:28:05 +0200 received badge  Necromancer (source)
2020-09-08 16:28:05 +0200 received badge  Teacher (source)
2020-05-28 19:17:07 +0200 received badge  Nice Question (source)
2020-02-25 01:33:43 +0200 received badge  Famous Question (source)
2018-11-15 13:39:53 +0200 received badge  Notable Question (source)
2018-09-05 11:28:30 +0200 received badge  Popular Question (source)
2018-02-28 21:39:40 +0200 answered a question jmol cannot run while plot3d

This is what I get it to work.

  1. Run

/usr/libexec/java_home -V

  1. Identify version 8 of Java, and remove the others using a command like

rm -rf /Library/Java/JavaVirtualMachines/jdk-9.0.1.jdk/

(with the version suitably changed; also you'll probably have to run this as sudo)

It turns out that JMol is incompatible with version 9, which I originally had. After getting rid of version 9, closing the shell session and restarting it, I am now able to plot 3d objects in Sagemath through JMol.

2017-11-15 22:09:44 +0200 received badge  Scholar (source)
2017-11-15 22:09:44 +0200 commented answer Visualizing Toric fans in Sage

Thank you, Dan! Sorry for my late reply. This is indeed helpful. I meant "dual toric diagram" not "dual fan" (thanks for correcting me). What if I had to go backward (dual of dual toric diagram)? Would this method still work?

If you see, essentially what I want to do is generate either one of Figure 2.3 given the other.

2017-11-10 22:31:01 +0200 received badge  Student (source)
2017-11-09 21:42:47 +0200 asked a question Visualizing Toric fans in Sage

I am learning basics of toric geometry as applied to physics. I would like to know if there's a way to visualize toric fans using Sagemath, and also draw dual toric diagrams.

For example, if I give explicit coordinates of vectors defining a fan, can I visualize the fan and also its dual toric fan using Sage?

I have found resources on the net about using Sage for toric varieties, but I am currently looking for answers to much simpler questions.

2017-11-08 00:17:01 +0200 commented answer Sage on Mac unable to use plot3d due to Java/jmol issues

Thanks, Dan. I don't seem to have canvas3d; the graphics quality using tachyon is very poor for some reason: the figure appears dithered.

sage: from sage.interfaces.jmoldata import JmolData

sage: jdata = JmolData()

sage: jdata.is_jvm_available()


sage: import subprocess

sage: print subprocess.check_output(['java', '-version'], stderr=subprocess.STDOUT)

java version "9.0.1"

Java(TM) SE Runtime Environment (build 9.0.1+11)

Java HotSpot(TM) 64-Bit Server VM (build 9.0.1+11, mixed mode)

2017-11-08 00:13:40 +0200 commented answer Sage on Mac unable to use plot3d due to Java/jmol issues

Thanks eric_g! This worked. But it launches a browser (Safari, in my case). Is there a way to get it to work like jmol would (i.e. without a browser)?

2017-11-07 17:39:01 +0200 asked a question Sage on Mac unable to use plot3d due to Java/jmol issues


I am a relative newbie to the Mac and Sage on the Mac. I tried to run the following code from the Sage tutorial on my Mac in the console mode of sage:

sage: x, y = var('x,y')

sage: plot3d(x^2 + y^2, (x,-2,2), (y,-2,2))

The error message I get is

--------------------------------------------------------------------------- RuntimeError
Traceback (most recent call last) <ipython-input-2-878191366deb> in <module>() ----> 1 plot3d(xInteger(2) + yInteger(2), (x,-Integer(2),Integer(2)), (y,-Integer(2),Integer(2)))

/Applications/SageMath/local/lib/python2.7/site-packages/IPython/core/displayhook.pyc in __call__(self, result) 244 self.start_displayhook() 245 self.write_output_prompt() --> 246 format_dict, md_dict = self.compute_format_data(result) 247 self.update_user_ns(result) 248 self.fill_exec_result(result)

/Applications/SageMath/local/lib/python2.7/site-packages/IPython/core/displayhook.pyc in compute_format_data(self, result) 148 149 """ --> 150 return 151 152 # This can be set to True by the write_output_prompt method in a subclass

/Applications/SageMath/local/lib/python2.7/site-packages/sage/repl/display/formatter.pyc in format(self, obj, include, exclude) 158 # First, use Sage rich output if there is any 159 PLAIN_TEXT = u'text/plain' --> 160 sage_format, sage_metadata = 161 assert PLAIN_TEXT in sage_format, 'plain text is always present' 162 if sage_format.keys() != [PLAIN_TEXT]:

/Applications/SageMath/local/lib/python2.7/site-packages/sage/repl/rich_output/display_manager.pyc in displayhook(self, obj) 806 self._backend.set_underscore_variable(obj) 807 plain_text, rich_output = self._rich_output_formatter(obj, dict()) --> 808 return self._backend.displayhook(plain_text, rich_output) 809 810 def display_immediately(self, obj, **rich_repr_kwds):

/Applications/SageMath/local/lib/python2.7/site-packages/sage/repl/rich_output/backend_ipython.pyc in displayhook(self, plain_text, rich_output) 264 return ({u'text/plain': msg}, {}) 265 elif isinstance(rich_output, OutputSceneJmol): --> 266 msg = self.launch_jmol(rich_output, plain_text.text.get_unicode()) 267 return ({u'text/plain': msg}, {}) 268 elif isinstance(rich_output, OutputSceneWavefront):

/Applications/SageMath/local/lib/python2.7/site-packages/sage/repl/rich_output/backend_ipython.pyc in launch_jmol(self, output_jmol, plain_text) 367 jdata = JmolData() 368 if not jdata.is_jvm_available() and not DOCTEST_MODE: --> 369 raise RuntimeError('jmol cannot run, no suitable java version found') 370 launch_script = output_jmol.launch_script_filename() 371 from sage.env import SAGE_LOCAL

RuntimeError: jmol cannot run, no suitable java version found

I believe I have the latest version of Java installed:

$ java --version java 9.0.1 Java(TM) SE Runtime Environment (build 9.0.1+11) Java HotSpot(TM) 64-Bit Server VM (build 9.0.1+11, mixed mode)

Sage version

$ sage --version SageMath version 8.0, Release Date: 2017-07-21

I would appreciate any inputs and advice about how to fix this issue. Thanks in advance!