Difference between revisions of "OnCanvasSymmetryTool"

From Inkscape Wiki
Jump to navigation Jump to search
m
Line 16: Line 16:
 
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.
 
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.
  
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 is the direction of translation and which direction is the direction of reflection. 
+
[[Media:WallpaperTransformations.png | Transformation base tiles for wallpaper groups]]
  
They may also wish to modify aspects of the symmetry relationships such as changing the orientation of the transformation, changing the size of the transformation (such as the distance of translation, etc)These items are covered under different use cases below.
+
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 directionAt 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.
  
 
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 an outline to show the shape and position of base tile as well as shape and position of transformed base tile.  This shape represents the shaw transformed by the underlying algorithm. If the objects in the base tile cover the entire base tile and do not go outside the base tile, this outline may be redundanthowever, in most cases, the objects do not cover the entire base tile and frequently extend beyond the edges.  
+
* Draw the outline of the base tile using different line styles and markings to indicate the transformation operations.
* Markers to show operations at edges or corners
+
* Draw a grid showing how the base tile will be translated across the planeCloned tiles will appear in the cells of the grid.
** Potential issue: Conflict with transformation markers
 
* Use different line styles to denote edges of different styles such as double line for reflection, dashed line for translation.
 
** Potential issue: Conflict with selection rectangle
 
  
The following diagram illustrates this approach:
+
[[File:cmmExample.png]]
 
 
[[Media:WallpaperTransformations.png | Transformation images for wallpaper groups]]
 
 
 
UC 2) Related to Use Case 1, the user must apply a set of transformations to a set of objects.
 
 
 
In order to do this, the user must specify the objects to be transformed and the set of transformation operations to be performed.
 
 
 
One approach to do this on-canvas is as follows:
 
 
 
Drag a rectangle around one or more items, the bounding box of the selected items will be used as input to define the size of the base tile.
 
Based on symmetry group specified in toolbar, the shape of the base tile will be determined.  It will have a default (axis aligned) orientation.
 
If the root item of the selection is not a group, an SVG group will be created as a container around the objects.  Tis will allow the user to add objects to the base tile in the future. The base tile inkscape SVG attributes will be defined on the group.
 
 
 
If the root item is already a base tile, select and show the current base tile, and do not create a new one.  Do not change the symmetry type if it does not match the toolbar.
 
 
 
UC 3) Create multiple clones from a base tile using standard symmetry groups
 
 
 
'''Frieze'''
 
Select a base tile and ?? click on a path. Base tile is repeated along path using symmetry properties
 
Clipped at beginning and ends of path like text - if path extended? extend pattern
 
clone objects reference base tile and have an offset from base to indicate number of repeats.
 
Alternatively, select a base tile and click to create first clone, drag "left" or "right" to create additional clones based
 
symmetry pattern
 
 
 
'''Rosette'''
 
'''Wallpaper'''
 
 
 
UC 4) Modify base tile size, posiiton, orientation, skew, angle and update cloned tiles
 
 
 
UC 5) Change symmetry group of base tile (maybe even allow non planar tilings) and update cloned tiles
 
 
 
UC 6) Apply size and shift deltas to cloned tiles
 
 
 
UC 7) Work with existing SVG documents.
 
  
 
== Implementation Considerations ==
 
== Implementation Considerations ==

Revision as of 20:41, 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 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.

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 translated across the plane. Cloned tiles will appear in the cells of the grid.

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


  • Guides for symmetry groups
    • User interaction
      • User enables guide 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)
      • 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
      • 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.