Transparency in jreality

Questions and problems about using polymake go here.
hkopp
Posts: 9
Joined: 04 Feb 2011, 13:21

Transparency in jreality

Postby hkopp » 04 Feb 2011, 13:34

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

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

Re: Transparency in jreality

Postby joswig » 04 Feb 2011, 18:21

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.

User avatar
roerig
Developer
Posts: 1
Joined: 07 Feb 2011, 10:32

Re: Transparency in jreality

Postby roerig » 16 Feb 2011, 14:37

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.
Attachments
JReality.pm
* fix for jReality transparency problem
* replaces apps/common/perllib/JReality.pm
(14.67 KiB) Downloaded 563 times

hkopp
Posts: 9
Joined: 04 Feb 2011, 13:21

Re: Transparency in jreality

Postby hkopp » 22 Feb 2011, 12:46

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

User avatar
gawrilow
Main Author
Posts: 423
Joined: 25 Dec 2010, 17:40

Re: Transparency in jreality

Postby gawrilow » 22 Feb 2011, 13:26

... But for transparency=0, it is still now opaque.
transparency=0 means opaque, where is the problem?

hkopp
Posts: 9
Joined: 04 Feb 2011, 13:21

Re: Transparency in jreality

Postby hkopp » 22 Feb 2011, 13:47

sorry, I meant transparent.
So 0.1 is to me more opaque than just 0.

Best regards
hkopp


Return to “Helpdesk”