Assignment 1: Cubic Choreography

Due date:  Friday, 01.11.2013 at 12 pm (Berlin).  The decision to extend deadline until midnight represents a compromise between wanting to preserve the weekend for recovering from the work-week, and wanting to make sure that teams can find time to get together, which can be a problem when team members attend different tutorials.  If you want to work on the extra credit assignment (see below) you have until one week later to complete that work, as I have promised some new code to assist and we won’t learn how to pull this new code until next week’s gitorious tutorials.)

Goals of assignment: This assignment is designed to develop the following skills:

  • Use of the MatrixBuilder class to construct arbitrary euclidean (or other interesting) matrices,
  • Practice in controlling and creating simple animations,  and
  • Acquaintance with the Assignment class, in particular, ability to add a slider or other GUI element to the inspector panel.

The first step in completing the assignment is to copy the assignment to a package of your own making “parallel” to the template package.  Use the “New->Package” menu item in eclipse to do say.  Please use the format studentxx where “xx” is the 2-digit number assigned to you on the latest version of the signup sheet I have circulated in class.  If you don’t know this number, send me e-mail or take a look at the sheet at the next class meeting.  Leave the name of the copy as Assignment1. Follow the directions in the JavaDoc for the class Assignment1 to complete the assignment.  In the interests of stimulating your creativity I give some ideas here for how you can fulfill the first part of the exercise, to change the matrix applied to the scene graph components in the method setValueAtTime(). Ideas for generating matrices. The calculation of the matrix depends on two helper functions:  getGeometryParameter(i,j) and scalingFactor().  The default (“template”) versions of these functions and the construction via MatrixBuilder is very simple — all cubes rotate a full turn around the y-axis, and the animation delay depends only on column of the cube array where the cube is. Both functions contain optional code which you can un-comment to obtain somewhat more interesting behavior.   Some possible further changes include:

  • getGeometryParameter(i,j):  Make the level sets of this function more interesting: diagonal lines through the array (as in the commented-code), or concentric circles or hyperbolae.  Or some completely different ordering such that each cube receives a different value based on some walk through the array.
  • scalingFactor():  The commented-out code returns an “inverted tent” function of its input.  One could smooth this out — use the method AnimationUtility.hermiteInterpolation instead of AnimationUtllity.linearInterpolation. Or redefine this function to depend directly on the (i,j) indices of the cube to obtain location-dependent scaling (now it’s only time-dependent).
  • Use other types of basic transformations in the MatrixBuilder method call.  For example:
    • Non-uniform scaling — 3 different values instead of identical values, as in the template code.  These values can also depend on the (i,j) location of the cube in the array.
    • Rotations whose axes depend on the (i,j) position of the cube in the array, or rotations through an axis which doesn’t go through the origin.
    • Translations.  One natural choice would be vertical translations (in the z-direction) which depend on time and/or position of the cube in the array. This could be used to simulate the motion of a wave through the array.
  • One can also consider changing the way the cubes are arranged, for example, replace the square with a cylinder or a torus.  To do so, one has to adjust the call the MatrixBuilder in the method setupArray().  In the template this method arranges the cubes by translating them to positions in a square array.
    • Extra credit assignment  Change setupArray() so that the (bottom faces of the) cubes are arranged without gaps or overlap on the surface of a torus with minor radius 1 and major radius R. Note: Doing this requires going beyond the capabilities of the MatrixBuilder class, since it requires mapping a square onto a non-parallelogram. As discussed in class, this can be solved using a general projectivity mapping 5 points onto 5 points (in $\mathbf{P}^3$);  I have added the corresponding method to the class Pn and you can fetch the new version next week when we learn how to do that.

I hope these suggestions stimulate you to further brain-storming. An image of a version incorporating some of these suggestions is shown below: assg1-2013-01

2 thoughts on “Assignment 1: Cubic Choreography

  1. Pingback: Course Log | Mathematical Visualization

  2. Assignment 6 student07: Project Description:
    In this project, as part of Differential Geometry, I will work on “shadow boundaries”. If one puts a light source vector on a smooth 3-d surface, then the surface is divided in two regions: the region that contains points that face away from light source, the ones within the light source, and the shadow frontier, i.e. the points on the surface that contain the light vector in their tangent plane.

    Formally, let $M$ be a closed oriented $2-$dimensional manifold, $f:M\rightarrow \mathbb{R}^3$ be a smooth immersion into Euclidean $3-$space and $n:M\rightarrow S^2$ be a unit normal vector field, or the Gauss map, induced by $f$. Then for every unit vector $u\in S^2$ (corresponding to the direction of light) the \textbf{shadow}, $S_u$, is defined by
    $$S_u=\{p\in M: > 0\}$$.

    We will explore the problem set by H. Wente on 1978 and the paper “SOLUTION TO THE SHADOW PROBLEM IN 3-SPACE” by Mohammad Ghomi.

    Software design
    With this project we will visually see some examples that $f$ is a convex embedding, i.e. $f$ maps M homeomorphically to the boundary of a convex body, if and only if $S_u$ is simply connected for each $u$. We will use jReality geometry factories, in particular ParametricSurfaceFactory, and we will
    dynamically generate textures using a bitmap drawing library to create a texture that will reflect a shadow boundary on a parametrized surface.

    User experience
    The user can choose the light vector direction, a surface from a list and rotate the view of the surfaces, while seeing the results of the shadow and the boundary of this set. The user will see examples of surfaces that create simple connected shadow boundaries and surfaces that doesn’t.

Leave a Reply