26-28.11 More Symmetries and Groups, Assignment5

Assignment5: For the class’s Christmas calendar, each group is asked to contribute one beautiful, self-made mathematical image.  Please subclass the java class template.Assignment to produce an application named Assignment5 which displays this image when it is run.  I encourage you to use this assignment as a preparation for your project — even if you don’t know what the topic of your project is!  Choose some favorite  domain of mathematics and use what you’ve learned about jReality to create an image appropriate for inclusion in a Christmas calendar.  For example, the image below shows another of my free-lance efforts for Matheon from several Christmases ago …  Assignment5 due on Dec 13 — see the next paragraph for the continuation of Assignment4, due on Dec. 6. xmasTree-01 Assignment4 continuation. I have, as promised, extended Assignment 4 to include another “assignment”. The problem with the standard painting algorithm is shown in the following image: when the center of the brush approaches the boundary of the fundamental region (always a square for these groups), it can happen that only part of the brush is painted.  See the red and blue “half-paths” which join along a seam: the red was painted with the center of the brush slightly to the left side, the blue with the center of the brush just slightly to the right.  It ain’t right — you gotta fix it.

The problem with painting a freize group.

The problem with painting a freize group.

To complete this assignment:  Please make sure your Assignment4 class subclasses from template.AbstractAssignment4 not from a copy in your student package. Then update to the latest version of my repository. You should only need to make a copy of template.Assignment4PaintTool — see the directions at the top of this file.  The new version of AbstractAssignment4 invokes this class to provide painting support — your task is to edit Assignment4PaintTool so it supports all 7 frieze groups so that no seams are visible during painting.  This assignment is due in a week, on Dec. 6.

Note: Do some of your frieze groups appear wrong (the last three groups on the menu, when there should be two rows there is only one with L’s lying on top of each other)?  If so, make sure that the updateCopies() method in Assignment4 contains the following line of code:

translate(0, (whichGroup >= 4 && whichGroup <= 6) ? .5 : 0, 0).

It could be that you made a copy of template.Assignment4Example before I included the above line of code.

Mathematical News. This week we continue the exploration of planar (or at least 2-dimensional) symmetry patterns.  The focus turned from frieze groups to spherical groups, that is, groups of isometries of the 2-dimensional sphere $\mathbf{S}^2$.  This is just the familiar orthogonal group $O(3)$, and a point group is a discrete subgroup.  Recall a discrete subgroup is one in which the identity element is isolated, there is no sequence of group elements converging to it.

Fundamental domains and quotient spaces. Before continuing the investigation of particular groups, Mr. Gunn introduced some general language.  First he observed that we are considering symmetries of 2-dimensional spaces of constant curvature, such as the Euclidean plane or the 2-sphere.  In general we call this space $\mathbf{X}$.  And a discrete group of motions will be in general denoted as $\Gamma$.  He then discussed the concept of a fundamental domain for $\Gamma$.  That is a subset $D \subset \mathbf{X}$ such that $\cup_{g\in D}{g(D)} = \mathbf{X}$ and $g_1(D) \cap g_2(d) = \emptyset$ for $g_1, g_2 \in \Gamma$. That is, the copies of $D$ cover $X$ without overlap.  Such a covering is called a tessellation – in German, Pflasterung.  We can arrive at the same concept more abstractly by defining an equivalence relationship on $\mathbf{X}$: \[ \mathbf{P} \sim \mathbf{Q} \iff \exists g \in \Gamma ~\text{such that}~ g(\mathbf{P}) = \mathbf{Q} \] The set of equivalence classes is called the quotient of $\mathbf{X}$ by $\Gamma$ and is written $\mathbf{X}/\Gamma$.  We want to understand better how such quotient spaces behave.

