Hi,

Your typical funciton looks something like this in math books:

f(x) = A*x + x^2 //just an example

Where f(x) is essentially 'y'. So, you just need the equation that defines your curve. The curve in your jpg appears to be a circle.

y = sqrt(x^2 + r^2) //where r is the radius

That actually yields + or - and you just pick what fits your situation best. So, you pump in an x and get you 2 y's. Pick the best y and use it.

Jobe Makar
http://www.electrotank.com
http://www.electro-server.com
phone: 252-627-8026
mobile: 919-609-0408
fax: 919-882-1121
----- Original Message ----- From: "leolea" <[EMAIL PROTECTED]>
To: "Flashcoders mailing list" <[email protected]>
Sent: Wednesday, April 25, 2007 3:34 PM
Subject: [Flashcoders] Curves question for math gurus


Hi,

I have a dynamically drawn curve. It's a simple curve, with 2 end points,
and its yfactor will vary.

I'm trying to figure out a way to have objects "snap" to this curved line. I would distribute them over the _x axis, and I need a formula to get their _y
position on the curved line.

Here is a visual explanation:
http://pages.videotron.com/poubou/flash/curve.jpg

Now, I guess this requires trigonometry... And I really am a newb when it
comes to trig...

Any help would be appreciated !




_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to