Visualization tools and Mac

Questions and problems about using polymake go here.
i96
Posts: 10
Joined: 03 Apr 2015, 12:41

Visualization tools and Mac

Postby i96 » 15 Apr 2015, 11:22

I am trying to use polymake on a Mac (OS 10.10) and, unfortunately, I cannot apply any visualization tool.

For example, the program just returns nothing after

Code: Select all

polytope > $c = cube(2); polytope > $c->VISUAL;
Should I additionally install some packages (e.g. JavaView) for visualization tools to work?
There is a line

Code: Select all

Loading applications now...dyld: Library not loaded: /Users/andreas/polymake/polybundle/polymake.app/Contents/Resources/lib/libSingular-4.0.2.dylibCan
in the beginning. Can the problem be related to that?
I should notice that my Macbook was produced in 2011 and there was a footnote that "you need a Macbook from Fall 2013", but, as it seems to me, it was rather about App bundle, which I succeded to get.

I am sorry if my problems are just because of my bad knowledge of Terminal and other such things.
Thank a lot.

User avatar
joswig
Main Author
Posts: 280
Joined: 24 Dec 2010, 11:10

Re: Visualization tools and Mac

Postby joswig » 15 Apr 2015, 12:39

Please try to use

Code: Select all

threejs($c->VISUAL);
for browser/javascript based visualization. If this works, you can make it the default via

Code: Select all

prefer("threejs");
Afterwards

Code: Select all

$c->VISUAL;
should work.

paffenholz
Developer
Posts: 211
Joined: 24 Dec 2010, 13:47

Re: Visualization tools and Mac

Postby paffenholz » 15 Apr 2015, 14:26

I am trying to use polymake on a Mac (OS 10.10) and, unfortunately, I cannot apply any visualization tool.

For example, the program just returns nothing after

Code: Select all

polytope > $c = cube(2); polytope > $c->VISUAL;
Should I additionally install some packages (e.g. JavaView) for visualization tools to work?
There is a line

Code: Select all

Loading applications now...dyld: Library not loaded: /Users/andreas/polymake/polybundle/polymake.app/Contents/Resources/lib/libSingular-4.0.2.dylibCan
in the beginning. Can the problem be related to that?
I should notice that my Macbook was produced in 2011 and there was a footnote that "you need a Macbook from Fall 2013", but, as it seems to me, it was rather about App bundle, which I succeded to get.

I am sorry if my problems are just because of my bad knowledge of Terminal and other such things.
Thank a lot.
The two problems are unrelated.

Visualization with jreality is actually built into the bundle, but the precompiled binaries have to make some assumptions on the location of certain system tools, which might be located at a different place on Macs prior to 2013. We'll try to investigate this. Does the visualization command show any arror message, or do you just get the polymake prompt back and no other window opens (potentially in the background)? It should show up as "java" in the Dock and Application Switcher.

The second error suggests that an absolute path to a library file has found its way into the released bundle, which should not have happened. I cannot find the incriminating library in the recent builds of the bundle. Can you please post which of the bundles you have downloaded, and when?

Andreas

i96
Posts: 10
Joined: 03 Apr 2015, 12:41

Re: Visualization tools and Mac

Postby i96 » 16 Apr 2015, 11:54

Please try to use

Code: Select all

threejs($c->VISUAL);
for browser/javascript based visualization. If this works, you can make it the default via
Oh, I'm sorry, but I could not get this to work.
I tried the following:

Code: Select all

polytope > threejs($c->VISUAL); polymake: ERROR: requires web browser; please specify the output File option or call reconfigure("common::threejs.rules"); polytope > reconfigure("common::threejs.rules"); Could not find the web browser anywhere along your PATH. Please enter the full path or an empty string to abort. [program path] > /Applications/Safari.app /Applications/Safari.app is either not a regular file or not executable Please enter a correct location or an empty string to abort.
I also tried

Code: Select all

threejs($c->VISUAL,File=>"a");
That creates a page which refers to files like "js/three.js", "js/Detector.js", and I do not know where they are (can they be hidden?..).

i96
Posts: 10
Joined: 03 Apr 2015, 12:41

Re: Visualization tools and Mac

Postby i96 » 16 Apr 2015, 12:15

Thank you.
Does the visualization command show any arror message, or do you just get the polymake prompt back and no other window opens (potentially in the background)? It should show up as "java" in the Dock and Application Switcher.
I am not sure about how to call such a situation, after the moment I write

Code: Select all

polytope > $c->VISUAL;
there is just nothing, no new line "polytope >" in particular. And nothingsseems to open at this time.
The second error suggests that an absolute path to a library file has found its way into the released bundle, which should not have happened. I cannot find the incriminating library in the recent builds of the bundle. Can you please post which of the bundles you have downloaded, and when?
I would like to be able to answer this question, but I am not, I am sorry. It seems to me that I have installed something of this type, but I do not remember any details (I know, it is not right, but since I did it without proper understanding it just got out of my mind) and I do not know where can I look for it.

paffenholz
Developer
Posts: 211
Joined: 24 Dec 2010, 13:47

Re: Visualization tools and Mac

Postby paffenholz » 16 Apr 2015, 12:17

Please try to use

Code: Select all

threejs($c->VISUAL);
for browser/javascript based visualization. If this works, you can make it the default via
Oh, I'm sorry, but I could not get this to work.
I tried the following:

Code: Select all

polytope > threejs($c->VISUAL); polymake: ERROR: requires web browser; please specify the output File option or call reconfigure("common::threejs.rules"); polytope > reconfigure("common::threejs.rules"); Could not find the web browser anywhere along your PATH. Please enter the full path or an empty string to abort. [program path] > /Applications/Safari.app /Applications/Safari.app is either not a regular file or not executable Please enter a correct location or an empty string to abort.
I also tried

Code: Select all

threejs($c->VISUAL,File=>"a");
That creates a page which refers to files like "js/three.js", "js/Detector.js", and I do not know where they are (can they be hidden?..).
Threejs currently does not work with the bundled version of polymake. As a workaround you can fix the saved file: Prepend the load path of the five lines starting with "<script src=js/..." at the beginning of the saved file with

Code: Select all

/Applications/polymake.app/Contents/Resources/polymake/share/polymake/resources/threejs
, i.e. they should read

Code: Select all

<script src="/Applications/polymake.app/Contents/Resources/polymake/share/polymake/resources/threejs/js/three.js"></script> <script src="/Applications/polymake.app/Contents/Resources/polymake/share/polymake/resources/threejs/js/Detector.js"></script> <script src="/Applications/polymake.app/Contents/Resources/polymake/share/polymake/resources/threejs/js/controls/TrackballControls.js"></script> <script src="/Applications/polymake.app/Contents/Resources/polymake/share/polymake/resources/threejs/js/renderers/CanvasRenderer.js"></script> <script src="/Applications/polymake.app/Contents/Resources/polymake/share/polymake/resources/threejs/js/renderers/Projector.js"></script>
This assumes that you have placed the polymake bundle in the applications folder.

i96
Posts: 10
Joined: 03 Apr 2015, 12:41

Re: Visualization tools and Mac

Postby i96 » 16 Apr 2015, 12:26

As a workaround you can fix the saved file: Prepend the load path of the five lines starting with "<script src=js/..." at the beginning of the saved file with

Code: Select all

/Applications/polymake.app/Contents/Resources/polymake/share/polymake/resources/threejs
Well, that does work, thank you!


Return to “Helpdesk”