Hi!
For at project at school, we’re making a drawing board, where the user will be placing different shapes (such as bezier splines, circles, lines, and so on (attachment, (2))), that will be functioning as mirrors. Also, there will be a light source emitting rays, functioning as a light source. When these rays hit the shapes, we want them to bounce off them just as light bouncing off a mirror, regarding to the reflection angles. (attachment, (1)) But we really dont have a clue how we should go about this…
We’ll be needing the tangent of the shape where a ray hits it (probably from the derivative of the shape in the intersection point), and calculate where the ray will go from there by the help of some some angles and rotations and stuff…
We’ve looked around in the API, but we cant seem to find anything that could help us with doing this… or is it?
Attached image should explain what we’re trying to do…
http://hovedprosjekter.hig.no/v2004/data/gruppe11/vinkelillu.gif
EDIT/
After some thinking, we’ve found out that the only thing that we really are wondering about, is how we can find the tangent of a shape in a given point of the shape.
/EDIT
Anyone got some ideas?
Thanks in advance,
Lars Petter