Thread: Cyclic polytopes | polytopes with MANY faces

  1. #1
    SAMARAS std10093's Avatar
    Join Date
    Jan 2011
    Location
    Nice, France
    Posts
    2,694

    Cyclic polytopes | polytopes with MANY faces

    I want to find sample input of BIG data for a program.

    I am interested in polytopes with many faces. I want the half-spaces that define the polytope to be as many as possible.

    I do not care if it is a random polytope or a real one (I mean one with a name, like a cube for example (which is defined by only 6 faces)).

    I want the polytope(s) to be defined by vertices or by half-spaces.

    Thanks in advance.
    Code - functions and small libraries I use


    It’s 2014 and I still use printf() for debugging.


    "Programs must be written for people to read, and only incidentally for machines to execute. " —Harold Abelson

  2. #2
    SAMARAS std10093's Avatar
    Join Date
    Jan 2011
    Location
    Nice, France
    Posts
    2,694
    Catalan solid ones seem to be ideal, since they can have many faces. Moreover they are all convex which is good for me.
    However, I am having troubles locating their vertices!!

    EDIT: It seems that I am going to do that by hand ;p
    Code - functions and small libraries I use


    It’s 2014 and I still use printf() for debugging.


    "Programs must be written for people to read, and only incidentally for machines to execute. " —Harold Abelson

  3. #3
    SAMARAS std10093's Avatar
    Join Date
    Jan 2011
    Location
    Nice, France
    Posts
    2,694
    Ok as I said above, I am getting the data by hand. I have stuck here:
    Code:
    For a snub cube with unit edge length, use all the even permutations of
    ( C_1,C_2,C_3)
    having an even number of plus signs, along with all the odd permutations having an odd number of plus signs.
    I am not sure which is the result of these operations. Can anybody help?
    Code - functions and small libraries I use


    It’s 2014 and I still use printf() for debugging.


    "Programs must be written for people to read, and only incidentally for machines to execute. " —Harold Abelson

  4. #4
    Registered User MutantJohn's Avatar
    Join Date
    Feb 2013
    Posts
    2,665
    I don't think it's possible to write a single structure to represent all polytopes (because of how the half-spaces are calculated) but it is possible to write polymorphic code!

    For example, to make a tetrahedron :
    Code:
    struct vertex {
    
        double x, y, z;
    };
    
    struct tetra {
    
        array<struct vertex, 4> p;
    
        array<double, 4> a, b, c, d;
    };
    Here each index of a, b, c and represent the plane of each face taken from the equation ax + by + cz - d = constant and p is storage of 4 vertices of the tetrahedron.

    You can easily create a base polymorphic polytope class which stores all the functions you'll need (calculating half-spaces and if you want, point location routines) and from there, you can use derived classes to implement each specific polytope you want to model.

    It's because some polytopes have faces made out of more than 3 points or some get really funky so you need specific classes for each case, I think.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. how to find if array is cyclic
    By SA80 in forum C Programming
    Replies: 3
    Last Post: 05-05-2012, 03:53 AM
  2. Cyclic dependencies, observer, or...
    By g4j31a5 in forum C++ Programming
    Replies: 7
    Last Post: 12-13-2011, 05:45 AM
  3. cyclic buffer
    By Fortune in forum C Programming
    Replies: 2
    Last Post: 04-23-2009, 05:19 AM
  4. Need a little help with Cyclic Numbers Program
    By SlyMaelstrom in forum C++ Programming
    Replies: 3
    Last Post: 10-19-2005, 05:01 PM
  5. Smiley Faces?
    By 0rion in forum C Programming
    Replies: 15
    Last Post: 06-08-2004, 07:29 AM