Simplest example: the circle as quotient of the line. Mr. Gunn explained in detail the construction of the quotient space $\mathbf{E}^1/ \{ t \}$ where $ \{ t \}$ is the discrete group generated by the unit translation $t: x \rightarrow x+1$.  He showed that $\mathbf{E}^1/ \{ t \}$ is a circle $S^1$ by twisting the line into an infinite helix so that the orbit of any point under the group lies on the vertical line passing through it.  Then, by looking down on this helix from far away, each vertical line collapses to a point and we are left with a circle.

Connection of quotient space and fundamental region. The quotient space is closely related to a fundamental domain.  A fundamental domain for this group is the half-open interval $[0, 1)$; the quotient space is obtained by taking into account the fact that $0 \sim 1$, hence we have to “glue” the two ends of the segment together to obtain the quotient space.  In short, the quotient space can be obtained from a fundamental region by remembering to glue together parts of the boundary of the FD which are identified under some group element.

Dirichlet domain.  There are many possible choices for a fundamental domain. For the groups we consider, we can always arrange that the fundamental domain is topologically an open disk along with a subset of its boundary.

The problem with overlaps. An n-dimensional euclidean manifold is a space in which every point has a neighborhood homeomorphic to $\mathbf{R}^n$. When is the quotient space a manifold?  Define the stabilizer of a point P to be the set of group elements which fix P: $s(P) := \{g \in \Gamma \mid g(P) = P\}$.  Since $\Gamma$ is discrete, $s(P)$ is finite. It is exactly  points with non-trivial stabilizers that cause overlaps in the tessellation. It’s easy to see that copies of any fundamental region will “overlap” at such points.  For let $D$ be a fundamental domain$g, h \in s(P), P \in D$.  Then $f(D) \cap g(D) = f(P) \neq \emptyset$. On the other hand, if $s(P) = \{id\}$ for all $P\in D$, then the action is called fixed-point free and the resulting quotient is a  manifold. This is equivalent to saying we can find a fundamental region whose copies cover $\mathbf{X}$ without overlap.  This is the case for example for the translation frieze group $\infty \infty$ or the group generated by one glide reflection $\infty X$.

Orbifolds to the rescue.   If $s(P)$ is not the trivial group, the quotient space $\mathbf{X}/\Gamma$ in a neighborhood of $P$ will not look like $\mathbb{R}^n$ but rather like the quotient $\mathbb{R}^n/s(P)$.   An orbifold is defined similarly to a manifold, with the looser requirement that each point $P$ has a neighborhood homeomorphic to $\mathbb{R}^n/G$ for a finite group $G$.  In effect, we “split” the point into $k$ identical “fractional” parts  (where $k = | s(P) | $) so that the $k$ “overlapping” copies of $P$ (each of size “$\dfrac1k$”) together “add up” to a single point.  In this way we can rescue the statement “The copies of D cover $\mathbf{X}$ without overlap.”

Example. Consider a rotation of order-2 in the plane and the associated cyclic group $C_2$.  The rotation center $P$ is fixed by the both the identity and the rotation, so is not trivial. In a neighborhood of $P$, $\mathbf{E}^2/C_2$ looks like a cone formed by rolling a straight angle at $P$.  [need to show a picture to explain this].

Why this is important. This relation between symmetry groups and quotient spaces is important since it turns out that every topological space can be realized in this way as the quotient of some simply-connected space by an appropriate discrete group. More on this on Thursday when I’ll show the video “Shape of Space”.  This wasn’t completely proven until the Poincare Conjecture was proved by Grigori Perelman in 2006.

The spherical groups fixing two points. We began by restricting attention to symmetry groups which fix two antipodal points.  We began by showing that there are a family of cyclic groups generated by a rotation of order $n$, fixing the north and south pole and rotating along the equator, so to speak.  One sees easily that fundamental domain for this group is a two-sided section of the sphere extending from north to south pole, whose one side is mapped to the other side by the rotation.  This region is called a bigon since it has two sides and two vertices.  Since the angle at each vertex is $\dfrac{2 \pi}{n}$, the group is called $nn$.  … to be continued … In the meantime see this Wikipedia article.

19-21.11 Symmetries and Groups, Assignment4

