As a long time fanatic of the Dark Side of the Moon, I thought of a modified version of the album cover to sample Module 4 Part I with. The end result is shown below, encompassing the iconic album cover.
Option 2 within Step 5 to Flip image horizontally.
Step 1: The general shape elements of the parabolic feature were selected (side, top-middle, side) through the use of a Select Model Element nodes, and merged to create the parabolic shape through the node “Creating Group of Model Line”, which fed into the CurveElement.Curve which provided the general shape of the tunnel’s framework and direction. Through the use of Surface.ByLoft node, the tunnel was enclosed to enclose the frame.
Step 2: Panelizing the Enclosed Parabolic tunnel (roof)
The surface panel started with two (2) number sliders which were used for the U and V panel value inputs. These inputs were fed into the Panel.PanelQuad node in Step 2 and Image.Pixels in Step 3 (discussed later). The Surface.ByLoft from Step 1 feeds into the Panel.PanelQuad function at the surface variable, where the Panel.PanelQuad feds into the AdaptiveComponent.ByPoints which establishes the U and V grid points on the surface, creating a panelized surface. Through the use of the node Family Types, a “Rect_AperaturePanel:Rect_AperaturePanel was selected to create a general rectangular shape as each unit area defined in the grid system. The AdaptiveCompontent.ByPoints feeds out into Step 6: Panel Color Override (List.Flatten) and Step 7: Panel Parametric changes due to Color Values, Set Panel Parameters, which will both be discussed later in the respective steps.
Step 3: Inputting the image, pixelating that image through the UV values and mapping the image
The File Path node was used, which selects the picture from the computer (in this case the Dark Side of the Moon picture shown above), that feeds into the File.FromPath node that feeds into the Image.ReadFromFile node and into the Image.Pixels node within the image variable. The number sliders for both the # of U Panels and # of V Panels feeds in step 2 also feeds into the Image.Pixels node, respectively in the xSamples and ySamples. Through Image.Pixels variable colors, feds into List.Create and List.Transpose which goes back to List.Create. A code block was created for input, to enable the end user the ability to decide where the original image or the transposed image data, that feeds into the index variable of List.GetItemAtIndex, where the List Create function feeds into the list variable.
Step 4: Flipping the Image
The List.GetItemAtIndex outflow splits into three (3) feeds into Step 4 for Flipping the image in different ways and all go into the List.Create node in Step 5. The most direct way is through List.Reverse that heads into Step 5. The second feed is fed through the List.Transpose into the List.Reverse and List.Tranpose again into Item2 of List.Create of Step5. Step 4C allows the user to flip the image vertically and horizontally through List.Reverse, List.Transpose, List.Reverse, List.Transpose and finally List.Create in Step 5.
Step 5: Allows end User to decide flip/mirror image per personal choice
From the List Create and Add Option, it feeds into the List.GetItemAtIndex. Within the Add Option node, the user has the following choices: 0 for original image, 1 for image flipped, 2 for image flip horizontally, 3 for flip both horizontally and vertically.
Option 0: for original image selection
Option 3: Flip both horizontally and vertically
Step 6: Panel Color Override
The List.GetItemAtIndex in Step5 along with Code block with “1;” in it, feeds into Step 6’s List.Flatten node, at variables and amount respectively. This flattens the users inputs and list into the node Element.OverrideColorInView respectively.
Step 7: Panel Parametric Changes due to Color Values, Set Panel Parameters
The panel parametric changes are shown along the left half of Step 7, from the Code block feeding into List.Flatten thru Math.RemapRange, with functions such as Color.Hue and Color.Brightness would be used to adjust the color, all being culuminated in the Math.RemapRange.
The Height multiplier is a number slider that feeds into the multipler variable of the CodeBlock in the bottom middle of the image. The Math.RemapRange also feeds into the Code block as well, where further size readjustments are shown along the upper right half of step 7.
General Layout of Steps 1-7 of Part1:
End Part 1
Start Part 2
Step 1 and 2: Surface Creation and Panelization with U and V through Panelquad.
The same steps 1 and 2 from Part 1 was used as the basis of Part 2. This establishes the general parabolic shape from assignment 4.1.
Step 3: Compute Surface Normals
From the Panel.PanelQuad in Step 2 feeds directly into Step 3’s Surface.NormalAtParameter to help assist in creating vectors from the parabolic exterior surface.
Step 4: Create a Vector tied to the Sun Position
SunSettings.Current feeds into a codeblock that feeds into the SunSettings.SunDirection which establishes a vector to Revit’s sun, and is normalized by Vector.Normalized.
Step 5: Compute Strength of Sun Directness
From Step 3 (Surface.NormalAtParameter) and Step 4 (Vector.Normalized) into Vector.Dot in step 5 which creates the vector dot product, as shown in watch that feeds into Math.RemapRange and followed by another watch node. A code block between 0 and 1 for newMin and newMax of the Math.RemapRange. In step 5 calculates the strength of the sun directness (vectors).
Step 6: Define a Color Range
Code Block was used as the user entry node into two Color.ByARGB, which will determine the two end colors that are shown in the Color Range. The end user can redirect the colors in the Color.ByARGB just by redirecting the string from CodeBlock node into a different color and by readjusting the number in stated Code Block. The Color.ByARGB feeds into a Code Block - List of Colors that simplifies the number of info feeds into a Color.Range node at the colors variable. A code block - list of indices feeds into the indices variable in the Color Range, with the value obtained from the second watch node in step 5. The color output function in Color Range feeds into a Watch node to verify all 400 points have colors and values for each color.
Step 7: Change Panel Colors
The second node string from Color Range shown in Step 6 feeds into Element.OverrideColorInView (within the color variable) and outflows into a Watch node in step 7. The element in Element.OverrideColorInView is fed by AdaptiveComponent.ByPoints as shown in step 2.
Part II: General Overview of all 7 Node groups
Part II: End Result #1
Part II: End Result #2
Part II: End Result #3