Difference between revisions of "OnCanvasSymmetryTool"

From Inkscape Wiki
Jump to navigation Jump to search
Line 18: Line 18:
 
[[Media:WallpaperTransformations.png | Transformation base tiles for wallpaper groups]]
 
[[Media:WallpaperTransformations.png | Transformation base tiles for wallpaper groups]]
  
In order to choose the symmetry relationships that will produce the desired effect, the user must understand how clones of the base tile will be transformed.  For example, if the user selects a symmetry type of PM, they will want to know at a general level that the  tile will be reflected in one direction and translated in an orthogonal direction.  At a more specific level, they will want to know which direction and how far the pattern will be translated and across what line the pattern will be reflected.
+
In order to choose the symmetry relationships that will produce the desired effect, the user must understand how clones of the base tile will be transformed.  For example, if the user selects a symmetry type of CMM, they will want to know at a general level that the  tile will be reflected in two orthogonal directions and rotated 180 degrees in a diagonal direction.  At a more specific level, they will want to know across what lines the pattern will be reflected and what is the pivot point for the rotation.
  
 
An on-canvas visualization of the base tile and of the tiling pattern is proposed.
 
An on-canvas visualization of the base tile and of the tiling pattern is proposed.
  
 
* Draw the outline of the base tile using different line styles and markings to indicate the transformation operations.
 
* Draw the outline of the base tile using different line styles and markings to indicate the transformation operations.
* Draw a grid showing how the base tile will be translated across the plane.  Cloned tiles will appear in the cells of the grid.
+
* Draw a grid showing how the base tile will be transformed to cover the plane.  Cloned tiles will appear in the cells of the grid.
 +
 
 +
The following picture shows what this might look like:
  
 
[[File:cmmExample.png]]
 
[[File:cmmExample.png]]
 +
  
 
== Implementation Considerations ==
 
== Implementation Considerations ==
Line 35: Line 38:
 
# The mathematics of the operation
 
# The mathematics of the operation
  
 
+
UC 1) '''Grid for symmetry groups'''
* '''Guides for symmetry groups'''
 
 
** ''User interaction''
 
** ''User interaction''
*** User enables guide display through menu or keyboard accelerator
+
*** User enables grid display through menu or keyboard accelerator
 
** ''SVG markup''
 
** ''SVG markup''
 
*** Requires the base tile markup to have the following information:
 
*** Requires the base tile markup to have the following information:
 
**** inkscape:tile-x0, inkscape:tile-y0, inkscape:tile-w, inkscape:tile-h (These items are already part of inkscapes Cloned Tile dialog.)
 
**** inkscape:tile-x0, inkscape:tile-y0, inkscape:tile-w, inkscape:tile-h (These items are already part of inkscapes Cloned Tile dialog.)
 
**** inkscape:tile-type (This attribute is new for this feature.  It stores the wallpaper symmetry group type. P1, P2, CMM etc)
 
**** inkscape:tile-type (This attribute is new for this feature.  It stores the wallpaper symmetry group type. P1, P2, CMM etc)
*** Requires the cloned tile markup to have the following information:
 
**** transform - this attribute contains the transformation required to map the base tile outline to the cloned tile outline.  This is the same transformation that is applied to the base tile object to obtain the size, position etc of the cloned object.  Note that the base object may have been translated away from its original position.  This translation
 
 
** ''Math''
 
** ''Math''
 
*** For each symmetry group type, determine the shape, size and position of the base tile.
 
*** For each symmetry group type, determine the shape, size and position of the base tile.
*** TODO This is currently done in symmetry-tool.cpp but should be documented here.
+
*** This information is documented in the code.  See symmetry-tool.cpp.  It is based on the algorithm currently used in the Create Tiled Clones... dialog.

Revision as of 20:57, 6 June 2012

The On-Canvas Support for Creating and Modifying Wallpaper Symmetry Groups is based on the functionality currently available in the "Create Tiled Clones ..." dialog.

Description

Redesign parts of the Cloned Tiles User Interface. In particular, this project will focus on on-canvas control of the size, position, orientation and skew of the boundary of the base tile as well as on-canvas control of the number and “placement” of cloned tiles (placement refers to the attributes currently specified either by the row/column or the width/height fields in the current Create Cloned Tiles dialog).


Related Blueprints

- Tiling Tool for Wallpaper, Radial and Line tiling

- Symmetrical Drawing

Use Cases

UC 1) User has created one or more objects which they want to replicate using a group of symmetry relationships (rotation, reflection, translation or glide). The user must choose a symmetry group or create their own set of transformation rules.

Transformation base tiles for wallpaper groups

In order to choose the symmetry relationships that will produce the desired effect, the user must understand how clones of the base tile will be transformed. For example, if the user selects a symmetry type of CMM, they will want to know at a general level that the tile will be reflected in two orthogonal directions and rotated 180 degrees in a diagonal direction. At a more specific level, they will want to know across what lines the pattern will be reflected and what is the pivot point for the rotation.

An on-canvas visualization of the base tile and of the tiling pattern is proposed.

  • Draw the outline of the base tile using different line styles and markings to indicate the transformation operations.
  • Draw a grid showing how the base tile will be transformed to cover the plane. Cloned tiles will appear in the cells of the grid.

The following picture shows what this might look like:

CmmExample.png


Implementation Considerations

For each proposed feature, three things must be considered:

  1. The user interaction
  2. How the SVG markup is affected
  3. The mathematics of the operation

UC 1) Grid for symmetry groups

    • User interaction
      • User enables grid display through menu or keyboard accelerator
    • SVG markup
      • Requires the base tile markup to have the following information:
        • inkscape:tile-x0, inkscape:tile-y0, inkscape:tile-w, inkscape:tile-h (These items are already part of inkscapes Cloned Tile dialog.)
        • inkscape:tile-type (This attribute is new for this feature. It stores the wallpaper symmetry group type. P1, P2, CMM etc)
    • Math
      • For each symmetry group type, determine the shape, size and position of the base tile.
      • This information is documented in the code. See symmetry-tool.cpp. It is based on the algorithm currently used in the Create Tiled Clones... dialog.