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:
- Default: use default triangle in which the three vertices lie on the surface of the sphere.
- 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.
- 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).
- 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.