B - Spirix Patterns

General Description

The Spirix Surface module uses edge boundaries to create a mesh surface using various transformations. In order to facilitate creating discrete copies of objects utilizing a similar transformation environment, I've added a Patterns module to the Spirix code. The Patterns function requires a named group and will create copies using translation, rotation, and scaling in combination with nine different interpolation algorithms.

The following examples utilize a "clock face" to illustrate simple circular patterns (the object shown is grouped as "E"):

The following parameters perform a normal rotation and duplication of the object:

The result is a pattern of twelve Es (as expected):

Now add a second rotation value to rotate the letter clockwise while moving its position counter-clockwise:

The new pattern:

A spiral/helical pattern of scaled Es:

Overview

To better understand how to manipulate the parameters to generate the desired outcome, let's take a look at the various inputs in more detail:

Name - If no name is given, the copied groups will not be named - If a name is provided, the groups will be named with different sequence numbers - For example, if the name given is "Test", the copies will be named "Test(1)", "Test(2)", etc.

Delta Revolution Angle - If not zero, each subsequent group copy will be rotated about the Z-axis at the origin by the incremental angle specified in degrees.

Delta Rotation Angle - If not zero, each subsequent group copy will be rotated in the Rotation Plane selected about the bounding box center (plus the X and/or Y/Z Offsets) by the incremental angle specified in degrees.

X Offset - Optional offset of the bounding box center about which to apply the Delta Rotation Angle.

Y/Z Offset - Optional offset of the bounding box center about which to apply the Delta Rotation Angle - If the Rotation Plane selected is "XY Plane", the Y/Z Offset will be parallel to the Y-axis - If the Rotation Plane selected is "XZ Plane", the Y/Z Offset will be parallel to the Z-axis.

Rotation Plane - Prior to other transforms, the group may be rotated about a point in either the "XY Plane" or the "XZ Plane" as needed - The center of rotation is the center of the group's bounding box plus the X Offset and Y/Z Offset.

Copies - The number of copies (this does not include the original in the count).

Scale - The scale factor provided is used over the entire range of copies - For example, a value of "2" used with 10 copies will create the last copy twice as big as the original with the in-between copies scaled using the interpolation selected.

Interpolation - The interpolation algorithm desired for the Scale.

Delta Height - The incremental vertical distance between copies (parallel to the Z-axis) - Regardless of the Interpolation selected, the last copy will be at a final height of (#copies * Delta Height) with the in-between copies at interpolated locations.

Interpolation - The interpolation algorithm desired for the Delta Height.

Delta Radius - The incremental radial distance between the copies (parallel to the X-axis) - Regardless of the Interpolation selected, the last copy will be at a final distance of (#copies * Delta Radius) with the in-between copies at interpolated locations.

Interpolation - The interpolation algorithm desired for the Delta Radius.

Group - The name of the group to be copied - The name must be provided and the named group must exist.

Transformation Order

It is important to understand the order in which the various transforms are applied. Armed with that information, you can more intuitively understand the results of various combinations of inputs.

  • Scaling - If the Scale factor is not 1.0, then the group is scaled about the 3D bounding box center using the Interpolation selected.
  • Rotation - If the Rotations value is not zero, then the group is rotated about the 3D bounding box center plus the offset(s) using the Interpolation selected- The axis of rotation is parallel to the Z-axis if the value for Revolutions is zero, else it is parallel to the negative Y-axis if Revolutions is not zero.
  • Delta X - If Delta Radius is not zero, it will be applied to translate the group in the direction of the positive X-axis - Effectively, an interpolated value is added to the X-coordinate of each group location.
  • Height - If Height is not zero, an interpolated value will be added to each Z-coordinate of the group.
  • Revolution - Once all other transforms have been made in their original orientation (and assuming that the value for Revolutions is not zero), the group will be revolved about the Z-axis using the Interpolation specified. [Note: The create_spirix_surface() function is called with the 4th and 5th parameters set to the origin and axis of rotation - These are hard-coded as "[0,0,0], [0,0,1]", but could be any valid Point3D andVector3d combination and the create_spirix_surface() function will perform the Revolutions operation about this location - However, the other transforms will still be computed using the model axes.]

NOTE: Some models that were created with Spirix can be found at https://3dwarehouse.sketchup.com/user.html?id=1824658900641239202016828