# Thread: How to draw a Cycloid curve using only Y?

1. ## How to draw a Cycloid curve using only Y?

Hi,

I am new here. Not sure if this is the right section, if not please move it to the right section.

Basically what I am trying to do is, I have a straight line in X with many points. I want to modify this line by using x of each point and push it upward to form a cycloid. I looked at the cycloid formula and it has 2 equations for x and y. Since I don't want to modify x, I tried to pull y to one side using this formula:

But got stuck and wasn't sure if that was gonna work 100%.

If I was using a sine wave, then it would be like this:

y = sin ( x )

Any ideas if what I am asking is doable?

Thanks guys,
Timoti

2. ## Re: How to draw a Cycloid curve using only Y?

It's not clear to me what difficulties you're having or exactly what you're trying to do.

Have you been given an assignment to complete? If so could you post it word for word.

If not perhaps you could explain further.

If we assume you just want to draw a cycloid then I'd recommend entering the parametric equations in a graph plotter.

3. ## Re: How to draw a Cycloid curve using only Y?

Hello, no this is not an assignment. It's just something I am trying to solve for my program but thought I would ask because I am stuck in the math.

I don't just want to draw a cycloid. I want to change a straight line into one. So if I were to do this to make a sine wave out of this line, then it would be:

y = sin(x)

So in the same manner, I want to use the x value of each point in the line to compute y for a cycloid curve.

4. ## Re: How to draw a Cycloid curve using only Y?

OK. Plotting y=sin x doesn't turn a straight line into a curve. It just plots the curve.

What program are you writing?
What language are you using?

You really don't have to have a Cartesian equation for your program.

You can

plot(t-sin(t),1-cos(t)) [ using appropriate syntax ]

for suitable t values. You'll also want to do some scaling and positioning.

5. ## Re: How to draw a Cycloid curve using only Y?

Actually I am using Maya, not really a typical math application. Language is python.

So since I am going through each point on the Line, and run the above sin line, it does turn the line into a sine wave. Because x values of the points on the line starts from 0 and goes to 10. I currently have 1000 points, which is basically running:

point.y = sin(point.x)

Does it make sense?

Not sure how it works in the traditional math software.

6. ## Re: How to draw a Cycloid curve using only Y?

I don't Know maya but based on what you posted could you do

Point. x=t-sin(t)

Point.y=1-cos(t) ?

7. ## Re: How to draw a Cycloid curve using only Y?

No I can't because I don't want to change x, right? I want to use the x values to compute the y values on a cycloid curve.

8. ## Re: How to draw a Cycloid curve using only Y?

Why don't you want to change the x values? Do you want the x values equally spaced?

9. ## Re: How to draw a Cycloid curve using only Y?

Because I want to displace the line into a Cycloid shape, otherwise it would be a tool that creates a Cycloid curve which isn't very useful. Currently all the points are equally spaced but they don't have to be. I am using the Line geometry as a test.

10. ## Re: How to draw a Cycloid curve using only Y?

Then could you start with an array of t values, use these to set point.x=t-sin.t and set point.y=0. Then went you want to make the change set point.y=1-cos(t).

That's my last idea. Sorry if I haven't helped.

11. ## Re: How to draw a Cycloid curve using only Y?

Np, it's ok. But wouldn't that change x?

12. ## Re: How to draw a Cycloid curve using only Y?

No. Why would it?

13. ## Re: How to draw a Cycloid curve using only Y?

Because you said "set point.x=t-sin.t"? I thought I should find t from x and then use that for y, but not sure.

14. ## Re: How to draw a Cycloid curve using only Y?

Initially you could have the following.

t= 0, 0.1000, 0.2000, 0.3000, 0.4000, 0.5000...
x= 0, 0.0002, 0.0013, 0.0045, 0.0106, 0.0206...
y= 0, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000...

When you're ready change y in the manner of your choice to the following.

t= 0, 0.1000, 0.2000, 0.3000, 0.4000, 0.5000...
x= 0, 0.0002, 0.0013, 0.0045, 0.0106, 0.0206...
y= 0, 0.0000, 0.0050, 0.0199, 0.0447, 0.0789...

x doesn't change and the straight line becomes a cycloid.