Cycloid (rolling wheel )

Yeah, it’s backwards - you were using t to get X & Y, which is why I wanted to rearrange for t, so that I could instead supply X & Y - but cycloids don’t really work like that - you end up with either “x / r = t - sin(t)” or “y / r - x / r + Cos(t) - Sin(t) + t - 1 = 0” - not super useful.

What was interesting though is that the equation for Y gives us a height (1-Cos(t)) - so if we say this is our Z (height) - then we can map it onto a circle (x = Cos(t), y = Sin(t))

z = 1-Cos(t)
x = (R + z(t)) x Cos(t) = (R + (1-Cos(t)) x Cos(t)) (I called it K as shorthand that it’s a constant)
y = (R + z(t)) x Sin(t) = (R + (1-Cos(t)) x Sin(t))

However the fun part happens because we’re not supplying a linear t - we’re pulling it off a variety of other geometry (grid, radial grid, torus) giving us more complexity and way less control - however if we supply regular values, we get something much more readable - a cycloid around a circle:

EpiCycloid.gh (22.9 KB)

I’ve been watching this thread for a few days, I just wanted to play with cycloids as well :sweat_smile:

edit: it’s not a proper epicycloid though

and just thinking further, I guess that means that you could apply this to an arbitrary curve provided you could generate aligned PFrames - so for the precision you’re talking about, we can see in Martin’s screenshot that the X distribution is not even, which is why I think the rolling wheel approach struggles

This is the part in my 26a version that generates aligned PFrames, with the option of rotating the PFrame around its ‘X’ or ‘Y’ axis:

Yes, the rolling wheel approach struggles with precision.

I’ve wondered if I made a mistake creating this thread, but I’ve learned a few things and it’s fun. Galileo would have LOVED Grasshopper.
:+1:

Artsy :grin:

Oof, I’m close with it - I just have one puzzle left that I’m drawing a blank on.

I’ve got the uneven distribution done, which is great, because it always identifies the kink in the curve, regardless of the number of points (within reason). The key is to use the curve length rather than the domain (since the latter can get stretched, Curve Parameter Space – Bugs for breakfast )

Using the axes of the PFrame we can get the cycloid curve. However, getting the cycloid curve to be the same length as the original curve is still problematic:

i.e when the radius is 0.846, it generates points for 0.846 of the curve - and you would think, well easy enough, just multiply the length by 1/x (in this case 1.182) - however that still leaves a tiny incomplete tail - I’m drawing a real blank on how to rearrange this so that it divides the whole curve (and I have a horrible feeling that the answer is actually based on rearranging for t)

spoked_wheel_2026Jul25c_expressions.gh (30.9 KB)

I don’t think it’s a floating point error… or is it?

Trigonometry :man_shrugging:t2:

Breaking Bad: Yeah, Science!

1 Like

Agreed. But not so sure about Kangaroo. And I bet Leibniz and Newton would have appreciated this thread – and argued about it! (“ex ungue leonem”, the lion is recognized from his claw)

Leibniz *Bernoulli

Having struggled with this for awhile (too long considering I have no use for it), it’s easy to see why PFrames (plural) or Range or Series are so attractive, not only for precision but because it looks better.

I probably should wait on posting this, play with it to find errors… :roll_eyes:

I spent time trying to do what I did with Martin’s code, joining segments between peaks to avoid rounding the peaks as IntCrv does. But I gave up and discarded that code because of trouble finding the peaks - I may try that again…


spoked_wheel_2026Jul28a.gh (33.4 KB)

Instead, I added features:

  1. slider in gold group rolls a wheel as a “trace” (PFrames does the real work).
  2. fixed code so Value List place wheels on top, bottom, inside or outside (corresponding to “zero, one, two or three” - need better names).
  3. added a path generator above the canvas.

When the ‘Count’ slider is set to two, ii creates lines.
When the ‘Count’ slider is set to three, ii creates planar curves.
When the ‘Count’ slider is set to four, ii creates 3D curves.

The slider connected to Dom allows part of the curve to be used (SubCrv)

That “path generator” could use Data Output to pass the curve.

Your verbose posts are way too much for me! I’m exhausted.

This pair of GH files does that.

spoked_wheel_2026Jul28b.gh (28.7 KB)
crvGen_2026Jul28a.gh (16.2 KB)

You can just stop reading when you get bored, that is an option - the file is at the bottom and it’s wayy more succinct :wink:

Got it! White group that makes the code slightly wider than my screen.



spoked_wheel_2026Jul28c.gh (46.4 KB)

This method required one manual setting (‘maxD’ slider in blue group) but I got desperate.
:smiley:

P.S. I made a small addition to crvGen because the yellow ‘pathPts’ were lost.


crvGen_2026Jul28aa.gh (15.3 KB)

I was fooling around with purely cosmetic changes and thinking about how to avoid that “one manual setting (‘maxD’ slider in blue group)(which is bogus and bothered me) when I made a horrible discovery - the ‘top’ and ‘inside’ modes fail to isolate segments between peaks properly while ‘bottom’ and ‘outside’ modes appear to work as expected?!

Can you see the problem? The yellow segment is easy to see.

inside’ mode:

outside’ mode:

top’ mode:

bottom’ mode:

Back to the drawing board.
:frowning:

I still don’t have a solution but do have a clue (theory) about why this might happen? Easiest to see on the ellipse-based path in the earlier post, ‘inside’ mode… When the cycloid curve is “inside”, the PFrames tend to converge (overlap), whereas they spread apart when “outside”.

inside__outside

To some extent this also happens in “top” mode since the “ellipse” droops downward, making the PFrames converge, whereas they spread apart in “bottom” mode.

Just a theory. The same happens with random paths but is more difficult to see.

As intriguing and challenging as this problem has become, I suspect the arbitrary path is more complex (and impractical?) than what Galileo considered. I might get back to it but have other things to do. Before I go, I’ll post and explain what I have.



spoked_wheel_2026Aug3a.gh (55.5 KB)

Increasing ‘Count’ hides some problems but not all. It doesn’t affect the number of peaks, which is solely a function of path length and the circumference (radius) of the rolling wheel.

The main improvement in this version is how the number of points between peaks is determined (components in the light yellow group, in the white group on the right).

Otherwise, the basic functionality is the same as the version in my second post, ten days ago.

P.S. The latest version of crvGen.gh
crvGen_2026Aug1b.gh (22.8 KB)

Here’s how the points from the expression could be mapped to an organic curve optimized to a length of a multiple of two pi assuming the wheel always stays upright…

cycloid-expression_random_two_pi.gh (22.4 KB)

This has nothing to do with GH but turned up on my YouTube feed. Similar to Voith Schneider…

He mentions a friend (Jude Schauer) that may have more on flying cycloids, here:

:zzz: