# laser reflections

Hi

how do i make reflections like this?
at least, how do I find the next 10 reflected points -marked blue- ?

well you could find it mathmatically meaning as the angle of incidence is equal to the angle of refraction.

Its all in the maths and physics.

I think you might be able to do this by using a dynamic object that would bounce off of dynamic walls as it hit them, but I’m a noob…

Sorry. This was a double-posted version of the other post and I can’t figure out how to delete it.

Get the angle of movement by subtracting the current position by the previous frame’s, ensure it’s a Vector and use its Reflect function with the surface normal, which you can get with a raycast function.

I don’t want any moving objects, the pink is a laser source, that points…
thanks.

Then yeah, you’ll need to use Python to raycast in the direction of the original laser’s pointing towards the ending wall, then reflect that movement vector by the wall’s normal. You’ll repeat this process until it runs out of walls.

http://www.euclideanspace.com/maths/geometry/affine/reflection/index.htm

might help

the important forumula is
Vb = -PVaP

I think that is what you need. I haven’t tried. You can do that with mathutils

I don’t think that is what he’s asking. instead you’re looking for i=r
Angle of incidence = angle of reflection.
You can do it in mathutils, but you’ll need to access the hitNormal of the ray

Working with angles makes it very complicated especially in 3D space. I think you need to check the math for it.

Another way would be to simplify the model. E.g. running in 2D space only.

I’m working on it at the moment

Here is a very quick and very dirty solution.

I do not know why the lasers are not shown when you hold the keys.

arrows left/right to turn the emitter

### Attachments

LaserDemo2.5.blend (306 KB)

quick semi-solution

ps: only edited Cube.001, let’s see how can I get inspired from this and do my own one from scratch

thanks =]

### Attachments

LaserDemo2.5b.blend (310 KB)