×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Are you an
Engineering professional?
Join Eng-Tips Forums!
• Talk With Other Members
• Be Notified Of Responses
• Keyword Search
Favorite Forums
• Automated Signatures
• Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

#### Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

# Figure-8 formula

## Figure-8 formula

(OP)
Hi guys,

I think I need the help of a mathematician, so I am posting this here.

I am trying to construct a figure-8 curve in ProE and have so far not found the right expression.

The type of figure-8 curve I need is a full circle, constant radius throughout, i.e. two full circles tangential to each other (is it called a hippopede?)

ProE can accept either a cartesian or polar expression. for cartesian I will need two expressions, one in terms of x and one in terms of y. For Polar it would be in terms of theta.

Background: I have a sub-sea piece of equipment with a stowed cable. The cable is stowed by wrapping it around two parallel mandrels in a figure-8 helical fashion. I need to model the cable in 3D in its stowed position, so will sweep a solid circular shape along whatever curve is most appropriate. I reckon I can add a z-factor in ProE to generate the wound coils once I have the basic curve shape (at least I hope so).

I'm not a mathematician, I'm a mech eng, so please keep it simple!

Cheers,

Dave

### RE: Figure-8 formula

??
x^2 + y^2 = R^2
(x-2R)^2 + y^2 = R^2

### RE: Figure-8 formula

(OP)
Proe is not liking that. How would I enter the formula following the stated rules?

For cartesian coordinate system, enter parametric equation in terms of t (which will vary from 0 to 1) for x, y and z
For example: for a circle in x-y plane, centered at origin
and radius = 4, the parametric equations will be:
x = 4 * cos ( t * 360 )
y = 4 * sin ( t * 360 )
z = 0
------------------------------------------------------------

### RE: Figure-8 formula

OK, so add an offset of 2R to whichever, to get the second circle

### RE: Figure-8 formula

(OP)
okay, I am probably being stupid here, but please explain.

I needed the curve as functions of x and y so I transposed your expression to: -

r = 100
x = sqrt(r^2 - y^2)
y = (2 * r) + (sqrt(r^2 - (x - (2 * r))^2))
z = 5 * r

When I run it I get: -

