7-9.01.2014 Assignment6: Project description

Today in class I presented a project which I have been working on, on and off, for several years.  It is a visualization of the Schatz linkage.  You can access the webstart I showed here. The video I showed at the beginning of the class can be seen here. The pictures of the wooden oloid which Thomas Neukirchner made can be found here. Thomas’s diagrams and plywood models of the oloid can be found here.  The latest edition of Paul Schatz’s book Die Welt ist Umstülpbar: Rhythmusforschung und Technik can be found here on Amazon.  If you are interested in this theme then mark your calender for April 4-6, when there will be a weekend event in Berlin devoted to themes related to Paul Schatz’s research.  A few more details can be found here.

On Thursday, Jan. 9, we will take some time to evaluate this “project presentation” in regard to the various criteria mentioned in the evaluation handout.  Be there or be square!  I will also discuss the half-edge data structure and demonstrate some advanced features of the discretegroup package, and, if time permits, more!

Assignment 6: As discussed in class on our final meeting before the holidays, the next assignment is not a programming assignment but rather a planning assignment.  I ask you to enter a description of your project as a comment to this blog post.  Use the account name studentmv with the clever password.  Please  sign your comment with either your name(s) or with your student number(s).  Your comments are due as usual on Friday at midnight.  (That’s Friday Jan. 10).   The details of the description are provided below, but first comes a “news flash” regarding a change in the way property files are handled in the basic template.Assignment class.

Improved way to provide property files. Although I didn’t do much work over the holiday break, I did play around some with webstarts — enough to realize that the current way that property files are handled doesn’t work with webstart technology.  So I’ve figured out a new way to handle property files that does work with webstarts, and has other advantages.  Here’s how it works:

  • If you have a class named MyAssignment.java that inherits from template.Assignment, then store off the properties in a file named myAssignment.xml (note the leading lower case letter!) in the same folder as MyAssignment.java. Implement the method getPropertiesFile() to return null.  Or, remove your implementation of the method, it’s no longer an abstract method and by default it returns null.
  • That’s all you have to do.  Now your class should read the property file correctly whether run “normally” or as a webstart application (which your project application will ultimately need to do).
  • Please try this out to make sure it works for you — if you don’t change anything the old code will continue to work but you should get used to using the new approach.

What to include in your description. 

  1. Mathematics. The description should begin with the mathematical content of the project.  Try to be as precise and accurate.  Zoom in gently — make clear to which domain of mathematics this content belongs.  Use technical language if necessary to specify this.  If possible, include one or two references (either articles or books) which provide a more detailed description of the context of your project.  None of the projects exists “in a vacuum”, give a pointer to your point(s) of departure.
  2. Software design. Begin this section by a statement describing the concrete goal of your project.  For example, “We intend to create an application to allow the user to explore the 3-dimensional kaleidoscopes introduced above [in the mathematical section].”  Describe then the software tools and building blocks you think you will need in order to realize this aim, and how they will be put together.  For example, building blocks might include “jReality geometry factories, the de.jtem.halfedge package, and the de.jtem.discretegroup package”; additionally indicate which parts of these building blocks you will use and how they will be combined.  Think if this as the blueprint for your project.  Of course at this stage of the planning it shouldn’t be too detailed.
  3. User experience. Finally, briefly indicate how you envision a typical “usage cycle” of your program.  What choices does the user have, how can he/she interact with the software sketched in the previous section?  Can the user save the state of the program from one invocation to the next? Will you rely on sliders and dials, or have you ideas for innovative interactive tools?  Will your application be particularly aimed at the PORTAL? Will there be a connection to 3D printing?

 

17-19.12 Magic Theorems

New Math this week:  the main results this week involved the so-called Magic Theorems, that establish important results about the orbifold notation we have been learning to use to name symmetry groups.  To understand the theorems we need to introduce the basic symbols for the notation.

  • $\large *$ Represents a mirror line
  • X Represents a glide reflection
  • $n\in \mathbb{N}$ represents a natural number $n > 1$, a rotation center of order $n$.
  • $O$ represents a pattern without any of the above features.

