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
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
TTFN
FAQ731-376: Eng-Tips.com Forum Policies
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
------------------------------------------------------------
RE: Figure-8 formula
TTFN
FAQ731-376: Eng-Tips.com Forum Policies
RE: Figure-8 formula
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 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: Eng-Tips.com Forum Policies
RE: Figure-8 formula
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
RE: Figure-8 formula
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
RE: Figure-8 formula
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
RE: Figure-8 formula
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
RE: Figure-8 formula
RE: Figure-8 formula
RE: Figure-8 formula
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
RE: Figure-8 formula
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
http://www.deltamotion.com