We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hello.I'd like to make a some kind of controller like attached file. the curve(white bold line) can be controlled by green button and numbers can map from x coordinate from y coordinate.
I could make curve and button controll. I have been stuck while getting the point of intersection. (added red point by photoshop) I researched and found geomerative library provides intersection method. but i couldn't find how to read bezier curve Rpath object.
Could anyone can tell me how to read bezier curve to geomerative, or any other idea to getting intersection with bezier and lines?
Answers
How do you generate your white line? Is it a function?
Kf
I generate white bold line by processing function put in draw() loop,
beginShape();
strokeWeight(5);
vertex(12, 468);
bezierVertex(icon1.x, icon1.y,icon2.x, icon2.y,468,12);
endShape();
and value of icon1.x, icon1.y,icon2.x, icon2.y is provided dynamically by other class
The benzierCurve has to generate the curve based on a function. I would suggest you look it up. If you know the function, then you can get the interceptions using this function. Maybe somebody in the forum has done this before. Here I have an idea of doing it with a function I defined explicitly. This is not what you ask but it it is more a proof of concept.
Kf