To each of these symbols there is a cost associated.  By considering all possible valid strings consisting of these symbols, one can then associate to each string a cost by summing over the costs associated to the constituent symbols.  One obtains some beautiful theorems.  But first we need to introduce some further concepts.

The Euler characteristic of a surface.   Suppose I have a set of polygons with the property that every edge is shared by exactly two polygons.  This set of polygons is called a 2-complex and determines a two-dimensional surface without boundary. Consider 2-complexes which yield the 2-sphere as surface.  Let V, E, and F denote the number of vertices, edges, and faces, resp. in the 2-complex. Then we showed by considering the platonic solids that $V-E+F=2$ for these surfaces, and gave reasons to believe that this relation is always true.  We define the associated function for a 2-complex $c$: the Euler characteristic $\lambda(c) := V-E+F$.  For a 2-sphere, $\lambda(c) = 2$.  Considering the 1-holed torus we showed that $\lambda(c)=0$ and, in general, for n-holed tori, $\lambda(c) = 2-2n$.

Euler characteristic of orbifolds. By considering the orbifolds we have been studying, we were able to extend the notion of Euler characteristic to these spaces, too.  The key idea is to introduce fractional points and edges at points and edges which are fixed by some group element.  One determines the fractional weights so that the resulting weights add up to 1 wherever the stabilizer of the group is non-trivial.  That is, make sure that the statement: “The copies of the fundamental domain cover the plane (or sphere) without overlap” remains true.

The cost function.  The cost function is defined as follows:

  • $k(*) = k(X) = 1$,
  • $k(n) = \dfrac{n-1}{n}$ if it comes before any $*$ in the string, otherwise $k(n) = \dfrac{n-1}{2n}$.
  • $k(O) = 0.

Example: Let $s = 235$.  Then $k(x) = \dfrac{1}{2}+ \dfrac{2}{3} + \dfrac{4}{5} = \dfrac{118}{60}$.

Magical theorem for spherical groups:  Let $s$ be a valid string consisting of the above symbols.  Then the cost function $k(s) < 2$ exactly when $s$ describes a spherical orbifold $\mathcal{O}$.  In this case, the Euler characteristic of $\mathcal{O}$ is $\lambda({\mathcal{O}}) = 2-k(s)$, and the symmetry group of  $\mathcal{O}$ has order $\dfrac{1}{\lambda({\mathcal{O}})}$.

Example:  Applied to $235$, one obtains that this orbifold has Euler characteristic $\dfrac{1}{60}$ and the symmetry group has order 60.

There is a similar, simpler theorem for wallpaper groups.

Magical theorem for spherical groups:  Let $s$ be a valid string consisting of the above symbols.  Then the cost function $k(s) = 2 $ exactly when $s$ describes a spherical orbifold $\mathcal{O}$.

Further research: Note that the theorem makes no claims regarding the order of the group, since they are all infinite groups.One important invariant of a wallpaper group is the order $O_T$ of the translation group within the full group.  Can you find a way to derive this invariant from the Conway-Thurston orbifold notation for the group?

Further reading:  See the book Symmetry of Things by John Conway, et. al., Chs. 3, 4, and 6 for details and proofs of all the above themes and claims.  The book can be found  in the math library “Apparat”.

10-12.12 Still more symmetry groups

Important scheduling decision: Today in class we determined that the presentations for the summer semester would be held during the  first two weeks Tuesday, April 1 – Friday, April 11, although lectures begin only on April 14.  This choice was proposed by Mr. Gunn, since Easter school vacations run from April 14-April 28 and he has plans for family vacation during this time.  It’s also likely that getting the presentations over before the semester lectures start will be healthy for everyone involved.

Important calendar dates this year.  Mr. Gunn can’t resist pointing out the following dates from this semester are … well if not significant at least interesting:

  • 7.11.13   The last time three consecutive primes will occur in a date until next century.
  • 5.12.13   A Pythagorean triple date.  This won’t happen again until 17.8.15 — Mr. Gunn believes.  Can anyone prove or disprove this?
  • 11.12.13  Three consecutive whole numbers.  Won’t happen again until next century.

