Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations GregLocock on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Figure-8 formula 1

Status
Not open for further replies.

dakeb

Mechanical
Dec 1, 2004
81
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
 
Replies continue below

Recommended for you

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

TTFN

FAQ731-376
 
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
------------------------------------------------------------
 
OK, so add an offset of 2R to whichever, to get the second circle

TTFN

FAQ731-376
 
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!)
 
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


TTFN

FAQ731-376
 
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
 
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.
 
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)
where R is your circle radius and t=0 to 1.

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

Hope this helps.

-ab

 
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



 
 http://files.engineering.com/getfile.aspx?folder=17eb552c-0b5d-464b-81de-9ec990caa1fd&file=polar.jpg
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
 
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.
 
In actual fact, I can do this without patterning, by having a continuous curve of 'n' loops, represented by: -

n=coils
r=radius
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
 
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
RAD: REAL; // ANGLE IN RADIANS
S: REAL; // SIN(RAD)
C: REAL; // COS(RAD)
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
Rad:=DINT_TO_REAL(Deg MOD 360)*M_PI/180.0;
s:=SIN(RAD);
c:=COS(RAD);
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor