Saturday, October 29, 2011

033_idealhouse_sineroof


  • Start with two ellipses, adjust their major/minor axes
  • Divide both ellipses into N1 points
    • Decompose points into X, Y and Z coordinates
    • Take the domain of the curves and run it through a sine function
    • Create new points that take the old X, Y, and add (a potentially negative number) the result of the sine function into the Z coordinate.
  • Draw lines between the points that belong to the inside and outside ellipses
  • Count the number of lines
    • Create a list of booleans which is number of lines - N2, TRUE and N2 False
    • Shift list of booleans by N3, wrapping on
    • Cull the list of lines by booleans
  • Decompose remaining lines into start(P1) and end(P2) points
    • Compare start and end points Z coordinate
      • If Z1 > Z2 then draw SDL (start, direction, length) line of N4 length along vector P1->P2
      • Else draw SDL line of N4 Length along vector P2->P1
    • Decompose P2 into XYZ coordinates, make new point using P2 XY and P1 Z
      • Create unit vector between P1 and P2b
      • rotate vector .5pi radians
      • set amplitude to N5
  • Extrude SDL lines by respective vectors


No comments:

Post a Comment