List of Projects.  Here is a list of possible projects from Mr. Gunn’s fantasy land. Also, take a look at last year’s projects to see how such an idea can be implemented.  The projects entitled “Creation of Escher Tilings”, “A 3D Kaleidoscope” and “Dynamical Wallpaper Patterns” could be reworked again this year as there remains quite a lot to do. Of course you’re encouraged to come up with your own project ideas also.  I would like to meet with each team before Christmas to discuss the state of your project! One possibility would be to use the tutorials next week for this purpose.  If there are no objections I’ll prepare a sign-up sheet to pass around on Thursday’s lecture. (12.12.13).

Wallpaper group resource: The following chart  contains a list of all 17 wallpaper groups including the standard fundamental domains and the generators used in the discretegroup WallpaperGroup class.

The 17 wallpaper groups

The 17 wallpaper groups

George Hart videos.  I encourage you to take a look at the mathematical videos from George Hart, an American mathematician who does lots of interesting stuff with symmetry groups.  In particular, check out the videos involving group mathematical sculpture constructions (“Geometric barn-raising”). For example, this one.  I think we should consider doing something like this as a class after we come back from Christmas and hanging the result in the ground floor of the math building (outside of the lecture hall 005, etc).

10.12 Mathematics. Mr. Gunn introduced the remaining spherical groups, the ones that do not preserve 2 antipodal points.  They are the symmetry groups of the platonic solids. To be precise, the groups and the platonic solids are:

  • *233    tetrahedron
  • *234    cube and octahedron
  • *235    pentagon dodecahedron

There are also the rotational subgroups of these groups: 233, 234, and 235.

Mr. Gunn explained how the fundamental region for these groups can be arrived at by splitting an equilateral spherical triangle into 6 smaller right triangles with angles $\dfrac{\pi}{2},\dfrac{\pi}{3},\dfrac{\pi}n$ for $n\in \{3,4,5\}$.  As a result these groups are known as triangle groups.  Check out the triangle group application here, or access it in eclipse via “Referenced Libraries->discretegroupCGG.jar->discreteGroup.demo.TriangleGroupDemo.class” then right-click and “Run as …->Java application”.

3*2. Finally there is the group 3*2 which has three mutually perpendicular mirrors which split the sphere into 8 right-angled triangles; in the center of the triangle is a rotation center of order 3.  Assignment5 doesn’t work quite right with this group, you are encouraged to fix it and send Mr. Gunn the result.

Euler characteristic.  In discussing the platonic solids Mr. Gunn pointed out that the number of vertices V, the number of edges E, and the number of faces F in all the platonic solids obey the law $V-E+F=2$.  He showed that standard operations to insert faces, edges, or vertices also leave the value of $V-E+F$ invariant.  This value is called the Euler characteristic of the surface E(S).  It is a topological invariant of the surface (in this case the sphere).  By considering a torus rolled up out of a single quadrilateral, one was able to calculate that for the torus $E(S) = V-E+F=0$.  For a two-holed torus one can show (by folding it up from 1 octagon) that $E(S) = V-E+F=-2$.

In general, E(S) = 2$(1-g)$ where $g$ is the genus of the surface (the number of holes it has). Mr Gunn claimed but postponed proving that the Thurston-Conway notation for 2-orbifolds and 2-manifolds has a close connection to the Euler characteristic.  He indicated that if one takes the name of an orbifold $\mathcal{O}$ as a sequence of symbols, one can attach a “cost” function K(s) to each symbol $s$ in such a way that the sum $\Sigma$ of the costs of all the  symbols satisfies $E(\mathcal{O}) = 2-\Sigma$.  Of course one also has to define what is meant by the Euler characteristic of $\mathcal{O}$, since up til now we only know what it means for a sphere or other compact orientable surface. So that will happen on Thursday 12.12

