We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSyntax Questions › Using bezierPoint to find an X pos from a Y value
Page Index Toggle Pages: 1
Using bezierPoint to find an X pos from a Y value (Read 354 times)
Using bezierPoint to find an X pos from a Y value
May 24th, 2009, 7:28am
 
Better introduce myself first...

Hi all, I'm currently a design student but previously(9 years ago) studied "computer studies" where I learnt the very basics of programming. I discovered processing about six months ago and I'm loving combining new and old passions.

Anyway, I have just discovered the magic of bezierPoints, but have a question which is... Is it possible to find the X coordinate if you already have the Y? The only thing I've thought to try so far is norming the Y value and using that as parameter t but this doesn't seem to work.

Hope thats clear and thanks in advance,

David
Re: Using bezierPoint to find an X pos from a Y value
Reply #1 - May 24th, 2009, 12:52pm
 
Just realised this could be quite a stupid? request as a point on a bezier curve could pass through the same y point more than once. I've thought about using a loop to check through values of t to find where any intersects could take place but think the incremental value will have to be very small otherwise the loop could miss the intersect.

Oh well  Sad.
Page Index Toggle Pages: 1