Recent content by abeall

  1. A

    Bezier curve(again): given Y, solve for X

    In a http://en.wikipedia.org/wiki/B%C3%A9zier_curve" defined by p1, cp1, cp2, p2, is it possible to solve for X when Y is known? I can't figure out how to determine if the bezier curve intersects Y. I can conclude that the bezier curve does intersect if p1 and p2 are either side of Y. I can...
  2. A

    Cubic Bezier curve: given X,Y, solve for t

    Thanks for the explanation, Enuma. That made sense. And thank you hotvette, I am now working on a Newton Raphson approximation.
  3. A

    Creating a Fisheye Effect with FreeHand/Illustrator

    I got it working. For any future reference, here's what I did: 1) First I determine an radian angle between a given point and the ellipse center, like this: atan2(p2.y - p1.y, p2.x - p1.x) Where p1 is the ellipse center, p2 is the point to be deformed. 2) Then, based on that angle, I determine...
  4. A

    Parametrizing an ellipse - what am I doing wrong?

    I think I figured it out. I plotted points around the perimeter and realized that the parameter angleR in the parametric equation for an ellipse doesn't correspond to the angle from the center to the point (x,y) on the ellipse. So I looked for another equation and found this to be the answer: r...
  5. A

    Parametrizing an ellipse - what am I doing wrong?

    Oops, pardon me, in this case p1 is the ellipse center point, and p2 would be the X object that follows your cursor in the Flash example.
  6. A

    Parametrizing an ellipse - what am I doing wrong?

    parametrizing an ellipse -- what am I doing wrong? I have the width, height, and center point of the ellipse. I have an angle/vector from the center point and I want to know at what point it intersects the ellipse perimeter. Based on this wikipedia article: http://en.wikipedia.org/wiki/Ellipse...
  7. A

    Creating a Fisheye Effect with FreeHand/Illustrator

    I am looking to create a fisheye effect, similar to what can be found in computer vector drawing apps like Macromedia FreeHand or Adobe Illustrator: http://www.vecpix.com/tutorials/freehand/images/fh004/3d_soccer09.gif Note that this effect is not exactly the same as a fisheye lens. Here's...
  8. A

    Cubic Bezier curve: given X,Y, solve for t

    Wow. Yeah. An approximation would be good. Are there any well known approximation methods I could research? The only thing I can think of is to walk the bezier at a small time interval, say 0.01, then sort the points by distance to target point, and refine the closest or closest two until I'm...
  9. A

    Cubic Bezier curve: given X,Y, solve for t

    Wow, I have no idea how you did that, but I can see how that is the expression Dodo described. Thank-you very much. Now for step B... I'm a little lost because t is an unknown, it is what I'm trying to solve, and x and y are known. So I would have thought the equation would need to written...
  10. A

    Cubic Bezier curve: given X,Y, solve for t

    Thank-you both! Sorry, I should have mentioned I did not create the original getBezier function. After staring it and comparing to the wiki cubic bezier formula for awhile, I somewhat see the translation, though I don't think I could have come up with it on my own. Enuma, What is the "real...
  11. A

    Cubic Bezier curve: given X,Y, solve for t

    I'm programming some commands in a graphic application, and once again my extremely limited mathematical knowledge has found me rather stumped. Here is my cubic bezier function, written in JavaScript syntax(this is not actually JavaScript, though): function getBezier(percent,p1,cp1,cp2,p2) {...
  12. A

    Determine if 3 points form a right angle

    Thanks mda, that's interesting. I'm looking into the bisection method...
  13. A

    Determine if 3 points form a right angle

    After some research and experimentation, it appears that I can determine the point on the curve whose normal intersects the targetP quite easily: by finding the closest point! It's pretty obvious from looking at my illustration, but it also proved true in every other curve form I could come up...
  14. A

    Determine if 3 points form a right angle

    Yeah, I guess they are normals, I don't know. Though in actuality, what I have is tangents/direction along line(technically, I'm finding the angle between a point and a previous point), and what is shown is 90 degrees from that to illustrate what I'm trying to find. I guess I need a layman's...
  15. A

    Determine if 3 points form a right angle

    Thanks Rainbow Child and mda, I think I might understand it a little better... I might be able to translate that last curve, the one you said "Now the idea is to construct another "curve"" about. However, what does that curve represent? What I'm really looking for is one point. Here, take a...
Back
Top