Christmas ornament application. To demonstrate these groups, Mr. Gunn hooked up the beamer and fired up template.Assignment5 from the git repository.  There’s a blog post on this application here and an image album here. You’re encouraged to play with this application to get a feel for these spherical groups.

9.12 Assignment5

Update 16.12.13: I’ve fetched all the Assignment5’s I could find.  If there was a problem with yours, I’ve sent you an e-mail.  Otherwise, I’ve created a picture gallery containing all the images so far received — there are 13 so we could make a lunar calendar with them!  As you see, about half are derived from the Assignment5 I distributed and the other half are original.  I’m pleased with the variety of the images. One small problem is that I don’t know how to label the images. If you’d like to have a label attached to your image — and I think that would be a good thing — please e-mail me the text for the label. Try describing it in 50 words or less.

I’ve described what I expect for Assignment5 in this blog post.  However if you are having trouble generating an image, I’ve checked in an Assignment5 class to the repository.  It’s an application which uses some symmetry groups of the 2-dimensional sphere to create Christmas ornaments.  You are free to adapt it to create an image for the Christmas calendar.  Just be sure that you find a way to customize the code to add new functionality, using the existing code to make an image is not acceptable.  I wasn’t able to document the code exhaustively but it should be possible to understand what’s going on well enough to modify it.

The application uses instance of the class TriangleGroup. There is a choice of 3 diferent plugins:

  1. Default: use default triangle in which the three vertices lie on the surface of the sphere.
  2. Perpendicular cut is more complex.  One chooses one of the 3 vertices and creates a new triangle lying in the tangent plane to the sphere at this vertex. To obtain the other vertices, the lines joining the original vertices to the origin are extended until they cut this tangent plane. Furthermore, for rotation groups, the original triangle is doubled to obtain a true fundamental domain.  Furthermore a piece of the boundary of this region is saved off into a field curve of type double[][].  This isn’t used directly by this class but subclasses (such as Twirly below) can use it to generate interesting geometry.
  3. Twirly builds on the polygon  P found above to create a surface by iteratively applying a matrix to a subset of the boundary of P.  The matrix is determined by 3 real parameters: a scale, a translate, and a rotation angle. The code shows the use of the class CurveCollector, which allows you to construct a surface swept out by a series of curves (each of the same number of vertices).
    1. For a related application showing the use of such an “iterated matrix” run the ElephantTrunk webstart, or create a run configuration in eclipse: run “charlesgunn.jreality.viewer.PluginSceneLoader” with the program argument “charlesgunn.jreality.worlds.ElephantTrunk”.

Images. The following images show first the default fundamental region.  The next three show the perpendicular cut with the 3 different choices of vertex.  Finally, there are some images showing the Twirly plugin at work.

You can also use template.Assignment5 as the basis for the actual Assignment5, to create an image for our Christmas calendar.  To use it for this you’ll need to write a plugin class that does more than what the template version provides. The possibilities are endless (IMHO).

You can see all the images as a single album at my Google+ photo site.assg5-deftri-transp-01assg5-perpCut-0-transp-01assg5-perpCut-1-transp-01assg5-perpCut-2-transp-01

The twirly plugin acting on the group 234 with perpendicular cut at vertex with order-4 rotation.

The twirly plugin acting on the group 234 with perpendicular cut at vertex with order-4 rotation.

 

A single copy of the Twirly surface for the group 234 (group of order 24).

A single copy of the Twirly surface for the group 234 (group of order 24).

The remaining images show results for the Twirly plugin, using a variety groups, and a variety of settings for the parameters for constructing the matrix.assg5-2013-twirly-235-negTr-v0-01

assg5-2013-01assg5-2013-02

An example of the group 3*2, the only point group containing a mirror which is not a mirror group.

An example of the group 3*2, the only point group containing a mirror which is not a mirror group.

assg5-2013-04

Group 235 flattened at order-2 rotation center

Group 235 flattened at order-2 rotation center

Group 235 flattened at order-5 rotation.

