Page 1 of 1

Transparency in jreality

Posted: 04 Feb 2011, 13:34
by hkopp
Hallo,
I'm trying to get jreality to draw my stuff transparent, but it doesn't seem to work.

As i have understood, The FacetColor is a float between 0 and 1, where 0 is opague and 1 is translucent.
Here is the link to the section in the documentation:
http://wwwopt.mathematik.tu-darmstadt.d ... .html#i232

So, if I try

Code: Select all

simplex(3)->VISUAL(FacetColor=>'red',FacetTransparency=>'0.4');
I get a simplex, but, the FacetColor does not seem to matter, i.e. I tried

Code: Select all

simplex(3)->VISUAL(FacetColor=>'red',FacetTransparency=>'0');
and

Code: Select all

simplex(3)->VISUAL(FacetColor=>'red',FacetTransparency=>'1');
and even

Code: Select all

simplex(3)->VISUAL(FacetColor=>'red',FacetTransparency=>'10000');
and I always get the same opacity.

Best regards
hkopp

Re: Transparency in jreality

Posted: 04 Feb 2011, 18:21
by joswig
It's true, currently the jreality interface seems to treat FacetTransparency as a switch. Facet transparency is switched on no matter what the value is. It does work with the javaview interface though. A value of '0.0' means no transparency, and '1.0' is like clear glass.

So a typical (working) example would be the following.

Code: Select all

javaview(simplex(3)->VISUAL(FacetColor=>'red',FacetTransparency=>'0.3'));
It should be possible, however, to deal with transparency in jreality via the GUI (switch on left panel by alt-left arrow). In order to get the GUI react to moving the sliders you might have to clear attributes/appearance in the "Polymake" menu first.

There is yet another issue. jreality is able of storing default parameters in the directory $HOME/.polymake. This can result in additional interference.

Further explanations require a visualization expert.

Re: Transparency in jreality

Posted: 16 Feb 2011, 14:37
by roerig
Apparently there was a problem with the transparency attribute in the jReality interface. I fixed it in the svn-repository and have attached a new version of the corresponding file.

Please replace the file apps/common/perllib/JReality.pm in your polymake-directory. If you have installed polymake from sources the polymake directory usually is /usr/local/share/polymake.

Re: Transparency in jreality

Posted: 22 Feb 2011, 12:46
by hkopp
Thank you roerig, now it seems to function for the range 0 < x <= 1. But for tranparency=0, it is still now opaque.

Best regards
hkopp

Re: Transparency in jreality

Posted: 22 Feb 2011, 13:26
by gawrilow
... But for transparency=0, it is still now opaque.
transparency=0 means opaque, where is the problem?

Re: Transparency in jreality

Posted: 22 Feb 2011, 13:47
by hkopp
sorry, I meant transparent.
So 0.1 is to me more opaque than just 0.

Best regards
hkopp