## Friday, March 8, 2013

### "The Helen of Geometry"

... Otherwise known as the Cycloid.  Not gonna lie, i had never even heard of the mathematical description before, and the reading on these fine shapes is absolutely astonishing.  But i digress.  Last week i was showing off one of our projects (the large "classic" Brick building), and if you see the image from last weeks post, there is a very wide Stone Arch above a drive lane coming under the second story of the building.  Early in Design, a lot of the Columns, and Capitals, and Profiles, and Trim pieces were appropriately placed in rough form, and as the design progressed they were iterated in to something properly proportioned for their appropriate style.  So, they bequeathed me the Wikipedia entry describing the shape of the Cycloid, a.k.a. The Helen of Geometry, which is what shall actually be placed above the Drive Lane.

The math behind it sounded pretty entertaining to me, although i admit pretty quickly that Grasshopper is probably a much better candidate for something like this. EDIT:  Zach says Python as well... Still, armed with wikipedia and Wolfram, providing formulas for coordinates and arc lengths along the form, i figured it was doable.  My first attempt seemed pretty straightforward:

Armed with formulas for X and Y along the shape, i would generate 10 X points, all equidistant.  Their X distances calculatable since the overall width of the form is a direct relation to the Radius of the acting circle (The width is an unrolled circumference of the circle, exactly).

Then, id use the formulas to generate their Y coordinates, based on those X's.

(Let me start by saying:  I am not a world leading mathematician.  I got through Calculus like a champ, but i dont know how i would put a Differential Equation in a Revit Family.  That takes some Buildz skills.)

You can see in the image that the final product didnt go the way i originally planned, but thats because there were options:  I had intended to plan the X values, and infer the Y values based on them.  You can do it, as Wolfram has a badass Equation describing X and Y in relation to one another.

But there wasnt much point: My intent was simply to have an instance parameter in the family that let me type in a value from 0 to 1, with decimals.  (0, .1, .2, .3...).  From there, i wanted it to build the Y values.  But did i really care if it put them at predefined X coords?  Negatory. So in the end, xPercent still exists, but now all of the families "sit" on the same origin, and the X coord is also "pushed out" using the formulas, instead of locking the different instances to the reference planes.  It involves a few wacky variations moving between degrees and radians (and a "Number" since we know how Revit is about units...), plus a throwback reference to David Light's blog on how to enter Pi as a variable in Revit "Pi()".  That was handy. =)

After making it so the users could input either "r" or the CircumferenceTotal (a.k.a. the width of the drive lane), it was a Connect The Dots exercise.  I am still IMMENSELY frustrated that the Conceptual Massing / Adaptive Component Editor is the only place we can Spline Through Points (where points are the end of other Model Lines) and have them stay constrained.  But i digress.  No, i dont digress.  It pisses me off.  Because an AC cant nest in to a Face Based Family, and its not an AC for ANY other reason.  Which means i have to have my project team place an Unhosted component, then edit the Profile of a wall to trace the stone Cycloid, which they cant "trim" the sketchlines of because its a Picked Spline.  REALLY?? Sigh. (Ill post the imaged in the project once they refine the placement and the Profile). BTW, there were other issues, as well.  In a REAL Cycloid, the 0 point and the 1.0 point are tangent to vertical.  In Revit, a Spline through points wont let that happen.  I even placed two additional vertical points underneath the 0 and 1.0 points to force it *tighter,* but it doesnt matted.  So it takes a void to lop of the bottom of it.

Anyway, since thats the case, Adaptive Component it is.  The AC has a nested "Stilt" family, and thats whats doing everything except Connect-The-Dots, which means we will use it "for reference" inside the Window Family where we need to describe this shape as well.  The Window just wont be able to be parametric.  I would love for every Line to have Reference Points at the end that could be woven through, in the traditional Family Editor... But that continues to be my wish.

Wrapping it up, the obvious question (i hope) that i had to bring to the Design Team was:  Whos building this?  And how are we documenting it?  The reason being, while a Cycloid is graceful to form in a GIF image at the top of a blog... Its awfully close to a semi-ellipse, which is awfully close to approximated arcs.  Im all for modeling it correctly, but im all for having it built correctly as well.  And if they arent going to bother, i can certainly make tangential arc segments in the traditional family editor with far less effort, and then we can tie down real X and Y dimensions for the subcontractors.  In our heart of hearts though, we wanted a Cycloid.  And... As a small part of me hopes we end up the GC on this job as well (at which point we can zing out some awesome fabrication models from this information), we figured we would do it.

Its full value for the Project will ultimately live or die on "what happens" with this geometry now that its there.  It must be described for its audience, in such a way that it can get built as desired, or transmitted in such a way that it can be used again.  Otherwise, having a fancy Revit Family in a fancy Building Model just to hack dimensions on it is rather... well, basic.

Here is hoping we can keep this somewhere past basic.

Håvard Vasshaug said...

Hi Aaron. Very interesting read, thanks. Was just wonderIng how the vertical tangents at 0 and 1 did not work. I've made this happen with additional points, but yours didn't work?

Håvard

Aaron Maller said...

Havard-

If you click on the image that shows it in Elevation, and you look at the bottom right (where the profile is hosted) you can see what the issue is:

1. WITHOUT the extra points below the end points, the profile is "bent upwards" at the outside, since the only points next to the end points are inbound, hence the spline is "bent inward facing up" at the originating endpoint. Its not truly representing vertical.

2. Adding in the extra points "below ground" causes the spline to TRY straightening out, but it still infers from the points above, that there is a bend. So adding these points causes it to OVERcorrect. You can see the profile is now "bent down" because the very end of the spline now "bows out" at the endpoints.

Unless im missing how to do it, i can get an ARC to snap tangent to a sliver of line that is perfectly vertical, but with a Spline Through Points i dont know of any way to achieve such a thing.

Since (at best) this geometry will get reinterpreted from the data points, im not overly worried about it since ill have to dance with other software regardless. But, it does make it less than perfect.

Can you email me an example of how you got it to work out correctly? Id love to post it...

HyunWoo Kim said...

It's a great post. Why didn't I discover it earlier? Anyway, I worte a post about the same issue here.
http://plevit1.blogspot.kr/2014/12/cycloid-helen-of-geometry.html
You inspired me. :)
Thanks, Aaron. Keep it up.