Group 235 flattened at order-5 rotation.

Group 234 flattened at order-2 rotation.

Group 234 flattened at order-2 rotation.

Group 234 flattened at the order-2 rotation

Group 234 flattened at the order-2 rotation

assg5-2013-twirly-235-negTr-v0-01

3-5.12 Normal Subgroups and More

Note: The tutorials next week will meet in the PORTAL (Second floor, same end of the building as BMS).  We will have a demo of the facilities there, including the 3D printing and scanning area.

Assignments. The continuation of Assignment 4 is described in the previous post.  It’s due this Friday Dec. 6.   Assignment 5 — creation of a Christmas calendar image — is also described there.  It’s due on Dec. 13.  December 9: See this update.

03.12.13:  Mr. Gunn continued the guided tour of the planar symmetry groups by considering symmetry groups of the plane with 2 independent translations: the wallpaper groups.  In contrast to the frieze groups, they can have rotational symmetries of order greater than 2.

Wallpaper group application. You can  run a jReality wallpaper group application from your eclipse project by navigating in the Package Explorer to “Referenced Libraries->discretegroupCGG.jar->discreteGroup.wallpaper.WallpaperPluggedIn.class” and then using right-mouse click to choose “Run as … Java application”.   (Here is a Java webstart of the same application. But be careful — if you run it under Java 7, which is sometimes difficult to avoid with webstarts, make sure the left hand panel is hidden or it runs v e r y slowly.) This application allows you to experiment with all 17 wallpaper groups — see the “Wallpaper” menu and the left inspection panel.  Here’s a picture generated the group 244 with the automatic painting option (choose “Wallpaper->run” option):

wallpaper2013demo-01

Wallpaper group resource: The following chart  contains a list of all 17 wallpaper groups including the standard fundamental domains and the generators used in the discretegroup WallpaperGroup class.

The 17 wallpaper groups

The 17 wallpaper groups

More group theory. To obtain a good answer for Assignment 4 it’s useful to understand a bit more about the internal structure of the frieze groups.  It turns out the the translation subgroup plans an important role.  To understand this, we need to introduce some notation.

Definition: A subgroup $H$ of a group $G$ is normal if $gHg^{-1} = H \forall g \in G$. We write $H \trianglelefteq G$.

Theorem: The translation subgroup $T$ of a euclidean group $G$ is a normal subgroup.

Proof:  A general  isometry $g$ can be written as $g(\mathbf{X}) = A.\mathbf{x} + T$ where $A \in O(n)$ is an orthogonal transformation and $T \in \mathbb{R}^n$ is the vector of the translation. Then $g^{-1} = A^{-1}.\mathbf{x} + A^{-1}.T$ and writing out the composition $gSg^{-1}$ where $S$ is the translation $\mathbf{x} \rightarrow \mathbf{x} + S$ yields the result $gSg^{-1}(\mathbf{x})= \mathbf{x} + A^{-1}.S$, which is clearly a translation. \qed

Cosets.  A  subgroup $H \trianglelefteq G$ determines an equivalence relation on the group $G$ as follows: Define $\mathbf{x} \sim \mathbf{y} \iff x^{-1}y \in H$.  We leave it to the reader to verify that this is an equivalence relation.  Hence, it partitions $G$ into equivalence classes of elements.  Each equivalence class is called a left coset of $G$ with respect to $H$.  A similar definition involving $xy^{-1}$ yields the right cosets. The coset containing $id$ is clearly $H$ itself. [Exercise: when $H$ is normal, the left cosets and the right cosets coincide.] The coset containing $\mathbf{x} \in G$ is written $[\mathbf{x}]$.  [Exercise: Every element of $[\mathbf{x}]$ can be uniquely written as $\mathbf{x}\mathbf{h}_x$ for some $h_x \in H$.] Let us choose a set of representative ${\mathbf{a}_i}$ for the cosets.  Then $\mathbf{x} \in [\mathbf{a}_i]$ can be written as $\mathbf{x} = \mathbf{a}_i \mathbf{h}_x$ for some $\mathbf{h}_x \in H$.

