PointThickness and PointBorderThickness in jreality

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

PointThickness and PointBorderThickness in jreality

Postby hkopp » 01 Mar 2011, 00:25

Hallo,
It's me again with a visualization issue ;-)

Code: Select all

$t=new Polytope<Rational>(POINTS=>[[1,0,0,0],[1,1,0,0],[1,0,1,0]]); $t->VISUAL(PointThickness=>'0.1'); $t->VISUAL(PointThickness=>'1.5'); $t->VISUAL(PointThickness=>'1.9');
All these commands give me the same thickness of the points, whereas

Code: Select all

$t->VISUAL(PointThickness=>'2'); $t->VISUAL(PointThickness=>'2.9');
gives me thicker points, but the two commands are nevertheless the same.
Perhaps, polymake thinks, that the PointThickness is an integer and not a float.

The PointBorderThickness is also strange:

Code: Select all

$t->VISUAL(PointBorderThickness=>'1'); $t->VISUAL(PointBorderThickness=>'2'); $t->VISUAL(PointBorderThickness=>'3'); $t->VISUAL(PointBorderThickness=>'50');
are to me all the same

Best regards
hkopp

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

Re: PointThickness and PointBorderThickness in jreality

Postby gawrilow » 01 Mar 2011, 15:38

Perhaps, polymake thinks, that the PointThickness is an integer and not a float.
There was indeed a mistake, deep in the interface to JReality.
Please find the attached patch.
The PointBorderThickness is also strange
This attribute is currently recognized by PostScript generator only, which uses to draw points as rectangular boxes with thin border. JReality models points as balls, it's unclear what could be a senseful interpretation of border thickness here.
Attachments
JReality-thickness.patch
(2.22 KiB) Downloaded 484 times

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

Re: PointThickness and PointBorderThickness in jreality

Postby hkopp » 03 Mar 2011, 18:50

Thank you, but how can I apply the patch?

And sorry for the stuff with PointBorderThickness. It doesn't make any sense in this context. In fact I was searching for the Parameter EdgeThickness.

Thank you very much
hkopp

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

Re: PointThickness and PointBorderThickness in jreality

Postby gawrilow » 03 Mar 2011, 22:39

Code: Select all

cd TOP_DIRECTORY_OF_POLYMAKE patch -p2 <DOWNLOAD_DIRECTORY/JReality-thickness.patch
EdgeThickness has suffered from the same bug, with this patch it should work as well.
Last edited by gawrilow on 10 Mar 2011, 21:02, edited 1 time in total.

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

Re: PointThickness and PointBorderThickness in jreality

Postby hkopp » 08 Mar 2011, 11:46

I did
cd /usr/local/share/polymake
sudo patch -p0 <DOWNLOAD_DIRECTORY/JReality-thickness.patch
but my Computer doesn't respond.
Where is my problem?

Best regards
hkopp

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

Re: PointThickness and PointBorderThickness in jreality

Postby gawrilow » 08 Mar 2011, 12:00

Where is my problem?
Probably sudo tries to ask you for your (or root's) password, but can't read it because you've redirected the input. You should call sudo with some other harmless command so that it caches your password for a while. Alternatively, you can set the option NOPASSWD in sudoers config file (call sudo /usr/sbin/visudo to edit it).

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

Re: PointThickness and PointBorderThickness in jreality

Postby hkopp » 10 Mar 2011, 17:53

Now it says

(Stripping trailing CRs from patch.)
patching file branches/cones-final/apps/common/perllib/JReality.pm
Hunk #1 FAILED at 134.
Hunk #2 FAILED at 285.
2 out of 2 hunks FAILED -- saving rejects to file branches/cones-final/apps/common/perllib/JReality.pm.rej

Is there anything more I can do?

Best regards
hkopp


edit:
I think I know now how patch works. It just tries to apply a diff file to another file. Then probably my problem is, that there is no such thing as /usr/local/share/polymake/branches/cones-final/apps/common/perllib/JReality.pm

There is one named /usr/local/share/polymake/apps/common/perllib/JReality.pm Is it sensible to apply the patch to that file or would that crash my whole polymake? And if not, How is it done?

Best regards hkopp

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

Re: PointThickness and PointBorderThickness in jreality

Postby gawrilow » 10 Mar 2011, 21:00

Oh, sorry, I should better have checked this before posting. The patch file was produced by trac, which has inserted extra limbs in the paths. Please call the patch command with option -p2 instead of -p0 (what means ignoring two leading components in the paths). I have now edited the command in the post above.


Return to “Helpdesk”