Current news and notes:

  • Our lectures will be held in MA 313 from now on.  This decision was met by the BMS administration since our class size exceeds the recommended seating for the room. I hope we can reproduce the U-shaped seating from 212 in 313 — with your help I think we shouldn’t have any problem adjusting the new roomier quarters.
  • Check out this attractive web-site featuring mathematical visualization and education.  It was recently awarded a gold prize in a European competition for internet and mobile apps.  I found quite a few things to like, particularly the interactive Mandelbrot zoomer.
  • Assignment4 is ready for download — although I may add something else over the weekend, the first part is ready to work on. The assignment will be due Friday 29.11 at midnite.

Symmetry and groups.  Mr. Gunn introduced the concepts of symmetry, focusing on patterns in the euclidean plane. The set of symmetries of a pattern he showed to form an algebraic structure known as a group. He introduced three categories of symmetry groups in the euclidean plane based on the translational subgroup of the group. … to be continued… Here are some good lecture notes on euclidean symmetries from last year’s course.  Here is an introduction to the Conway notation for groups.

Here is a basic treatment  by Prof. Sullivan of transformation group theory.

12-14.11 Geometry factories, Assignment3, …

Ames Room update. At the beginning of the lecture Mr. Dr. Gunn returned to exercises he gave in class last week.  He showed that the projective matrix for the simplified 2D Ames room looks like: \[ \left( \begin{array}{ccc} 1 & 0 & 0 \\ 0 & 1 &0 \\ \dfrac{1}{n} & 0 & 1 \end{array} \right)\] where $n$ is the distance in meters to the right of the eye point, which is the image of the ideal point in the x-direction.  As a result, Dr. Gunn asserted (shamelessly without proof) that any projectivity can be decomposed as the product of an affine matrix and an “Ames” projectivity — the latter being defined as a matrix, like the one above,  which is the identity matrix except in the last row.

Geometry Factories This week we turned to discussing how geometry is represented in jReality. The basic classes PointSet, IndexedLineSet, and IndexedFaceSet were introduced.  However, using these classes directly is awkward and time-consuming.  Instead, there is a set of geometry factories which do the heavy lifting and allow the user to specify the geometry in a more mathematical way.  We concentrate on the factory ParametricSurfaceFactory. This allows the user to specify an immersion of a rectangular domain in $\mathbb{R}^2$ into $\mathbb{R}^3$ or $\mathbf{P}^3$ (depending on whether one uses standard or homogeneous coordinates).

Assignment3 This assignment is designed to provide some practice in using geometry factories.  In contrast to Assignment2, where you were asked to create a scene using very simple geometry and many transformations, in this assignment you are forbidden (Verboten!) to use matrices to “create” geometry, you have to use … geometry!  Check out the latest version from the teacher git repository (the Tuesday tutorial participants have already made this step.)  However, note that even if you were at the Tuesday tutorial, you should still update again since I’ve cleaned up the assignment and focused it more on the actual task at hand — I’ve removed the torus for example and have used the time parameter to rotate the square around — which is forbidden but it’s useful to see how a simple example works.

Update to Assignment3 [15.11].  I’ve updated Assignment3Example based on an example worked out in yesterday’s tutorial, which in turn was suggested in the classroom discussion yesterday.  The result is that the example now rolls up the square into a cylinder: Assignment3-13-01

How it’s done: The first step is to set two fields in the setValueAtTime() method: the time and the radius of the cylinder r.  The radius depends on the time in such a way that it interpolates between $\infty$ and $\dfrac{1}{\pi}$ as $t$ varies between 0 and 1:

