Our Blog

A Parametric Cycloid in Revit as an Adaptive Repetition

Imagine the tip of a pencil attached to a fixed point in the circle that is rolling in this animation, below. As the circle rotates, the pencil creates this special kind of arc known as the Cycloid. I would like to write about this today. Let me mention the credits, up front: I borrowed this nice animation of the Cycloid from a Wikipedia article, at this link, and I read about this interesting topic in Aaron Maller‘s blog, Malleristic Revitation, at this link.
Oh, and the composer of the Oboe Concerto that plays in the two videos included in this article is Tomaso Albinoni. 🙂

So, can we make this Cycloid in Revit, parametric, and with the ability to schedule the x and y coordinates of the points that generate the curve? Can this be done in Revit, or do we need to use other applications such as Grasshoper or Python? Well, as you saw in my previous blog article, the Revit Cat said that “there is more than one way to skin a cat”, so I want to dedicate this blog article to present my solution for a parametric Cycloid that can be configured to any radius, any circumference, with a parameter for the number of points, and with the ability to schedule the x and y coordinates of the points that generate the curve.

Properties of the Cycloid

To be able to solve the Cycloid in Revit as a parametric family, it is important to understand its geometric properties. Let’s see:

  • The length of the path of the Cycloid is equal to the circumference of the circle that generates the curve. Therefore, both lengths are equal to: 2 * pi * radius.
  • The rolling circle starts from the left, with the rolling point (the tip of the pencil) on the South position of the circle, and that point rotates clockwise.
  • Every 1/8 of the flat path, the rolling point rotates 1/8th of the circumference, which means that for every (pi * radius / 4) along the path, the point rotates 45 degrees on along the circle, clockwise.

  • My solution

    My solution is an example of what I call an “adaptive repetition”, which is a repetition that uses adaptive points to cause variations in the repeater. I will use 2 families; Family 1 is the repeater, and Family 2 is the divided path where the spline can be generated using the points as a guide. The spline will need to be generated in the same way again if the parameters of the cycloid change.

    Family 1, the repeater

    Properties of this family: Generic adaptive template. Category: Specialty Equipment. Always vertical, and Shared.

    Parameters:

  • r (the radius)
  • r_inverse (well, simply radius multiplied by -1, useful for making offset values go to the opposite direction).
  • s (segment; this is the 1/8th of circumference that the rolling point runs in 45 degrees).
  • d (this is a reporting parameter that measures the distance between the two Adaptive Points).
  • x_offset (this is to find point “d“, as an offset from Adaptive Point 1).
  • a (this is the angle of rotation point “a“; it is tied to the constant and to the movement of Adaptive Point 2).
  • k (this is the constant, basically, the number that results of dividing 45 degrees by 1/8th of a circumference).

  • First, I create two adaptive points, on the reference level view. These points are “Vertical on placement”. First point may be at the origin of reference plane, and the second point at any distance from the first point, to the right side. Then we need some reference points, as shown in this image. Adaptive Point 1 is the host for Reference point “a“. Point “a” is the host for Reference point “b” at the same place. Point “b” will be tied to a rotation angle, and will be the host for point “c“. Finally, point “d” is hosted by Adaptive point 2, with an offset equal to the radius, in the negative direction.

    Sounds tricky? :confused: Yes, it is.

    No skeleton of reference planes or reference lines is needed. In the following video, I created reference planes separated at 1/8th of the circumference from each other, but this is just for illustration purposes. Notice that as the adaptive point goes along the path, for every 1/8th more along the path, the rolling point rotates 45 degrees along the circle. The reference circle is not really needed in the family; I included it because it helps to visualize how the points move, but the circle could be removed anyway.


    Family 2, the divided path

    Properties of this family: Generic adaptive template. Category: Generic models. Always vertical.

    Parameters:

    • r (the radius)
    • c (the circumference)
    • # (the number of points to divide the path)

    From these 3 parameters, only the radius need to be tied from Family 1 to Family 2. No skeleton of reference planes is needed. All we need is one reference line, constrained to to “c“, the length of the circumference, and one adaptive point (Vertical on placement), that we will be used to define the position of the Adaptive Point 2 from Family 1. Then, we divide the reference line, and tie its number of divisions to “#“. The rest is shown in the following video:

    As you can see in the video, the more points you introduce in the divided path, the more precision you obtain for the curvature of the Cycloid.


    Scheduling the x and y coordinates

    Since Family 1 is shared, and it is a Specialty Equipment element, we can tag all the elements individually, with Tag All, and a tag for Specialty Equipment. We can customize the tag to include the Mark parameter, and a couple of shared instance parameters such as “x coord” and ‘y coord“. In Family 1, we need to include a couple of reporting instance parameters, using those shared parameters. “x coord” is the distance from point “d” to Adaptive Point 2; “y coord” is the distance from point “c” to point “d“.

    Using the curve in generic families

    An adaptive family cannot be loaded into a generic family, but at least you can grab the curve. In the project, create a wall by face using a face that you have created in the adaptive family, based on the Cycloid curve. Now, the wall can be used with “pick lines” to create other objects, such as a beam. If you want to use the curve in a generic family, start a Model-In place family in the project; start an extrusion; use “pick lines” on the wall by face, or on the curved beam, and use that curve to create a sketch. Finish the dummy In-place object, and then do Edit In-place; copy the sketch to the clipboard, and cancel the Edit In-place. Then, open a new family for door, or window, for example; start an extrusion or a void in the wall, and paste the sketch that contains the curve of the Cycloid. Yes, the door or window won’t inherit the parameters of the Cycloid family, but you will get the same curve, and remember, you still have all the data in the Cycloid family, and in the schedule. In addition, if you need a different curve, you can always go back to the adaptive family to generate another curve with different parameters.

    This image shows some sample objects, wall, beam, window, using the curvature of the Cycloid family as a guide.


    Notes:

    1. There is another video in the Planta1 channel in Youtube about this article:

    http://www.youtube.com/watch?v=AWIfd7LlqTk


    See you in our next blog…

    2013 Planta1.com, inc. , Alfredo Medina | permission to reproduce this article is granted if the name of the author and the URL of this article receive proper credit.

    Tags:

    Show Comments (0)

    This is a unique website which will require a more modern browser to work! Please upgrade today!

    Follow

    Get every new post delivered to your Inbox

    Join other followers