tag:blogger.com,1999:blog-35435451670117136062017-08-25T11:55:55.496-07:00sidedness geometryindividkidhttp://www.blogger.com/profile/12926316060956277498noreply@blogger.comBlogger39125tag:blogger.com,1999:blog-3543545167011713606.post-42379081691442873382017-08-22T11:40:00.000-07:002017-08-22T13:02:43.432-07:00MethodologyAesthetics are the most important thing about a computer language. Lazy or eager, imperative or declarative, object or aspect, template or macro, strong or weak, none matter as much as pleasant to the eye and mind. Assembly had equilength lines. Lisp was conceptually simple, but impossible to look at. C had logical sounding key words, like if, for, goto. C++ had good salesmanship. Haskell has significant indentation. But to properly take advantage of this most crucial feature of Haskell, one must use single space indentation, and only when absolutely necessary. Also, keep lines and identifiers short. Except after >>=, use one character identifiers near the end of the alphabet for lambda arguments, and except for clarity, use one character identifiers near the start of the alphabet for named function arguments. Name lemma functions the same as the main function, except with a single capital letter suffix. Use let instead of where, unless the variable is used in guards or multiple branches. Except to break a rule, never use do notation. Freely pass IO arguments to functions other than >>= and >>. Use <$> and <*> sparingly. Get to the let as soon as possible in IO functions.individkidhttp://www.blogger.com/profile/12926316060956277498noreply@blogger.com0tag:blogger.com,1999:blog-3543545167011713606.post-28720291682939869342017-04-07T13:30:00.000-07:002017-04-07T13:39:20.731-07:00Sculpting Polytopes<div><span style="-webkit-text-size-adjust: 100%;">Sculpt </span><span style="-webkit-text-size-adjust: 100%;">displays a polytope</span><span style="-webkit-text-size-adjust: 100%;">, and in interactive mode, the left mouse button (de)selects pierce point(s), changing mode deselects pierce point(s), and the right mouse button switches modes with a menu. Mouse modes are rotation about the pierce point, translation of the pierce point</span><span style="-webkit-text-size-adjust: 100%;">, and rotating about the focal point. Roller button modes are </span><span style="-webkit-text-size-adjust: 100%;">rotation about the pierce point line of sight, scaling from the pierce point, driving forward to and back from the pierce point. Moving</span><span style="-webkit-text-size-adjust: 100%;"> the operating system window also translates, so the model appears fixed behind the screen. Mouse and roller button modes are a matrix of submodes of transform mode. Nontransform modes are random refinement through the pierce point with roller button controlled cursor warp, additive sculpting above the pierce point, subtractive sculpting under the pierce point, and pinning two pierce points and moving a third pierce point by mouse and roller button.</span></div><div><span style="-webkit-text-size-adjust: 100%;"><br /></span></div><div><span style="-webkit-text-size-adjust: 100%;">Directory .script, or the -d directory, has numeric, space, embedding, and polytope representations saved,</span><span style="-webkit-text-size-adjust: 100%;"> timestamped, classified by backlink automatically, and named manually. And .script, or the -d directory, has configurations such as light color and direction, picture plane position and directions, focal length, window position and size, and refine warp.</span></div><div><span style="-webkit-text-size-adjust: 100%;"><br /></span></div><div><span style="-webkit-text-size-adjust: 100%;">Option -i starts interactive mode, -e "</span><span style="-webkit-text-size-adjust: 100%;">script" loads a metric expression to periodically display heuristic animation, -d "dir" changes directory, -n "dir" initializes new directory with current state, -r randomizes the lighting -o "file" saves format by extension, -f "file" loads format by extension, -l "shape" replaces current by builtin shape, -t "ident" changes current by timestamp or name. Options are processed in order, so interactive sessions, animations, directory changes, initializations, loads, and saves can occur in any order. If .script or -d directory does not exist or is empty, it is created with regular tetrahedron, random lighting, and window centered on screen. It is an error for -n directory to exist, for -f file to not exist, or for -o file to exist. Errors are recoverable because directories contain history, and error messages contain instructions on how to recover.</span><br /> <div><span style="-webkit-text-size-adjust: 100%;"><br /></span></div><div><span style="-webkit-text-size-adjust: 100%;">The look and feel of sculpt is turn based. Even metric driven animation only updates the displayed vertices periodically. The rotations and such occur continuously through matrix multiplication, but the model remains rigid. Pin and move of plane is represented by wire frame, updating vertices and possibly faces only after action completion.</span></div><div><span style="-webkit-text-size-adjust: 100%;"><br /></span></div><div><span style="-webkit-text-size-adjust: 100%;">Supplemental features to sculpt include graffiti on faces, windows to other polytopes on faces, system calls and icons on faces, sockets to read-only polytopes on faces, jumping through faces to other polytopes, user authentication and kudos for various modifications to polytopes from requests through socket</span></div><div></div></div>individkidhttp://www.blogger.com/profile/12926316060956277498noreply@blogger.com0tag:blogger.com,1999:blog-3543545167011713606.post-42753259289084734202017-04-05T16:48:00.001-07:002017-04-05T16:48:06.140-07:00Classifying PolytopesThe properties of polytopes that I chose to keep invariant are discontinuities, flatness, colinearity, and convexity. To indicate that two points on a polytope are colinear, or cohyperplanar, I collect the points into boundaries and intersections between boundaries, such that two points are coplanar iff they are in the same boundary. The discontinuities in a polytope occur only where boundaries intersect. To understand convexity, note that intersections between halfspaces are convex. Thus, if a discontinuity is concave, it consists of more than one halfspace intersection of the same intersecting boundaries. I call the halfspace intersections polyants, and specify them as maps from boundary to side. Thus, in an n dimensional space, a vertex has 2^n polyants, and an edge has 2^(n-1) polyants. If more than one polyant of a vertex has points near the vertex in the polytope, then the vertex is not convex, and similarly for edges, and so on. Note that the polytope has only the empty polyant, and the single boundaries each have two polyants. Wrt a boundary in its domain, a polyant is significant iff points in the polyant near the boundary are near points both in and not in the polytope. In fact, a two boundary polyant is significant iff one of the boundaries is significant in the section of the polytope by the other boundary. Thus, a polytope is a graph of polyants. Since a polyant is specified by boundaries and sides, and a graph is a map from polyant to set of polyant, equivalent polytopes are found by permuting the boundaries and mirroring sides across boundaries.individkidhttp://www.blogger.com/profile/12926316060956277498noreply@blogger.com0tag:blogger.com,1999:blog-3543545167011713606.post-38863321477069013352017-03-31T07:46:00.000-07:002017-03-31T08:57:48.724-07:00RepresentationsI know nothing about representation theory, but in this context, a representation is a set of tuples. A relation is a set of two element tuples, and a function is a relation in which the first element of each tuple occurs in no other tuple. You can think of a relation as a function with range elements that are sets. Thus, the result of the function is the set of second tuple elements of tuples that have the function input in the first element. You can think of multivariable functions as sets of tuples with more than two elements. In prior posts, I represented space as a matrix of sides, where row(column) indicated boundary, and column(row) indicated region. In my Haskell code, the first representation I chose was a list of lists of region sets. The position in the outer list indicated boundary, and the position in the inner list indicated side. In subsequent representations, I indicated the boundary explicitly, instead of implicitly by list position. I also used representations where the innermost sets are sets of boundaries instead of regions. Whenever I came up with a new representation, I worried whether I could convert between one and another. Now that I understand representations are just sets of tuples, I no longer worry about converting; converting is as simple as changing the order of the elements in the tuples. In future computer architectures, I predict the preferred representation will be sets of tuples. In a computer, a set of tuples could be implemented as a CAM, a content addressable memory. The challenge would be to make the CAMs in the computer completely configurable. Right now, we are limited to RAMs, random access memories, because they are relatively easy to implement. Note that even RAMs are not completely configurable, some sequences of access are more efficient than others, depending on the particular implementation.individkidhttp://www.blogger.com/profile/12926316060956277498noreply@blogger.com0tag:blogger.com,1999:blog-3543545167011713606.post-89045714156303236592017-03-29T13:28:00.000-07:002017-03-29T13:28:17.043-07:00The Choose FunctionIn my Haskell code, I chose to represent sets as lists. In practice, this means I have to prevent duplicates in the lists that represent sets. Just to be difficult, I also use lists for ordered pairs of same type things, or maps from index to things. If the things are of different type, then ensuring there are not duplicates is a no-brainer and they might as well be ordered, so I use tuples. This is all very mathematical, and functions resemble constructive proofs. Where computational functions differ from proofs is in which shortcuts are taken. Proofs don't care how long they take to execute. Computer functions are expected to complete in a reasonable time. I use a function called choose to document when I am deviating from the mathematical ideal to make a function more computational. Choose is defined as head; it returns the first element of the list. Choose is intended for use only on lists representing sets, but that is not the only intended restriction on its use. Choose is intended for use when any element of the set would be correct, and the choice of element changes the result of a function it is directly or indirectly used in. Where the choice would not affect the result, I use head. The reason this makes the functions using choice less mathematical and more computational is that the alternative is to return all valid results, not just one valid result. For example, my superSpace function uses choose often to simplify the computational problem, even though the simplest solution to the mathematical problem is that there are multiple solutions.individkidhttp://www.blogger.com/profile/12926316060956277498noreply@blogger.com0tag:blogger.com,1999:blog-3543545167011713606.post-75053818745706868022017-03-24T13:23:00.000-07:002017-03-24T15:11:08.578-07:00RegularityTill now, I have focussed on irregular spaces and polytopes without coincidental boundaries, but spaces with missing regions have been a nagging possibility. For example, if a space is caught in the process of migrating, then the migration itself is like a sidedness space with a missing region, or an affine space with more than the dimension's worth of boundaries through a point. Parallelism is also a a form of degenerate space. Imagine a migration of a round space, where the migrating region is an outside region in a flat rotation space of the round space. Now consider embeddings of polytopes into spaces. Since an embedding is a subset of the regions in the space, one can specify the embedding as the degenerate space consisting of just the embedded regions. Restoring the degenerate space to a linear space is one to many, but each restoration is a valid embedding of the same polytope. Now note that regular polytopes contain parallel sides. Irregular and regular polytopes are both degenerate spaces; the only distinction is whether there is a partial restoration to a space missing outside regions.individkidhttp://www.blogger.com/profile/12926316060956277498noreply@blogger.com0tag:blogger.com,1999:blog-3543545167011713606.post-64260632316075944622017-03-23T15:04:00.001-07:002017-03-23T17:12:26.462-07:00Minimum Equivalent<br /><div></div><br /><div>To find equivalence classes of spaces, and of polytopes, it is impractical to try all permutations of a representation to find if it makes one equal to another. Assuming permutations of representations are comparable as greater or lesser, an approach would be to find the permutation that minimizes a representation the most. Then all equivalent representations would minimize to the same member of the equivalence class. To find the minimizing permutation, choose transpositions such that the first transposition chooses which identifier will be the smallest. Of course, multiple transpositions could cause the smallest identifier to be first in the representation. Some transposition sequences would get weeded out only after subsequent transpositions failed to compete with their peers. Weeding out transposition sequence prefixes as unable to recover potential after failing to put the smallest identifiers first in the representation is justified because no subsequent transposition affects the position of lesser identifiers. This algorithm is not O(n), but it is potentially, and I suspect in practice, much better than the O(n!) of the naive approach of trying every permutation. Since I needed to use the same algorithm for both spaces and polytopes, I created a Haskell class of permutation types. Each permutation type must implement refine and compare functions. A refine function returns a list of permutations, each with one more transposition than the given permutation. A compare function takes two partial permutations and compares their application to a representation. To accomplish the compare function, each type in the class is actually a wrapper around an original representation and a partial permutation of that representation.</div>individkidhttp://www.blogger.com/profile/12926316060956277498noreply@blogger.com0tag:blogger.com,1999:blog-3543545167011713606.post-7487321410549674282017-03-17T16:05:00.001-07:002017-03-17T16:10:19.208-07:00Simplex Overlap Equivalnce<div>What is a polytope? For one thing, it has flat sides. For another, two polytopes can be equivalent without being the same. Anecdotally, all right triangles are in some sense equivalent. I would argue that the various kinds of simplex are limits of sequences of irregular simplices, and all irregular simplices are equivalent up to dimension. I can define polytope as a collection of maximal super-region spaces, together with their intersection super-region spaces. The intersection spaces are necessary because otherwise the relation between the maximals would not be captured. I can convert any finite union of intersections of real vector halfspaces to a polytope, and any sufficiently small tweak of the halfspaces produces the same polytope. Furthermore, my personal criterion for polytope equivalence is satisfied. Simplex overlaps are equivalent iff they are equivalent as polytopes. In other words, a simplex overlap is two maximal super-regions, related by their one intersection. A maximal super-region space is one of a super-region not contained by any other super-region covered by the polytope's regions embedded in the space. <span style="-webkit-text-size-adjust: 100%;">A super-region space is a space with all boundaries attached to an inside region. Much as section spaces uniquely identify extensions of a space, super-region spaces uniquely identify super-regions of a space. To find the section space, take the regions attached on one side of the extension boundary</span>. To find the super-region space, take the boundaries attached to the super-region. See below for a proof that there is at most one inside region attached to all boundaries. Thus, a polytope is a collection of super-region spaces together with sidednesses of the super-region wrt attached boundaries. A super-region space is specified as a map from attached boundary to the super-region space of the facet of the boundary. For example, a three dimensional super-region space has a face per attached boundary, each face has a segment per significant boundary, and each segment has a two significant vertex boundaries. A facet is identified by the set of boundaries in the boundary map path that leads to it. Thus, the traditional definition of polytope as a graph of facets suffices for convex polytopes, and for concave polytopes, the definition above suffices.<br /><span style="-webkit-text-size-adjust: 100%;"><br /></span></div><div>Super Region Theorem</div><br /><div>There is at most one inside region attached to all boundaries. Suppose two points, p and q, are in regions attached to all boundaries. Toss out boundaries without putting either p or q in outside regions, and without putting p and q the same region. Finally every boundary makes one or both of p and q outside or makes p and q the same. If there were a boundary, b, that separates only p from an outside region, then b is not attached to q, so all boundaries except the mutual boundary, c, separate both p and q from outside regions. Consider two outside regions, r and s, opposite p and q<span style="-webkit-text-size-adjust: 100%;"> wrt boundary b. R and s must be opposite each other wrt c because r and s are the same after removing c. Thus every outside region is attached to c, so there are 6 regions total. This is not possible in any dimension, so there must be at most one region attached to all boundaries.</span></div>individkidhttp://www.blogger.com/profile/12926316060956277498noreply@blogger.com0tag:blogger.com,1999:blog-3543545167011713606.post-1445015730566872602017-01-30T12:04:00.000-08:002017-01-30T12:04:35.738-08:00PoliticsWell, politics and polytope both start with pol, right? Anyway, my poster for the upcoming March for Science (https://www.marchforscience.com/) is "Trump = Disease / Science = Cure". This is a 2^2, one-to-one, 2d-sub-simplex. It brings to mind an interesting way to think about affine spaces. They are collections of one-to-one mappings on equal-sized subsets of regions. In other words, each boundary is a one-to-one mapping between the regions attached to it on one side, and the regions attached in the other side. The universe has many more regions than just those attached to a particular boundary. Wrt Trump's ban on people from countries that Trump does not currently have business interests in, I believe it, in addition to other attacks on democracy, will reduce terorism against the US. In general, anything undemocratic, such as gag orders, and appointment of corrupt oligarchs to cabinet positions, decreases the threat of terorism, because it is not authoritarianism that scares terrorists; democracy scares terrorists. But let's face it, corruption in the White House is a much bigger threat than terrorism. Much more people will die from global warming than from terrorism. Trump's priorities are messed up. So get out there and protest, and don't stop until the Koch brothers are bankrupt, Trump's name is removed from the towers, and former coal miners, loggers, truckers, factory workers, and other red-necks are installing solar panels, building hydroponics, riding bicycles, and restoring wetlands.individkidhttp://www.blogger.com/profile/12926316060956277498noreply@blogger.com0tag:blogger.com,1999:blog-3543545167011713606.post-64428264029683508472016-12-01T09:55:00.000-08:002016-12-07T12:11:55.236-08:00Metaphysics<div>In this post I will exercise my brand of metaphysics. At least it is harmless, right? I am not very well read, but from what I understand from sound bites, I think I'm a Cartesian. The separation between mind and body is hogwash, but I do believe life has emergent properties including intelligence and discipline.</div><div><br /></div><div>Just as science is less one-dimensional than religion, there may well be a discipline that is less two-dimensional than science. Since genius greater than Einstein is not likely, super-intelligence is required for three-dimensional discipline. Just as the internet does not make people less religious, we need not fear pa/matricide at the hands of super-intelligent progeny. On the contrary, we can look forward to a super-intelligent constitution that guarantees freedom of science, just as our atheist founding fa/mothers enshrined freedom of religion in the same amendment that protects the fourth estate. What wonders will super-intelligence conflate with freedom of science?</div><div><br /></div><div>Just as Sagan condescended to explain science in one-dimensional religious terms like "numinous", super-intelligence will likely explain three-dimensional discoveries in two-dimensional mathematical terms. In fact, just as Mendel had a prominent one-dimensional section of his essentially two-dimensional existence, a super-intelligence might partake exuberantly of science.</div><div><br /></div><div>In short, though religion has the two poles of spirit and matter, science has the two dimensions of theory and experiment. Our experience of this difference is that religion lacks the uncertainty of science.</div><div><br /></div><div>With regard to politics which science fiction is supposed to be about, capitalism has failed as miserably as communism. Technology, the product of science, is necessarily a mere section of science. We can expect super-intelligence to produce many disciplines, each as de/constructive as science. Indeed, we may think of science as the plane constructed through two lines, art and religion, that share a point, life. Similarly, super-intelligence will be constructed as the space that contains two sciences that share a single technology. Perhaps the sciences are finite physics and not-even-wrong physics, and the technology is quantum-bio-computing. It is doubtful that super-intelligence will save us from nuclear weapons or global warming. After all, science did not save religion from denial or hypocrisy, nor art from post-modernism.</div><div><br /></div><div>On an alien planet with two different kinds of life, a single religion connecting the two kinds of life might form even before intelligence. And on a planet with three kinds of life, science might be integral to evolution. On our planet, the leap from life to religion may have required as much intelligence as the leap from religion to science. Thus, super-intelligence is a misnomer; it should be called hyper-science.</div><div><br /></div><div>A flaw in my argument is how different religion is from technology. This may be because religion is merely linear, whereas technology is affine. If religions, and by extension science, are linear, then life must be the origin. And as we know, life is not contained by technology. Also, there are things like sport that are neither religion nor product of science. Consider the ancient Brazilian sport of playing with a rubber ball. Note that the rubber ball was a product of technology, and sport contains life. Thus, sport is the one-dimensional discipline constructed through life and a product of a technology.</div><div><br /></div><div>At this point, I hope it is clear that I consider religion a derangement. Rather than decrease my respect for religion, this increases my respect for derangement. Since I know of no other way to construct a plane except from lines, I am forced to consider religion a necessary stepping stone. And since our experience with fossil fuel demonstrates the folly of burning bridges, I must accede the utility of keeping religion around.</div><div><br /></div>individkidhttp://www.blogger.com/profile/12926316060956277498noreply@blogger.com0tag:blogger.com,1999:blog-3543545167011713606.post-44614224842116635732016-11-20T15:38:00.000-08:002016-11-26T14:52:54.684-08:00Electronic Music<div>Here is an application intended to draw emergent properties from general purpose computers. This is in the tradition of the west coast modular synth, in the sense that it sacrifices ease of use for surprise.</div><div><br /></div><div>The mouse position rotates a polytope. The roller button rotates the projection plane. The buttons switch between ends of the projection line. The polytope region volumes are noise volumes. The space boundaries are tone filters. The projection plane areas are durations. The projection plane boundaries are envelope filters. The projection line lengths are tempos. The projection line boundaries are rhythmic filters. Function keys (un)lock boundaries, (un)fill regions. Configuration file contains metric and boundary mappings. Branching history allows branching playback. Create new branches relative to other branches.</div><div><br /></div><div>Just as the effect of multiple color filters is cumulative, so is the effect of multiple tone filters. Similarly, the effect of multiple envelope or rhythm "filters" should be cumulative. Thus, retained are the volume area length metrics, but lost are the filter orderings, except as deduced from adjacency.</div><div><br /></div><div>The product of the three dimensional tone filters is the richest in the sense that they are repeating waveforms. The two dimensional filters, though geometrically more numerous, are less rich in the sense that they produce unrepeated envelopes, or potions of waveforms. Note that the specification of envelope filter is still a vector of harmonic amplitudes. The one dimensional filters are again geometrically more numerous, but less rich, thus. They not only produce unrepeated phrases, they interpret the negative portions of the waveform as silence, ignoring any negative information.</div><div><br /></div><div>Another enhancement would be feedback. Thus, when a note plays, the region responsible for it could go on to the next fundamental tone. Generally, each projected region could go on to the next parameter. To avoid expressing my incompetence at harmony and melody, the parameters could be chosen by 1/f randomness or modulo one golden ratio increments.</div><div><br /></div><span style="font-family: "times new roman";">Escape key halts recording and rotation, allowing mouse lift. Continuity is preserved across pauses by interpreting mouse and roller button motions as accelerations instead of motions. Discontinuities are allowed by enabling rotation and rate change separate from recording. Loops are recorded by interpolating from one branch to another and going to playback mode. Switching to record mode starts a new branch relative to the current in the sense that the rotation rates start from where the branch started.</span>individkidhttp://www.blogger.com/profile/12926316060956277498noreply@blogger.com0tag:blogger.com,1999:blog-3543545167011713606.post-20018433651643107762016-11-20T12:39:00.000-08:002016-11-21T11:53:24.847-08:00Intervals Are Not PolytopesOne dimensional spaces are qualitatively different from spaces with 2 or more dimensions. My definition of "linear", as a space who's subspaces have the correct number of regions does not suffice to make one-dimensional spaces convertible to number lines. Here is a counter-example.<br /><br />[[[0],[1,2,3]],[[1],[0,2,3]],[[2],[0,1,3]]]<br /><br />Interpret this as a list of boundaries, each of which is a pair of half-spaces, and interpret the numbers as regions. As a two-dimensional space this is a simplex with empty vertex regions. As a one-dimensional space, each subspace has m+1 regions, where m is the number of boundaries. As a result of testing my Haskell code, I discovered this counter-example. I rewrote my isLinear and superSpace functions to behave differently for one-dimensional arguments.<br /><br />Stay tuned for whether there are counter-examples of 2 or more dimension. If the proofs in previous posts are correct, then there will be none. Math is scientific in the sense that we can never know for certain that a proof is correct.<br /><br />individkidhttp://www.blogger.com/profile/12926316060956277498noreply@blogger.com0tag:blogger.com,1999:blog-3543545167011713606.post-86904591963308784972016-11-06T08:16:00.000-08:002016-11-06T08:16:03.536-08:00JourneyI've restarted my Haskell program to take a more naive approach. Rather than go for optimization with lots of different representations that get saved to prevent recalculations, my new approach is to go for clarity. I found that the prior approach involved a lot of boring code. I was too tempted to automate the production of the boring code, and that became a nontrivial challenge. Anyway, my new code is here, and it is much more readable. Note that though the repository is still called sidegeo, the module directory is AffTopo. AffTopo stands for affine topology, which I believe more accurately describes the math in this blog than my original choice of sidedness geometry.<div><br /></div><div>https://github.com/individkid/sidegeo/blob/master/src/AffTopo/Naive.hs</div><div><br /></div><div>Perhaps more or less related to my coding efforts, I have taken a new perspective (pun intended) on the definition of polytope. In short, polytope (like creativity) means many things to many people in many contexts. Here are a couple of possible definitions.</div><div><br /></div><div>If you project your polytope onto a picture plane, it produces a (simpler?) polytope in one fewer dimension. If you consider all possible projections of a polytope, the polytope might be well defined so long as it's projections are well defined. Since polytopes of zero dimension are well defined, this recursive definition might work. I say might, because the projections of a polytope have some relations not captured by simply collecting them into a set.</div><div><br /></div><div>As another example of defining polytope, start with the usual graph of facets, and add convexity around each facet. My coding experience has increased my respect for directness. On the other hand, without curves we would not know that lines are straight.</div><div><div><br /></div></div>individkidhttp://www.blogger.com/profile/12926316060956277498noreply@blogger.com1tag:blogger.com,1999:blog-3543545167011713606.post-18673539086450067902016-03-29T09:26:00.001-07:002016-04-09T14:46:17.070-07:00Hello HaskellI'm proud of my hello world because it demonstrates my understanding of lazy evaluation. Lazy evaluation appeals to me because it reminds me of cause and effect<span style="-webkit-text-size-adjust: auto; background-color: rgba(255, 255, 255, 0);"> in its relative and quantum laziness</span>. This, my first Haskell program, is the middle step of a program to produce code that implements conversions implicit in the name of the converter.<br /><div><br /></div><div><a href="https://github.com/individkid/sidegeo/tree/master/src/Implicit">https://github.com/individkid/sidegeo/tree/master/src/Implicit</a></div><div><br /></div><div><br /></div>individkidhttp://www.blogger.com/profile/12926316060956277498noreply@blogger.com0tag:blogger.com,1999:blog-3543545167011713606.post-10301235784087242892016-02-20T17:55:00.000-08:002016-02-23T10:29:41.870-08:00No Mention of DimensionRecently I have started using Haskell instead of those other languages. As a result I have gotten closer to generating all spaces and polytopes of a given complexity. An observation results from this progress. None of my representations or functions, from sidedness to cospace, depend on dimension. Haskell being strongly typed means the fact that my code compiles is nontrivial. I still need to remove any runtime bugs that crop up, but I'm confident I'll be able to generate all simplex overlaps with merely implicit dimension. The way to imply a dimension is to make a simplex by remove one region from a space with no missing regions. Then the number of dimensions is one less than the number of boundaries in the simplex space. To create more complex spaces, find the cospace which I can do without mention of the implicit dimension. With the cospace, you can extend the simplex with a sections space determined by any region in the cospace. In previous posts, I constructed the cospace by interpreting points as planes, after converting to vectors. That required choosing a partial ordering of the regions. Constructing a cospace without vectors does not require choosing a partial ordering. Because only outside regions have regions opposite all boundaries, inside regions can be specified by boundary sets. Thus, a space can be represented by a set of boundary sets. A similar representation of regions as boundary sets is also a good way to test equivalence between spaces. With that representation, only permutations of boundaries must be tried; permutations of regions are abstracted away. Trying permutations of boundaries does not suffice to find polytope equivalence. This is because a polytope is specified by a set of spaces constructed from the significant boundaries of significant vertices in the polytope, and vertex spaces have only outside regions.individkidhttp://www.blogger.com/profile/12926316060956277498noreply@blogger.com0tag:blogger.com,1999:blog-3543545167011713606.post-54503105305319030642016-01-26T13:30:00.001-08:002016-01-26T13:54:41.977-08:00Dooy Binary SystemThe Dewey Decimal System is inadequate for online content. More than one dimension is required. But who chooses the dimensions? Rather, let people partially specify boundaries and points, and let there be as many dimensions as necessary to keep the space linear. By partially specify I mean they would create new boundaries by supplying two disjoint sets of points. Also, they could refine a boundary's position by adding points to the boundary's sets. The given points could be new or extant. Only adding a point to both sets of a boundary would be prohibited. An open question is whether books (pages? words?) should be points, boundaries, or regions. My intuition is that one to one between point and book would be best. Then books (pages? words?) in the same region would be similar.<div><br></div>individkidhttp://www.blogger.com/profile/12926316060956277498noreply@blogger.com0tag:blogger.com,1999:blog-3543545167011713606.post-1827772256310538652015-11-24T13:40:00.001-08:002015-11-24T23:03:42.711-08:00Redefined AgainIn previous posts I have attempted to define polytope but succeeded only in defining interesting things such as migration, convex cover, disjoint cover, round space, cospace, significant vertex. In this post I shall try again. With regard to a significant vertex V of a set of regions R, a boundary B is significant iff two regions R0 and R1 in the pencil of V are neighbors wrt B, R0 is in R, and R1 is not in R. Wrt significant vertex V of a set of regions R, a region is significant iff it is in the intersection of R and the pencil of V. Define polytope as a collection of round spaces with region sets, such that the centers of the round spaces are the significant vertices, the boundaries of the round spaces are the significant boundaries wrt center, and the region sets are the significant regions wrt center. The fact that the round spaces share boundaries captures the facet graph and coincidences of the polytope. The sidedness of the region sets in the round spaces captures the convexities around the vertices. I believe this definition is adequate to determine whether two sets of regions from the same or different spaces are embeddings of the same polytope. However, I can think of plenty of round space collections that do not embed in any flat spaces.individkidhttp://www.blogger.com/profile/12926316060956277498noreply@blogger.com0tag:blogger.com,1999:blog-3543545167011713606.post-21832909909175776302015-11-08T16:45:00.001-08:002015-11-08T17:18:58.654-08:00DomesMy understanding is that designing geodesic domes is nontrivial because there are so many choices. Here I present a way to find every dome up to complexity. Consider all sections of all spaces up to complexity. The cospace of the vertices on one of those sections has all planes through a point. Designate that point the center of a dome. The surface of the dome is the round space as defined in the "Coincidence" post. Note that not every region of the round space need be a facet of the dome. Some dome facets can be super-regions in the round space.individkidhttp://www.blogger.com/profile/12926316060956277498noreply@blogger.com0tag:blogger.com,1999:blog-3543545167011713606.post-2393056822727961592015-10-30T13:59:00.001-07:002015-11-02T09:45:44.859-08:00Vertex Cospace PolytopeIn n dimensions, each set of n boundaries is a vertex. As in the algorithm to construct an affine plane through regions, we can interpret vertices as planes to obtain a space called a cospace. Cospaces are not strictly linear. Some nonempty regions can be degenerate in the sense that more than n planes can pass through the same point in n dimensions. For example, if we construct a cospace from the vertices that lie on a particular boundary, all planes in the cospace pass through the same point. I propose that any polytope, no matter the nature of its facets, convexities, or colinearities, can be identified by the cospace of the polytope's significant vertices. <span style="font-family: 'Helvetica Neue Light', HelveticaNeue-Light, helvetica, arial, sans-serif;">A vertex is significant if some polyant of each proper superpencil is improper wrt the regions in the polytope. A superpencil is a pencil of a subset of the boundaries of a pencil. A pencil of a set of boundaries is the set of regions with neighbors wrt the boundaries. A region is a neighbor wrt boundaries if it's sidednesses are the same, except opposite for the boundaries. A polyant is the regions on the same side of a set of boundaries. A polyant of a pencil is the intersection between pencil and polyant. </span>individkidhttp://www.blogger.com/profile/12926316060956277498noreply@blogger.com0tag:blogger.com,1999:blog-3543545167011713606.post-43117545663962081162015-06-29T18:28:00.000-07:002015-06-30T11:56:11.492-07:00ConnectednessIn an undirected graph, how can I efficiently keep track of how many connected parts it has. I'd like to list the nodes such that all nodes of a connected part are together. In other words, if the graph has more than one connected part, I can divide the list between two consecutive nodes, such that no connected part of the graph has nodes in both lists. Consider a list of the nodes, and connect the entries of the list by edges from the graph. Some edges connect consecutive nodes, and some edges hop over nodes in the list. If, as edges from the graph are added to the list, the list is reordered such that the number of hops is minimized, then after all edges have been added, connected parts of the graph will be together in the list. Suppose nodes of a graph are listed in some order, and the graph has two connected parts. Consider a sublist of just the nodes from one connected part in the same order as the entire list. Count the hops in the sublist. Similarly count the hops in the sublist of the nodes in the other connected part. If the sublists are dividable in the entire list, one entirely before the other, then the number of hops in the entire list is just the sum of the hops in the sublists. If the sublists are not dividable, then the number of hops is greater than the sum. Therefore, if the number of hops in the list is minimum, connected parts of the graph are dividable between two consecutive nodes in the list. Suppose I add edges to a list one at a time. I claim I can reorder the list so that the number of hops stays minimal. Suppose a list, L, with some edges has minimal hops, and I have an edge to add. Transpose the ends of the edge with consecutive nodes to shorten the new edge, so long as the number of hops is reduced. I claim the result has the minimum number of hops. Suppose the contrary, that there is a list with fewer hops. Consider that list with the new edge removed. That list has fewer hops than L. This contradiction proves my claim.individkidhttp://www.blogger.com/profile/12926316060956277498noreply@blogger.com0tag:blogger.com,1999:blog-3543545167011713606.post-76213318577891835942015-05-07T10:48:00.000-07:002015-05-07T15:04:53.237-07:00Practical UniverseIn practice, we cannot list every boundary in the same table. Granted, the number of regions grows no faster than 2^m, where m is the number of boundaries, but f(n,m), the number of regions in a space of n dimensions and m boundaries, grows no slower than m. Thus, it is practical to consider only subspaces of the universe. To claim subspaces are in the same universe, they must share boundaries, directly or indirectly, and shared subspaces must be equivalent. To crawl from one known subspace to another, there must be a way to find subspaces that share boundaries. To determine whether a polytope embedded in one subspace overlaps a polytope embedded in another subspace, we must be able to choose a superspace that is in the universe of possible subspaces. If B1, B2, ...Ba are boundaries of a new subspace of the universe, find S1, S2, ...Sb, all known subspaces with boundaries including at least one of B1, B2, ...Ba. Find subspaces T1, T2, ...Tb of S1, S2, ...Sb, restricted to B1, B2, ...Ba. Now find a superspace of T1, T2, ...Tb. First consider the case of several 1-dimensional subspaces of a 1-dimensional universe. 1-dimensional subspaces impose orderings on their boundaries. Finding a superspace of 1-dimensional subspaces involves choosing the first unchosen boundary from one of the subspaces. Note, we can only choose a boundary if it is the first unchosen from all subspaces it is in. Use recursion and the antisection theorem to construct higher dimensional superspaces.individkidhttp://www.blogger.com/profile/12926316060956277498noreply@blogger.com0tag:blogger.com,1999:blog-3543545167011713606.post-5474801409969065292015-01-16T18:31:00.000-08:002015-01-16T21:00:15.158-08:00CoincidenceConsider an m-section of an n-space. It is a coincidence for more than n-m boundaries in the n-space to contain the m-section. An m-section in an n-space is isomorphic to a 0-section in an (n-m)-space; just take any (n-m)-section by boundaries not coincident with the m-section. Consider the subspace of an n-space consisting of just the boundaries coincident at a 0-section. This subspace is isomorphic to an (n-1)-dimensional round sidedness space defined as follows. The number of regions in every subspace of a constructable round sidedness space is 2*f(n,m-1), where n is the dimension, m is the number of boundaries, and f is the number of regions in a flat sidedness space. Every region in a round sidedness space is an inside region and has a complement. To convert between flat and round sidedness spaces, construct the planes through the flat space boundaries and the center of the sphere. And construct the plane through the center parallel to the flat space. Since the round space has one more boundary than the flat space, there is a flat space for each boundary in the round space. Thus, flat sidedness spaces of n dimensions and m boundaries are classified into disjoint sets, each corresponding to a different one of all possible kinds of coincidence between m+1 boundaries in (n+1)-dimensional space. Spaces in the same class are called rotations of one another. A set of boundaries B in an n-space can collapse to coincide at a 0-section iff none of the inside regions of the B-subspace are divided. Then a new n-space may be found by finding a new B-subspace with the same outside regions. This is a generalization of migration defined in previous posts.individkidhttp://www.blogger.com/profile/12926316060956277498noreply@blogger.com0tag:blogger.com,1999:blog-3543545167011713606.post-61498496351974983862014-12-24T10:33:00.000-08:002015-01-11T10:20:09.879-08:00EmbeddingsNaively, a polytope is a collection of regions. This concept of polytope as a collection of non-overlapping convex regions has the advantage of specifying the surface. However, I would prefer to define a polytope as a collection of qualities, such as facet relations, convexity, and colinearity. Rather than list and define every quality of polytopes, it is easier to define transformations of region sets, and define an invariant for those transformations. Given a set of regions, I can add a boundary and the shape of the result is unchanged. Similarly, I can move a boundary, and even cause a migration of the underlying space without changing the shape of the polytope embedded in the space. Start with a partition of the regions in the polytope that excludes unnecessary boundaries, and specifies which portions of the boundaries are relevant. This sort of partition is explained in the prior post, "<a href="http://sidegeo.blogspot.com/2012/12/polytopes-convexity-collinearity.html">Polytopes, Convexity, Colinearity</a>". Consider the power set of the partition. Choose those elements of the power set that form (convex) super-regions. Each of these elements has well defined sidedness wrt a subset of boundaries in the original space. Define a tristate space as a sidedness space where some sidednesses are left undefined. Map the chosen power set elements to regions in a tristate space. I claim this tristate space is invariant as required. It remains to pick a few polytope qualities and prove that region sets different in those qualities have different tristate spaces. Deferring that task, I'd prefer to identify conditions upon tristate spaces sufficient to embed them into linear spaces. Then I could count all possible polytopes of a given dimension and complexity. Define a tristate subspace as a tristate space with a set of boundaries removed, and identical regions combined. Define a linear subspace as a tristate subspace without undefined sidedness. Define a trispace subregion as one with a superset of defined sidedness. Read top-level region as one without subregions. I claim a tristate space is embeddable iff the sum of f(g(r),n) over all top-level regions r in any tristate subspace is equal to f(m,n), where m is the number of boundaries in the tristate subspace, f is the number of regions in a linear space, and g(r) is the number of boundaries in the tristate subspace r is undefined wrt. To prove this, construct the embedding by combining all linear subspaces of the tristate space. Because simplex spaces are unique up to automorphism, each boundary of the tristate space is included in a linear subspace. The resulting recombined space is linear because its subspaces are linear, and it is an embedding because its boundaries have the same sidedness.individkidhttp://www.blogger.com/profile/12926316060956277498noreply@blogger.com0tag:blogger.com,1999:blog-3543545167011713606.post-45198156086909926812014-11-06T20:20:00.002-08:002014-11-06T20:20:55.485-08:00PerspectiveA complement of a region is the region separated by all boundaries. A subsection is a section or a section of a subsection. An <b>n</b>-section is an <b>n</b>-dimensional subsection. A shell of a region is all regions attached to the region.<br /><br /><br /><h2><b>Complement Region Theorem</b></h2><br />The complement of each outside region is outside, and the complement of each inside region is empty.<br /><br />Consider a 1-dimensional subsection <b>L</b> with outside region isomorphic to an outside region <b>R</b>. The hops of <b>L</b> are ordered. The first hop of <b>L</b> is a hop across a boundary of the shell of <b>R</b>. Each hop reverses the sidedness of another boundary, and <b>L</b> hops across each boundary once and only once. The last hop of <b>L</b> reverses the last boundary, bringing us to the complement of <b>R</b>. Thus the other outside region of <b>L</b> is isomorphic to the complement of <b>R</b>. By the Complement Region Lemma (unproven), the complement of <b>R</b> is outside.<br />Suppose regions <b><nobr>R<sub>0</sub></nobr></b> and <b><nobr>R<sub>1</sub></nobr></b> are complementary, and <b><nobr>R<sub>0</sub></nobr></b> is inside. By the Subsection Theorem (unproven), there is a 1-dimensional subsection <b>L</b> with regions isomorphic to <b><nobr>R<sub>0</sub></nobr></b> and <b><nobr>R<sub>1</sub></nobr></b>. Since <b><nobr>R<sub>0</sub></nobr></b> is inside, the number of boundary reversals between <b><nobr>R<sub>0</sub></nobr></b> and <b><nobr>R<sub>1</sub></nobr></b> is not all, so they are not complementary.<br /><br /><br />Consider a set of regions as a polytope. In the section by a boundary, of the space with the boundary removed, facet regions are those isomorphic to regions with both polytope and non-polytope subregions.<br /><br />A perspective is determined by a choice of outside region, the region containing the focal point. Assume the regions in a polytope have "nearness" of "true". For each region <b><nobr>R<sub>0</sub></nobr></b> in the polytope with neighbor <b><nobr>R<sub>1</sub></nobr></b> not in the polytope separated by boundary <b>B</b>, find whether the perspective region is on the same side of <b>B</b> as <b><nobr>R<sub>1</sub></nobr></b>, and xor that with nearness of <b><nobr>R<sub>0</sub></nobr></b>. Then take the section by <b>B</b> of the space with <b>B</b> removed, and use the xor result as nearness for the facet region isomorphic to <b><nobr>R<sub>0</sub></nobr></b> and <b><nobr>R<sub>1</sub></nobr></b>. Choose any outside region for perspective in the section. Nearness of the only region in a 0-section determines whether it is an entry or exit. Thus, 1-sections get direction, 2-sections get clockwisedness. A necessary condition for visibility of a facet is that the facet is nearer than its polytope region. By the Perspective Theorem below, facets may be ordered by a topological sort of 1-sections from the perspective region to its complement. This is useful in computer graphics.<br /><br /><br /><h2><b>Perspective Theorem</b></h2><br />The orderings of regions determined by 1-dimensional subsections from an outside region to its complement form a partial ordering of all regions.<br /><br />Consider two 1-dimensional subsections between outside region <b><nobr>R<sub>0</sub></nobr></b> and region <b><nobr>R<sub>1</sub></nobr></b>. Boundary <b>B</b> separates <b><nobr>R<sub>0</sub></nobr></b> and <b><nobr>R<sub>1</sub></nobr></b> in one subsection iff it does in the other. Therefore a region ordering set up in both subsections must be the same in both subsections.<br /><div><br /></div>individkidhttp://www.blogger.com/profile/12926316060956277498noreply@blogger.com0tag:blogger.com,1999:blog-3543545167011713606.post-68768112799317408492014-09-26T12:59:00.000-07:002014-09-26T12:59:35.932-07:00Construction AlgorithmGiven a finite linear space, the Constructibility Theorem proves that there exists a set of isomorphic linear surfaces. However, the Constructibility Theorem does not provide an algorithm for producing sample isomorphic linear surfaces. Here I will present such an algorithm. The input to the algorithm is a set of linear surfaces <b>B</b> in a space of dimension <b>n</b>, and a set of regions <b>R</b> isomorphic to a linear section. The output is a linear surface dividing the regions in <b>R</b>. Choose a linear surface <b>b<sub>0</sub></b> and <b>n</b> noncoincidental points <b>p<sub>0</sub></b>, <b>p<sub>1</sub></b>, ... <b>p<sub>n-1</sub></b> on <b>b<sub>0</sub></b>. Let <b>f</b> map each linear surface <b>b</b> to a point <b>p</b> with coordinates equal to the lengths of the segments perpendicular to <b>b<sub>0</sub></b> from <b>b</b> to <b>p<sub>0</sub></b>, <b>p<sub>1</sub></b>, ... <b>p<sub>n-1</sub></b>. I claim that <b>f</b> maps linear surfaces through the same point to points on a linear surface. Thus <b>f</b> determines mapping <b>g</b> from points to linear surfaces. Since <b>b<sub>0</sub></b> provides an orientation, two linear surfaces can be opposite or on the same side of a point. Let <b>Q</b> be the intersection points of each <b>n</b>-tuple from <b>B</b>, and <b>D</b> be the linear surfaces mapped to from <b>Q</b> by <b>g</b>. <b>D</b> forms a finite linear space with regions corresponding to sections in <b>B</b>. To find a linear surface dividing the regions in <b>R</b>, find which side of <b>R</b> each point in <b>Q</b> is on. Use those sidednesses to determine a region <b>x</b> in <b>D</b>. Choose a point <b>y</b> in <b>x</b>. Apply the inverse of <b>f</b> to <b>y</b> to obtain a linear surface dividing the regions in <b>R</b>.<br /><br />I must prove that the map <b>g</b> from point to linear surface is well defined.<br /><br />Consider a linear surface <b>b</b> through point <b>p</b> that <b>f</b> maps to coordinates <b>c<sub>0</sub></b>, <b>c<sub>1</sub></b>, ... <b>c<sub>n-1</sub></b>. Since <b>b</b> goes through <b>p</b>, one coordinate <b>c<sub>i</sub></b> depends on the other coordinates. If every coordinate except <b>c<sub>i</sub></b> and one other <b>c<sub>j</sub></b> is held fixed, then by similar triangles, <b><nobr>c<sub>i</sub> = dc<sub>j</sub> + e</nobr></b>, for some scalars <b>d</b> and <b>e</b>. Thus, the dependence of <b>c<sub>i</sub></b> upon the other coordinates is the affine composition of affine functions. Therefore, the coordinates lie on a linear surface.<br /><br />Implications of this algorithm for abstract linear spaces include that every linear space of the same number of boundaries has the same number of sections, and that the notion of sidedness of <b>n</b>-tuples of boundaries wrt boundaries is well defined.<br /><br /><h2>Section Space Theorem</h2>If space <b>S<sub>0</sub><sup>n</sup></b> is linear, then there exists linear space <b>S<sub>1</sub><sup>n</sup></b>, unique up to isomorphism, with boundaries corresponding to <b>n</b>-tuples of boundaries from <b>S<sub>0</sub><sup>n</sup></b> and regions corresponding to sections of <b>S<sub>0</sub><sup>n</sup></b>.<br /><br />The proof follows from the algorithm above.individkidhttp://www.blogger.com/profile/12926316060956277498noreply@blogger.com0