public void setValueAtTime(double d) {
        time = d;
	r = (time == 0) ? -1 : 1/(Math.PI*time);

Then when the factory is updated, the evaluate() method uses these fields to construct a section of a vertical cylinder with radius $r=\dfrac{1}{\pi}$. The time $t=0$ is handled separately to produce the beginning square. The displayed section of this cylinder is subject to two constraints:

  1. It subtends a horizontal arc length of 2 (to be consistent with the fact that the beginning square has side length 2), and
  2. The vertical mid-line of the square remains fixed in space throughout the animation.

Condition 1) implies that the section of the cylinder subtends an angle of $t\pi$ so that it has arc length 2 as desired.  Furthermore we choose the $(u,v)$ domain so that it goes from $(-1,-1)$ to $(1,1)$  and the values of $u=0$ corresponding to the vertical mid-line of the square are fixed: the square rolls up while keeping this line fixed.  In order for this line to be fixed, we calculate that the axis of the cylinder has to have $xyz$ coordinates $(0, y, r)$.  Taken together, this produces the following code for $evaluate()$:

public void evaluate(double u, double v, double[] xyz, int index) {
	double angle = time * u * Math.PI;
	xyz[0] = time == 0 ? u : r * Math.sin(angle);
	xyz[1] =  v;
	xyz[2] = time == 0 ? 0 : -r * Math.cos(angle) + r;
	xyz[3] = 1.0;

To satisfy the assignment, this animation would need to be continued so that at the end $t=1$ the cylinder has unrolled again so that the opposite side faces out.

3D Video Transitions: Practical applications of Assignment3. Due to some very important work I’m doing this week for Matheon, I’m not able to write such detailed blog posts as usual.  This movie is a “cross-eyed stereo” movie meaning if you can cross your eyes just the right amount as you watch it, the images should fuse together to produce 3D depth.  If you do view this movie, you’ll see that it consists of 3D transitions between still photos — the kind of transition I mentioned in class when I introduced Assignment3! So everything hangs together.  In any case, everything you need to know to do Assignment 3 should be contained in the Java classes from the git repository.  If not let me know. The assignment is due on Friday November 22, which is, if I’m not mistaken, the 50th anniversary of the assassination of John F. Kennedy, an event which I experienced as a 6th grader.

Assignment2 Update [11.11.2013] I’ve added some points to the discussion of Assignment2, to include how to get the inspector properly configured, and how to store and restore properties.  Please take a look at these additions and extend your own code if you need to.

  •  I’m continuing to enjoy looking at the results of Assignment2.  The assignments I’ve looked at look good. I’ve particularly enjoyed the ones with which have implemented the torus setup.  Following picture shows a frame from the animation based on a torus.  It reminds me of “op art”. They are recognizably cubes, but each looks like it was  drawn using a different perspective.Assg2-torus-01
  • I’ve added a bit more functionality to Assignment2, so you can play around with the tool in the leaf child, that I demo-ed last Thursday 07.11.13 in class. (Exercise: why is 07.11.13 a special day. Hint: it has to do with prime numbers.).  It’s designed so that if you update your repository to my gitorious repository (the one we named “teacher”) your code should continue to function unchanged, but the inspector now contains a button which allows you to activate a translate tool in the leaf component.  If however you construct your own inspector w/o using a call to super.getInspector(), this button won’t appear for you.

05-07.11 jReality scene graph, Assignment2, …

Projects: It’s still early in the process for choosing a project.  You may be interested in these guidelines from last year.

Teamwork:  You are expected to work in teams.  It’s more fun and the results are of higher quality (IMHO). We can discuss any technical problems with team building today.

05.11 Lecture: Dr. Gunn took the opportunity to present an introduction to the jReality scene graph.   Look also here for a more sober introduction to the same topic. As Assignment2 (below) is easy, you are encouraged to spend some time in the next week familiarizing yourself with the jReality developer tutorial, particularly the sections devoted to transformations, geometry, and appearances. You can do this using your browser and webstart, but if you want to play with the code for particular examples (strongly recommended), these reside in the jReality project under the src-tutorial folder.

07.11 Lecture: We looked in more detail at the SceneGraphComponent javadoc. We also looked at the base class SceneGraphNode and its subclasses. Then, departing from his original plan to discuss the  Appearance class,  Dr. Gunn turned the discussion to the tool system, and showed how to add a tool to the leaf child of Assignment2 in such a way that the resulting transformation was applied before the animation transformation (coming from setValueAtTime()), with interesting results. This discussion also hopefully established the importance of the SceneGraphPath class in determining the exact position of a node in the scene graph.

Assignment1 is completed and the results are, from my point of view, very satisfactory.  To begin with, most of the technical difficulties have been overcome and I have “harvested” git repositories for the majority of the students who have signed up for the class.  And secondly, the quality and variety of the turned-in assignments is impressive.  I only wish it were easier to collect all the different assignments into a “composite” application to be shared and enjoyed by all.  If anyone has any ideas how this can be technically achieved please get in touch with me.  Otherwise I will continue to show a few samples during the tutorial sessions as time permits.

Assignment2 is already there, due this Friday at midnight. It’s basically Assignment1 the way it should have been.  Includes storing and saving properties,  on-line documentation file, and a more modular structure.  Just take what you did for Assignment1 and convert it to the improved format.  Of course if you want to improve it (for example with the extra credit idea), please do so.  In particular, here are the directions:

  • Follow the directions here to update the course repository.  You should find a new package template.assignment2.  To prepare your own version of assignment2, do the following, assuming your package name is student007:
    • Create a package student007.assignment and copy into it the files assignment2.xml, assg2-anim.xml, Assignment2.html, and assg2-01.png.
    • In this package create a new Java class named Assignment2.  It should inherit from the class template.assignment2.Assignment2.
    • Edit the newly created class.  You should see stubs for the following methods, which are declared abstract in the superclass:
      • protected Matrix getSetupMatrix(int i, int j)
      • protected Matrix setArrayValueAtTime(double time, int i, int j)
      • protected String getPropertiesFile()
      • protected String getDocumentationFile()
    • If you look into template.Assignment2 or template.Assignment you can see how these methods should be used.
    • Copy code from your original Assignment1 into these method stubs to create a running application that does the same thing your original assignment1 did.  getPropertiesFile() should return “src/student007/assignment2/assignment2.xml” and getDocumentationFile() should return “Assignment2.html”.
    • If you’ve added a slider to the inspector (which was part of the assignment), you’ll also need to override the getInspector() method.  To add your GUI elements, you can call super.getInspector(), cast the return value to an instance of Box, and add your GUI elements to this box.  Or don’t call super.getInspector(), and construct the complete inspector in your method.
    • On a related note, if you’ve added parameters which you want to store and restore as properties, you’ll need to overwrite storeState() and restoreState() (look into the parent class to see how this is done).
    • Run the program.
      • Verify that the on-line documentation works by typing the ‘h’ key — your browser should open a window and display the provided html file.  Edit it to reflect what your group did. You can use a normal text editor to do this if you don’t have access to an html editor — just ignore all the html formatting and replace the text sections with text that describes your application.
      • Also verify that the properties file and animation file are working by changing some parameters and saving them (save the property file by choosing File->Quit, save the animation file by choosing “File->Save As…” and saving it in student007/assignment2/assg2-anim.xml.)
    • Notice that the parameters in the left inspection panel are now saved in the properties file.  If you have other parameters or have removed some of these, please overwrite the methods storeStates() and restoreStates() (see template.assignment2.Assignment2 for details).
    • Note that the inspector panel of the Assignment2 superclass contains the 5 parameters provided by the template assignment.  If you still use these but have added more of your own, you can implement the method getInspector(), and add your new GUI elements to the component which super.getInspector() returns.  (You may have to cast this to class Box to be able to add components to it.)
  • Extra credit assignment. There is now a method Pn.projectivity(double[] dst, double[][] from, double[][] to) which provides the projective matrix mapping the $n+2$ points from onto the $n+2$ points to.  Of course to get it you’ll need to update your jreality repository which we’ll do in the tutorial this week, or see the post describing the steps.

Show working version of movie on conformal maps.