r = 100
x = sqrt(r^2 - y^2)
/* WARNG: Probable error in function evaluation.
y = (2 * r) + (sqrt(r^2 - (x - (2 * r))^2))
/* WARNG: Probable error in function evaluation.
z = 5 * r

What am I doing wrong? (Please be patient with me!)

### RE: Figure-8 formula

For cartesian coordinate system, enter parametric equation in terms of t (which will vary from 0 to 1) for x, y and z
For example: for a circle in x-y plane, centered at origin
and radius = 4, the parametric equations will be:
x = 4 * cos ( t * 360 )
y = 4 * sin ( t * 360 )
z = 0

second circle offset in x by 8

x = 4 * cos ( t * 360 ) + 8
y = 4 * sin ( t * 360 )
z = 0

### RE: Figure-8 formula

(OP)
IRstuff,

Those expressions are fine for drawing two separate circles tangential to each other but I need to somehow itnegrate them into a single curve. I can ony have one value for x and one value for y in the expression.

Cheers,

Dave

### RE: Figure-8 formula

It is relatively easy to do this in Autocad even with the "z"-component. I generate the data (e.g. helix) in Mathcad, output them to Exel (otherwise I can't get rid of the e.g E-4 notation) and then create the script file. Can't you do this in Pro-E? If not can Pro-E import 3D- polylines or splines? If yes, put the Data here and the accuracy for the curve required and I see what I can do.

### RE: Figure-8 formula

Interesting problem. Your hippopede was quite a good tip; don't know where you got that. Wolfram MathWorld site gives the following polar equation for it:

r^2 = 4*b*(a - b*sin(theta)^2)

where a and b are shape & position parameters. It can be shown that when a=b it traces 2 circles mirrored by the y-axis, each circle having radius a and centered at (a,0) and (-a,0).

After a bit of manipulation and thought (to make the curve flow in the proper direction to match your cable), your full figure-8 can be coded as:

x(t) = 2*R*cos(2*pi*t)*sqrt(cos(2*pi*t)^2)
y(t) = 2*R*cos(2*pi*t)*sin(2*pi*t)

Don't "simplify" the radical in x(t) -- otherwise the signs would be wrong.

Hope this helps.

-ab

### RE: Figure-8 formula

(OP)
Hi bronsona.

Great work.

I set up the polar expression in ProE and got two full circles, but as you suggested it does not "flow" in the right direction, so that when I applied a z factor it split the curve per the attached picture (polar.jpg).

For the cartesian expression, I eneterd it into ProE as: -

R=40
x=2*R*cos(2*pi*t)*sqrt(cos(2*pi*t)^2)
y=2*R*cos(2*pi*t)*sin(2*pi*t)
z=0

(to ignore the z factor for now)

It didn't quite work out as it only produced a small section of the curve (see cartesian.jpg)

Any ideas on how to tweak it?

I can use the polar expression if it can be made to flow correctly.

Thanks

David

### RE: Figure-8 formula

(OP)
SOLVED

cartesian works if I convert radians to degrees - of course!
r=500
d=65
x=2*r*cos(360*t)*sqrt(cos(360*t)^2)
y=2*r*cos(360*t)*sin(360*t)
z=t*d

Excellent work bronsona!!

Thanks

Dave

### RE: Figure-8 formula

Glad to help! Sorry.. I should have said up front that the polar expression wouldn't work for your situation. But anyway, you figured it out.

### RE: Figure-8 formula

Why the z dimension?

### RE: Figure-8 formula

(OP)
In actual fact, I can do this without patterning, by having a continuous curve of 'n' loops, represented by: -

n=coils
d=diameter
x=2*r*cos(n*360*t)*sqrt(cos(n*360*t)^2)
y=2*r*cos(n*360*t)*sin(n*360*t)
z=t*d*2*n

### RE: Figure-8 formula

Bronsona's forumlas are simple enough but when I took the derivatives the X formula had a csgn() function.  I simply removed the square root and multiplied by the sign(cos(2*pi*t) since this only needs to be computed once.

Getting past the ProE and the modeling.  This kind of thing has been done before.  Usually it is just machining threads but the figure 8 pattern has also been done before.

The following code isn't as pretty as Bronson's but it works.  This is a partial copy from an previous application.
It is written in structure text or ST which is a language that PLC people use.
Some variables are declared globally and not declared here.

VAR
END_VAR
Deg:=Deg+10;
MSP:=DINT_TO_REAL(Deg)*DistPerDegree;     // MASTER SYNC POSITION/Pitch
IF Deg>=360 THEN
IF yOffset>yStart THEN
yOffset:=yStart-yAmplitude;
ELSE
yOffset:=yStart+yAmplitude;
END_IF
END_IF
xPos:=xAmplitude*s+xOffset;
xVel:=xAmplitude*c;
xAcc:=-xAmplitude*s;
yPos:=yAmplitude*c+yOffset;
yVel:=yAmplitude*s;
yAcc:=-yAmplitude*c;

The X and Y axes need to be geared to the Z axis and some variables initialized before starting.  The distance the z axis moves for every 10 degree determines the pitch of the winding.  The motion controller moves the X and Y axes to the calculated position, velocity and acceleration as a function of the z axis using a 5th order polynomial.  The motion controller takes care of the chain rule which makes the code look a lot cleaner and simpler to the users.  The controller takes care of the COS(z(t)) and SIN(z(t)) part  ( the chain rule ).  Now one must only ramp up the z(t) as a function of time and all the other motion will be smooth with proper feed forwards.

Peter Nachtwey
Delta Computer Systems
http://www.deltamotion.com

#### Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

#### Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Close Box

# Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

• Talk To Other Members
• Notification Of Responses To Questions
• Favorite Forums One Click Access
• Keyword Search Of All Posts, And More...

Register now while it's still free!