|
-
Dec 20th, 2003, 04:00 PM
#1
Thread Starter
Registered User
parametric
how do i find out if a parametric function is turning left or right?
test your algorithm on these functions:
t goes from 0->360 degrees or 0->2pi radians
x=sin(t)
y=cos(t)
should always turn right.
t goes from 0->360 degrees or 0->2pi radians
x=sin(t)
y=cos(2t)
turns right from t=0 to t=pi
turns left from t=pi to t=2pi
thanks.
-marvin
-
Dec 20th, 2003, 06:18 PM
#2
Theoretically, you could find the tangent line of the point immediately before the point you want to test and plug in the poing you want to test into that (made into an inequality) to test whether it is going straight, left, or right. This could most likely be made to work on a function, but I don't feel like it right now
The time you enjoy wasting is not wasted time.
Bertrand Russell
<- Remember to rate posts you find helpful.
-
Dec 21st, 2003, 05:52 AM
#3
Lively Member
The property of a curve which *could* tell you whether it's turning left or right is called its curvature:
Cartesian:
K = d2y/dx2 / (1 + (dy/dx)2)^3/2
Parametric:
K = (x.y.. - y.x..) / (x.2 + y.2)^3/2
Intrinsic:
K = d(psi)/ds
At a given point on the curve, if K is positive the curve is turning left, and if K is negative the curve is turning right. I'm not sure if this is always the case but it probably is.
-
Dec 21st, 2003, 06:22 AM
#4
Thread Starter
Registered User
Originally posted by TheManWhoCan
K = (x.y.. - y.x..) / (x.2 + y.2)^3/2
can you explain your syntax? what is " x.y..-y.x.. "???
-
Dec 21st, 2003, 05:30 PM
#5
I'd assume he means 'x.' is the first derivative of x, and 'x..' is the second derivative of x.
The time you enjoy wasting is not wasted time.
Bertrand Russell
<- Remember to rate posts you find helpful.
-
Dec 21st, 2003, 06:12 PM
#6
Lively Member
Yeah:
x. = "x-dot" = dx/dt
x.. = "x-double-dot" = d2x/dt2
-
Dec 22nd, 2003, 11:09 AM
#7
Thread Starter
Registered User
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|