Problem with OFF files

The place to talk about Stella4D, Great Stella, and Small Stella. Feel free to ask questions about them here.
Post Reply
tmo35
Posts: 5
Joined: Wed Aug 30, 2023 7:26 pm

Problem with OFF files

Post by tmo35 » Thu Sep 07, 2023 12:56 am

Hello,

I apologize if there is something here I missed, but I really cannot figure out what is wrong with my OFF files.

Attempting to open them with Stella gives the error, "Error in file <file path>, line 1, There are no vertices". but the file looks find, and I have compared against an outputted OFF from stella of the same polyhedron, (an octahedron).

Here is the file;

OFF
6 8 12
-1.00000000000000 0.00000000000000 0.00000000000000
0.00000000000000 -1.00000000000000 0.00000000000000
0.00000000000000 0.00000000000000 -1.00000000000000
0.00000000000000 0.00000000000000 1.00000000000000
0.00000000000000 1.00000000000000 0.00000000000000
1.00000000000000 0.00000000000000 0.00000000000000
3 1 2 0 255 0 0
3 2 1 5 255 0 0
3 3 1 0 255 0 0
3 1 3 5 255 0 0
3 4 2 5 255 0 0
3 2 4 0 255 0 0
3 3 4 5 255 0 0
3 4 3 0 255 0 0

I tried attaching the file itself to this post, but .off and .txt are not allowed as attachments.

Something of note, I obtained the file as the output from qhull, if that makes a difference.

Thank you!

User avatar
robertw
Site Admin
Posts: 676
Joined: Thu Jan 10, 2008 6:47 am
Location: Melbourne, Australia
Contact:

Re: Problem with OFF files

Post by robertw » Thu Sep 07, 2023 9:12 am

I just tried copying and pasting your OFF into a file and Stella opened it without complaint.

The only thing I can think of is that maybe your original file might have a BOM (byte order mark) at the start of the file. The "OFF" has to be the very first thing. Unfortunately if you open it in a text editor you probably won't see the BOM so it's hard to tell. Maybe see if qhull has options to export as plain ASCII rather than UTF-8. Or try copy/pasting into a new file.

tmo35
Posts: 5
Joined: Wed Aug 30, 2023 7:26 pm

Re: Problem with OFF files

Post by tmo35 » Thu Sep 07, 2023 4:12 pm

You are correct; powershell was adding bytes to the qhull output. Piping the output from cmd worked.

As a side note, how does Stella generate the 4D watermans? I have been trying to recreate some with a mix of the povray files on Paul Bourke's website and qhull, but I can never get the cells right as Stella does. I'd understand if you'd prefer not to say, but I thought I would ask.

User avatar
robertw
Site Admin
Posts: 676
Joined: Thu Jan 10, 2008 6:47 am
Location: Melbourne, Australia
Contact:

Re: Problem with OFF files

Post by robertw » Sat Sep 09, 2023 2:25 pm

OK glad that worked.

Been a long time since I did the 4D Waterman stuff, so I don't remember how exactly, but I think it was a pretty direct extrapolation from 3D. The hardest part is probably getting the 4D convex hull algorithm to work, but if you're using qhull then I expect that should work.

tmo35
Posts: 5
Joined: Wed Aug 30, 2023 7:26 pm

Re: Problem with OFF files

Post by tmo35 » Sat Sep 09, 2023 6:26 pm

I must be doing something wrong, I can never get the composition that Stella produces. I'll keep trying; I'm thinking it has to do with either the output from POV Ray or a combination of the proper switches passed to qhull.

User avatar
robertw
Site Admin
Posts: 676
Joined: Thu Jan 10, 2008 6:47 am
Location: Melbourne, Australia
Contact:

Re: Problem with OFF files

Post by robertw » Sun Sep 10, 2023 4:35 am

It's always possible Stella has it wrong too. Unless the results you're getting are obviously wrong somehow?

tmo35
Posts: 5
Joined: Wed Aug 30, 2023 7:26 pm

Re: Problem with OFF files

Post by tmo35 » Sun Sep 10, 2023 2:43 pm

My understand of Waterman polyhedra, is the CCP packing of spheres, (or in Stella's case cubes / rhombic dodecahedrons), whose origins lie within some bounding sphere of radius r. We can then raise these to the 4th dimension by representing the vertices of the convex hulls as (x, y, z, r) as mentioned by Miroslaw Majewski in his write up https://www.atcm.mathandtech.org/EP/200 ... lpaper.pdf.

I am very new to all of this, and I have never had a particularly strong background in mathematics in general, but when slicing we would slice across the hyper-planes represented by r = r, r-1, ..., 1. What I am seeing in Stella almost looks like slicing as r = 1, 2, ..., r, -(r-1), ..., -1, if that makes sense, with r = 1, 2, ..., r-1 being mirror in the negative 'octants'.

As well, I am focusing on the rhombic dodecahedron type 2, with the four-fold axes centred add the origin, (an 'odd' CCP at z = 0 as explained on Paul Bourkes website https://paulbourke.net/geometry/waterman/), however when I slice with the cross-section tool in Stella and reach either 0.000 or -0.000 the polyhedron appears to be the r = 1 waterman for the rhombic dodecahedron packing of type 1, ('even layer'), or a truncated cube.

Granted, the polytope I am trying to recreate is what Stella is showing me. I can create what I would expect a 4-D Waterman to be with Qhull and POVRay, (with the exception of cell generation but that's another story), but what I want is the 4-D rhombic type 2 at r = 6 from Stella.

My work around right now, is because Stella has the 'Snap Sectioning Depth to Vertex' option, is export all the slices as 3D OFF files, add an r value to each, write a small brute force script that goes through all the exported vertices adds edges that are of the length as reported by Stella, then use graph theory to add the faces based on these lengths to recreate a 4OFF that matches what is shown in the Stella info window.

tmo35
Posts: 5
Joined: Wed Aug 30, 2023 7:26 pm

Re: Problem with OFF files

Post by tmo35 » Mon Sep 25, 2023 11:31 pm

Would it be possible to request a 4OFF of the aforementioned Waterman polytope? I have made some progess, but I am having an issue with the face enumeration. One type of face isn't adding up the way Stella is showing that it is.

I understand this isn't really a pressing issue, but I though I would ask, as right now I am a little confused and a 4OFF file would really clear everything up.

Post Reply