The quotient group. The cosets of a normal subgroup have an induced group structure. Indeed, let $[\mathbf{x}]$ and $[\mathbf{y}]$ be two cosets.  Then define a product on cosets by $[x][y] = [xy]$. Using our canonical representatives we can write  the RHS as $[(\mathbf{a}_i \mathbf{h}_x) (\mathbf{a}_j \mathbf{h}_y)]$.  Now since right and left cosets are the same, there exists $\mathbf{h}^{‘}_x \in H$ such that $\mathbf{h}_x \mathbf{a}_j =   \mathbf{a}_j \mathbf{h}^{‘}_x$. Then moving parentheses $[\mathbf{a}_i (\mathbf{h}_x \mathbf{a}_j) \mathbf{h}_y] = [\mathbf{a}_i \mathbf{a}_j \mathbf{h}^{‘}_x \mathbf{h}_y] = [ \mathbf{a}_i \mathbf{a}_j]$ so the result is clearly independent of the choice of $\mathbf{x}$ and $\mathbf{y}$.

We write $G/H$ and call it the quotient group of $G$ by $H$.

Connection to Assignment 4. At the conclusion of thursday’s lecture, Mr. Gunn showed how these ideas could be applied to Assignment 4 to generate the desired list of elements of the freize groups. Here’s what the resulting code for updateCopies() looks like:

Matrix[] cosets = null;
Matrix generatingTranslation = null;
int numCosets = 0;
switch(whichGroup)	{
case 0:
	numCosets = 1;
	cosets = new Matrix[1];
	cosets[0] = new Matrix();
	generatingTranslation = MatrixBuilder.euclidean().translate(1, 0, 0).getMatrix();
	break;
case 1:
	numCosets = 2;
	cosets = new Matrix[numCosets];
	cosets[0] = new Matrix(); // identity
	cosets[1] = MatrixBuilder.euclidean().reflect(new double[]{1,0,0,0}).getMatrix();
	generatingTranslation = MatrixBuilder.euclidean().translate(2, 0, 0).getMatrix();
	break;
	// implement this group (* infinity infinity ) here as above in case 0
	// there are two vertical mirrors a distance 1 apart.
case 3:
	generatingTranslation = MatrixBuilder.euclidean().reflect(new double[]{0,1,0,0}).translate(1,0,0).getMatrix();
	numCosets = 1;
	cosets = new Matrix[1];
	cosets[0] = new Matrix();
	break;
case 6:
	// implement this group (* 2 2 infinity) here as above in case 0
	// there are two vertical mirrors a distance 1 apart and a horizontal mirror  in the line y = 0.
	generatingTranslation = MatrixBuilder.euclidean().translate(2,0,0).getMatrix();
	numCosets = 4;
	cosets = new Matrix[4];
	cosets[0] = new Matrix();
	cosets[1] = MatrixBuilder.euclidean().reflect(new double[]{1,0,0,0}).getMatrix();
	cosets[2] = MatrixBuilder.euclidean().reflect(new double[]{0,1,0,0}).getMatrix();
	cosets[3] = MatrixBuilder.euclidean().rotateZ(Math.PI).getMatrix();
	break;
        .... // other cases not included here
}
	int outerLoopCount = count/numCosets, counter = 0;
	// run through the powers of the generating translation ...
	for (int j = 0; j &lt;= outerLoopCount; ++j) {
		Matrix powerOfTranslation = Matrix.power(generatingTranslation, (j - outerLoopCount/2));
		// and multiply it on the right by each of the coset representatives
		for (int k = 0; k&lt;numCosets; ++k)	{ 			// skip over non-existing scene graph components at end 			if (counter &gt;= count) continue;
			SceneGraphComponent child = translationListSGC.getChildComponent(counter++);
			Matrix tmp = new Matrix(cosets[k].getArray().clone());
			tmp.multiplyOnLeft(powerOfTranslation);
			tmp.assignTo(child);
		}
	}

}