Loading ...
Sorry, an error occurred while loading the content.

Re: [antiprism] Introduction

Expand Messages
  • Adrian Rossiter
    Hi Roger ... I took a look at your other pages as well. Very nice. Looks like you have been busy! I noticed your srconv program, I will be including a points
    Message 1 of 9 , Feb 1, 2007
    View Source
    • 0 Attachment
      Hi Roger

      On Wed, 31 Jan 2007, vortexswirling wrote:
      > I've been interested in polyhedra about a year and half. In that time
      > I've worked mostly with the programs Great Stella and Hedron.

      I took a look at your other pages as well. Very nice. Looks like
      you have been busy!

      I noticed your srconv program, I will be including a "points
      repelling on a sphere" program with the next Antiprism release.
      I wrote a bit about the program here

      http://tech.groups.yahoo.com/group/antiprism/message/101

      Adrian.
      --
      Adrian Rossiter
      adrian@...
      Home: http://antiprism.com/adrian
    • vortexswirling
      ... I used to study some of the polyhedra produced by the Java applet. I was going the conversion to off files by hand and got tired of it so I wrote some code
      Message 2 of 9 , Feb 4, 2007
      View Source
      • 0 Attachment
        > I noticed your srconv program, I will be including a "points
        > repelling on a sphere" program with the next Antiprism release.
        > I wrote a bit about the program here
        >
        > http://tech.groups.yahoo.com/group/antiprism/message/101

        I used to study some of the polyhedra produced by the Java applet. I
        was going the conversion to off files by hand and got tired of it so
        I wrote some code to do it.

        The vrml2txt program is rather limited. The real way to make one of
        these would be to have the vrml player output the coordinates of the
        model instead of displaying it. Vrml is so flexible there is just no
        way to make an all inclusive converter any other way. Now if Javaview
        could display any vrml file that would probably do it.

        I'm considering re-working some of these utilities to work like
        yours. The problem is that I have a lot of redundent code. I could
        instead have something like vrml2off | off2txt so on. These always
        were considered first cut and I had been thinking of a gui interface,
        but piping might actually work better.

        Another project I'd eventually like to see happen is Conway Notation.
        George Harts Conway Notation page actually has the source code within
        it. I have (using Firefox) been able to generate the vrml code and
        then convert that to off files. But Javascript is only 16 bit. I'm
        particularly interested in Canonicalization.

        http://www.georgehart.com/virtual-polyhedra/conway_notation.html

        There is more but this is enough for now!

        Roger
      • Adrian Rossiter
        Hi Roger ... By the time I had a few programs and wanted to release them together I had also ended up with a lot of code duplication and inconsistency between
        Message 3 of 9 , Feb 5, 2007
        View Source
        • 0 Attachment
          Hi Roger

          On Mon, 5 Feb 2007, vortexswirling wrote:
          > I'm considering re-working some of these utilities to work like
          > yours. The problem is that I have a lot of redundent code. I could
          > instead have something like vrml2off | off2txt so on. These always
          > were considered first cut and I had been thinking of a gui interface,
          > but piping might actually work better.

          By the time I had a few programs and wanted to release them
          together I had also ended up with a lot of code duplication
          and inconsistency between programs.

          It was an effort to go through the programs and factor out
          the common code, but it was time well spent. The programs
          are now far more consistent and it has also made it easier
          to write new programs.

          My current project phase is now modularising the rest of
          the code, where appropriate, so it can be called from
          GUI code as well as in the command line programs. Currently,
          most of my modelling code is heavily tied to the program
          that makes the model, even to the extent in some cases of
          generating the model in the main function.



          > Another project I'd eventually like to see happen is Conway Notation.
          > George Harts Conway Notation page actually has the source code within
          > it. I have (using Firefox) been able to generate the vrml code and
          > then convert that to off files. But Javascript is only 16 bit. I'm
          > particularly interested in Canonicalization.

          They sound like fun things to look at. Have you implemented
          George's algorithm for canonicalization, or experimented
          with alternatives?

          Adrian.
          --
          Adrian Rossiter
          adrian@...
          Home: http://antiprism.com/adrian
        • vortexswirling
          ... I ve looked at your code and like it. My code wouldn t appeal to you as it is essentially C and not very good C at that. But it works and so that is the
          Message 4 of 9 , Feb 5, 2007
          View Source
          • 0 Attachment
            --- In antiprism@yahoogroups.com, Adrian Rossiter <adrian_r@...>
            > My current project phase is now modularising the rest of
            > the code, where appropriate, so it can be called from
            > GUI code as well as in the command line programs. Currently,
            > most of my modelling code is heavily tied to the program
            > that makes the model, even to the extent in some cases of
            > generating the model in the main function.

            I've looked at your code and like it. My code wouldn't appeal to you
            as it is essentially C and not very good C at that. But it works and
            so that is the currently important thing.

            After you've done the work you mention above and make another
            release, I will look at it again. If you don't mind I'd like to use
            it for the core of what I rewrite. For example it shouldn't be too
            much trouble to take one of your OFF2xxx programs and make it into an
            OFF2TXT program. If you wanted you could add that to antiprism (if
            you wanted) and at the same time I'd be learning a C++ way to do
            these things.

            Some of the other programs I have are too specific for antiprism,
            though.

            > > Another project I'd eventually like to see happen is Conway
            Notation.
            > > George Harts Conway Notation page actually has the source code
            within
            > > it. I have (using Firefox) been able to generate the vrml code and
            > > then convert that to off files. But Javascript is only 16 bit. I'm
            > > particularly interested in Canonicalization.
            >
            > They sound like fun things to look at. Have you implemented
            > George's algorithm for canonicalization, or experimented
            > with alternatives?

            Canonicalization as well as most of the other Conway operations have
            never been done elsewhere. If I were to impliment this I'd offer to
            make it part of antiprism. I'd input/output off files and then the
            converters could do the rest. It'd be nice to be able to do Conway
            notation on any model and this would make that happen. But its a big
            project and something I'd start after your next release.

            Roger
          • Adrian Rossiter
            Hi Roger ... Thanks :-) ... I m sure your code is fine. I don t mind C, although I find it less convenient than C++. The comment stripper was C. I also
            Message 5 of 9 , Feb 7, 2007
            View Source
            • 0 Attachment
              Hi Roger

              On Mon, 5 Feb 2007, vortexswirling wrote:
              > I've looked at your code and like it.

              Thanks :-)


              > My code wouldn't appeal to you
              > as it is essentially C and not very good C at that. But it works and
              > so that is the currently important thing.

              I'm sure your code is fine.

              I don't mind C, although I find it less convenient than C++. The
              comment stripper was C. I also recently wrote a Jitterbug viewer
              in C

              http://antiprism.com/link/jitterbug_gl


              > After you've done the work you mention above and make another
              > release, I will look at it again.

              I am aiming for a release in a few days time, but I won't
              have finished all the modularisation for that release.


              > If you don't mind I'd like to use
              > it for the core of what I rewrite. For example it shouldn't be too
              > much trouble to take one of your OFF2xxx programs and make it into an
              > OFF2TXT program. If you wanted you could add that to antiprism (if
              > you wanted) and at the same time I'd be learning a C++ way to do
              > these things.

              If you can use the Antiprism code for your project then that is
              great, and if you would like to contribute an off2txt program
              to Antiprism then that is better still!


              >> They sound like fun things to look at. Have you implemented
              >> George's algorithm for canonicalization, or experimented
              >> with alternatives?
              >
              > Canonicalization as well as most of the other Conway operations have
              > never been done elsewhere. If I were to impliment this I'd offer to
              > make it part of antiprism. I'd input/output off files and then the

              It seemed straightforward so I wrote a quick implementation,
              including it for now as option "-a c" in minmax (and option -s
              is the percentage to scale the distance the edge is away from
              the unit sphere)

              http://www.freewebtown.com/adrian/tmp/minmax.cc

              Example,

              minmax -a c -s 10 -n 10000 poly.off > poly_can.off

              Except... my implementation doesn't currently converge! With
              my test poly it quickly settles down to something close to
              the solution, but then seems to get worse, eventually pushing
              a couple of vertices together...

              If you want to experiment with it and make some changes you
              can just copy it over minmax.cc in the Antiprism source. You
              build it by typing 'make' in the top level directory (maybe
              also initially type 'make depend' if you plan to make changes
              to any other files).

              Adrian.
              --
              Adrian Rossiter
              adrian@...
              Home: http://antiprism.com/adrian
            • vortexswirling
              ... I m sure your code is fine. ... I ve coded in C++ before professionally and I do find it more organized. The problem is I was educated and trained in C and
              Message 6 of 9 , Feb 7, 2007
              View Source
              • 0 Attachment
                --- In antiprism@yahoogroups.com, Adrian Rossiter <adrian_r@...> >
                I'm sure your code is fine.
                >
                > I don't mind C, although I find it less convenient than C++. The
                > comment stripper was C. I also recently wrote a Jitterbug viewer
                > in C
                >
                > http://antiprism.com/link/jitterbug_gl

                I've coded in C++ before professionally and I do find it more
                organized. The problem is I was educated and trained in C and never
                learned to design in C++. So I normally drop to C when I write
                something small like the utility programs.

                >
                >
                > > After you've done the work you mention above and make another
                > > release, I will look at it again.
                >
                > I am aiming for a release in a few days time, but I won't
                > have finished all the modularisation for that release.

                No rush, I have a few more things to do before I start a
                reorganization. I have a few proof of concept things to do.

                > It seemed straightforward so I wrote a quick implementation,
                > including it for now as option "-a c" in minmax (and option -s
                > is the percentage to scale the distance the edge is away from
                > the unit sphere)
                >
                > http://www.freewebtown.com/adrian/tmp/minmax.cc
                >
                > Example,
                >
                > minmax -a c -s 10 -n 10000 poly.off > poly_can.off
                >
                > Except... my implementation doesn't currently converge! With
                > my test poly it quickly settles down to something close to
                > the solution, but then seems to get worse, eventually pushing
                > a couple of vertices together...

                I'm glad you find it straight forward! I've still a bit to learn
                about these things but what better way to learn than programming.

                I have to update my Cygwin environment and then will try to compile
                it.

                I hope your example was convex. The theory is all convex polyhedra
                can be canonicalized but not non-convex.
              • Adrian Rossiter
                Hi Roger ... Yes, it was just a distorted truncated cube. This morning I have had a look at George s Mathematica notebook
                Message 7 of 9 , Feb 8, 2007
                View Source
                • 0 Attachment
                  Hi Roger

                  On Wed, 7 Feb 2007, vortexswirling wrote:
                  > I hope your example was convex. The theory is all convex polyhedra
                  > can be canonicalized but not non-convex.

                  Yes, it was just a distorted truncated cube.

                  This morning I have had a look at George's Mathematica notebook

                  http://library.wolfram.com/infocenter/Articles/2012/

                  I was able to spot my errors and see the way that George was
                  doing some things differently. I have now implemented the
                  algorithm to follow the Mathematica. I haven't given it
                  much of a test but it appears to be working correctly.

                  http://www.freewebtown.com/adrian/tmp/minmax.cc

                  Option -s is the percent to scale the edge non-tangency error.
                  Option -l is the percent to scale the vertex non-planarity error.
                  Defaults are George's values of 50 and 20 [values 1 and 0 trigger
                  the defaults, and so aren't available!].

                  I'll see if I can split this off into its own program for the
                  next release.

                  Adrian.
                  --
                  Adrian Rossiter
                  adrian@...
                  Home: http://antiprism.com/adrian
                • Adrian Rossiter
                  ... I have done that. Here is a test. Take a distorted pyramid http://www.freewebtown.com/adrian/tmp/can_pyr01.jpg Canonicalize it, make and colour a dual,
                  Message 8 of 9 , Feb 8, 2007
                  View Source
                  • 0 Attachment
                    On Thu, 8 Feb 2007, Adrian Rossiter wrote:
                    > I'll see if I can split this off into its own program for the
                    > next release.

                    I have done that. Here is a test. Take a distorted pyramid

                    http://www.freewebtown.com/adrian/tmp/can_pyr01.jpg

                    Canonicalize it, make and colour a dual, display them both

                    canonical pyr.off > pyr_c.off
                    pol_recip -R e pyr_c.off | off_color -f 0.3,0.3,0.8 > pyr_d.off
                    antiview pyr_c.off pyr_d.off

                    Which gives

                    http://www.freewebtown.com/adrian/tmp/can_pyr02.jpg

                    Adrian.
                    --
                    Adrian Rossiter
                    adrian@...
                    Home: http://antiprism.com/adrian
                  Your message has been successfully submitted and would be delivered to recipients shortly.